diff --git a/pages.json b/pages.json
index f86f7e2..f51e6ec 100644
--- a/pages.json
+++ b/pages.json
@@ -369,7 +369,6 @@
"path": "pages/im/index",
"name": "IM",
"style": {
- "navigationBarBackgroundColor": "#FFFFFF",
"navigationStyle": "custom"
}
},
@@ -411,24 +410,21 @@
"path": "pages/im/friends/pending",
"name": "imFriendsPending",
"style": {
- "navigationBarTitleText": "新朋友",
- "navigationBarBackgroundColor": "#F3F6FB"
+ "navigationBarTitleText": "新朋友"
}
},
{
"path": "pages/im/friends/search",
"name": "SearchFriend",
"style": {
- "navigationBarTitleText": "好友搜索",
- "navigationBarBackgroundColor": "#F3F6FB"
+ "navigationBarTitleText": "好友搜索"
}
},
{
"path": "pages/im/friends/info",
"name": "imFriendsInfo",
"style": {
- "navigationBarTitleText": "用户资料",
- "navigationBarBackgroundColor": "#FFFFFF"
+ "navigationBarTitleText": "用户资料"
}
},
{
@@ -480,7 +476,7 @@
"path": "pages/im/group/info",
"name": "imGroupInfo",
"style": {
- "navigationBarTitleText": "群信息"
+ "navigationBarTitleText": "群信息"
}
},
{
@@ -494,14 +490,14 @@
"path": "pages/im/group/users",
"name": "imGroupUsers",
"style": {
- "navigationBarTitleText": "群成员"
+ "navigationBarTitleText": "群成员"
}
},
{
"path": "pages/im/group/announcement",
"name": "imGroupAnnouncement",
"style": {
- "navigationBarTitleText": "群公告",
+ "navigationBarTitleText": "群公告",
"app-plus": {
"titleNView": {
"type": "default",
@@ -519,7 +515,7 @@
"path": "pages/im/group/announceCreate",
"name": "imGroupAnnouncementCreate",
"style": {
- "navigationBarTitleText": "发布群公告"
+ "navigationBarTitleText": "发布群公告"
}
},
{
diff --git a/pages/im/friends/info.vue b/pages/im/friends/info.vue
index a7ba9e7..778a51f 100644
--- a/pages/im/friends/info.vue
+++ b/pages/im/friends/info.vue
@@ -106,7 +106,6 @@
}
},
onLoad(e) {
- console.log(e);
this.targetId = e.targetId
getFriendInfo(e.targetId).then(res => {
this.userInfo = res
@@ -128,7 +127,7 @@
if (code == 0) {
this.isTop = conversation.isTop
}
- });
+ })
},
methods: {
copyAddress() {
diff --git a/pages/im/group/info.vue b/pages/im/group/info.vue
index e085ad0..b846522 100644
--- a/pages/im/group/info.vue
+++ b/pages/im/group/info.vue
@@ -1,45 +1,44 @@
-
-
+
+
- {{ item.name }}
+ {{ item.name }}
- 邀请用户
+ 邀请用户
-
-
-
- 查看更多群成员
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 清空聊天记录
-
-
- 解散群聊
-
- 删除并退出
-
+
+ 查看更多群成员
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 清空聊天记录
+ 解散群聊
+ 删除并退出
+
+
@@ -47,25 +46,60 @@
import {
getGroupInfo
} from '@/apis/interfaces/im.js'
+ import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
export default {
data() {
return {
targetId: '',
group: {},
+ conversationType: 3,
announcement: '',
- members: []
+ members: [],
+ status: false,
+ isTop: false,
}
},
onLoad(e) {
this.targetId = e.targetId
getGroupInfo(this.targetId).then(res => {
this.group = res.group
+ console.log(this.group);
this.announcement = res.announcement
this.members = res.members
})
+ RongIMLib.getConversationNotificationStatus(this.conversationType, this.targetId, ({
+ status
+ }) => {
+ this.status = !Boolean(status)
+ })
+ RongIMLib.getConversation(this.conversationType, this.targetId, ({
+ code,
+ conversation
+ }) => {
+ if (code == 0) {
+ this.isTop = conversation.isTop
+ }
+ })
},
methods: {
+ setStatus() {
+ RongIMLib.setConversationNotificationStatus(this.conversationType, this.targetId, this.status,
+ ({
+ status
+ }) => {
+ this.status = !Boolean(status)
+ })
+ },
+ setTop() {
+ RongIMLib.setConversationToTop(this.conversationType, this.targetId, this.isTop, (res) => {
+ RongIMLib.getConversation(this.conversationType, this.targetId, ({
+ conversation
+ }) => {
+ this.isTop = conversation.isTop
+ })
+ })
+ },
toUser(item) {
uni.navigateTo({
url: '/pages/im/friends/info?targetId=' + item.targetId
@@ -83,21 +117,53 @@
uni.navigateTo({
url: '/pages/im/group/announcement?targetId=' + this.targetId
})
- },
- onClean() {
-
- },
- onDismiss() {
-
- },
- onQuite() {
-
+ },
+ onGroupName() {
+
+ },
+ onClean() {
+ uni.showModal({
+ title: '清空聊天记录',
+ content: '清空聊天记录,只会清空本地的记录,其他成员不会变化',
+ success: (res) => {
+ if (res.confirm) {
+ RongIMLib.deleteMessages(3, this.targetId, () => {
+ uni.showToast({
+ icon: 'none',
+ title: '清空成功'
+ })
+ })
+ }
+ }
+ })
+ },
+ onDismiss() {
+ uni.showToast({
+ icon: 'none',
+ title: '开发中'
+ })
+ },
+ onQuite() {
+ uni.showToast({
+ icon: 'none',
+ title: '开发中'
+ })
}
}
}
diff --git a/pages/im/group/users.vue b/pages/im/group/users.vue
index ee9baf3..5aa822a 100644
--- a/pages/im/group/users.vue
+++ b/pages/im/group/users.vue
@@ -3,7 +3,7 @@
- {{ item.name }}
+ {{ item.name }}
@@ -59,12 +59,14 @@
justify-content: center;
align-items: center;
- .name {
- width: 126rpx;
- text-align: center;
- font-size: 28rpx;
- overflow: hidden;
- text-overflow: ellipsis;
+ .name {
+ width: 126rpx;
+ text-align: center;
+ font-size: 28rpx;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ word-break: break-word;
}
}
}