diff --git a/apis/interfaces/im.js b/apis/interfaces/im.js
index ac954f5..deb8b1c 100644
--- a/apis/interfaces/im.js
+++ b/apis/interfaces/im.js
@@ -196,7 +196,7 @@ const joinGroup = (groupId, message) => {
const quitGroup = (groupId) => {
return request({
- method: 'POST',
+ method: 'DELETE',
url: 'im/groups/' + groupId + '/quit'
})
}
diff --git a/pages.json b/pages.json
index d662e57..61a9c6a 100644
--- a/pages.json
+++ b/pages.json
@@ -52,8 +52,8 @@
"path": "pages/record/foods",
"name": "RecordFoods",
"style": {
- "navigationBarTitleText": "",
- "navigationStyle": "custom"
+ "navigationBarTitleText": "",
+ "navigationStyle": "custom"
}
},
{
@@ -467,33 +467,40 @@
}
}
}
- },
- {
- "path": "pages/im/group/apply",
- "name": "imGroupApply",
- "style": {
- "navigationBarTitleText": "申请加群"
- }
+ },
+ {
+ "path": "pages/im/group/apply",
+ "name": "imGroupApply",
+ "style": {
+ "navigationBarTitleText": "申请加群"
+ }
},
{
"path": "pages/im/group/info",
"name": "imGroupInfo",
"style": {
- "navigationBarTitleText": "群信息"
+ "navigationBarTitleText": "群信息"
+ }
+ },
+ {
+ "path": "pages/im/group/invite",
+ "name": "imGroupInvite",
+ "style": {
+ "navigationBarTitleText": "邀请好友"
}
},
{
"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",
@@ -511,7 +518,7 @@
"path": "pages/im/group/announceCreate",
"name": "imGroupAnnouncementCreate",
"style": {
- "navigationBarTitleText": "发布群公告"
+ "navigationBarTitleText": "发布群公告"
}
},
{
diff --git a/pages/im/group/info.vue b/pages/im/group/info.vue
index cfe3242..f716b78 100644
--- a/pages/im/group/info.vue
+++ b/pages/im/group/info.vue
@@ -202,9 +202,8 @@
}
},
inviteUser() {
- uni.showToast({
- icon: 'none',
- title: '开发中'
+ uni.navigateTo({
+ url: '/pages/im/group/invite?targetId=' + this.targetId
})
},
loadMore() {
@@ -247,7 +246,6 @@
},
// 修改群头像
onGroupAvatar() {
- console.log('onGroupAvatar');
uni.chooseImage({
count: 1,
sourceType: ['album'],
@@ -362,10 +360,15 @@
uni.showToast({
icon: 'none',
title: '退出群聊成功'
- })
+ })
+ // 移除指定的会话
+ RongIMLib.removeConversation(this.conversationType, this.targetId)
+
uni.switchTab({
url: '/pages/im/index'
})
+ }).catch(err => {
+ console.log(err);
})
}
}
diff --git a/pages/im/group/invite.vue b/pages/im/group/invite.vue
new file mode 100644
index 0000000..fa5fb59
--- /dev/null
+++ b/pages/im/group/invite.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+