From ad58731a78b49edadbf6150c4549ed95bbf33e87 Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 15 Feb 2022 11:55:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/interfaces/im.js | 2 +- pages.json | 33 ++++++++++++++++++++------------- pages/im/group/info.vue | 13 ++++++++----- pages/im/group/invite.vue | 21 +++++++++++++++++++++ 4 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 pages/im/group/invite.vue 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 @@ + + + + +