From d6974e9a8b0ef164dd8105cb9be5fc8a7f4e6208 Mon Sep 17 00:00:00 2001 From: zhangdongxue Date: Fri, 18 Feb 2022 10:51:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 7 +++ pages/im/group/apply.vue | 29 ++++-------- pages/im/group/info.vue | 8 ++++ pages/im/group/invite.vue | 94 +++++++++++++++---------------------- pages/im/group/reviewed.vue | 47 +++++++++++++++++++ 5 files changed, 109 insertions(+), 76 deletions(-) create mode 100644 pages/im/group/reviewed.vue diff --git a/pages.json b/pages.json index 6893471..98a5c10 100644 --- a/pages.json +++ b/pages.json @@ -491,6 +491,13 @@ "navigationBarTitleText": "选择联系人" } }, + { + "path": "pages/im/group/reviewed", + "name": "imGroupInvite", + "style": { + "navigationBarTitleText": "群聊邀请确认" + } + }, { "path": "pages/im/group/users", "name": "imGroupUsers", diff --git a/pages/im/group/apply.vue b/pages/im/group/apply.vue index 247545a..f1a1f8c 100644 --- a/pages/im/group/apply.vue +++ b/pages/im/group/apply.vue @@ -1,24 +1,16 @@ @@ -45,6 +37,7 @@ this.targetId = e.targetId // this.targetId = "TG2" joinGroupPre(this.targetId).then(res => { + console.log(res, 'res.返回群的基本信息') this.group = res this.loaded = true }).catch(err => { @@ -62,9 +55,6 @@ url: '/pages/im/group/chat?targetId=' + this.targetId }) }, - applyGroup() { - this.modalShow = true - }, onHideModal() { this.message = '' this.modalShow = false @@ -75,8 +65,8 @@ uni.showToast({ icon: 'none', title: '申请成功', - duration:2000, - mast:true + duration: 2000, + mast: true }) setTimeout(() => { this.$Router.back() @@ -118,7 +108,8 @@ width: 80%; font-size: $title-size; } - .apply-btn2{ + + .apply-btn2 { padding: 0 100rpx; } } diff --git a/pages/im/group/info.vue b/pages/im/group/info.vue index fc10f13..6265cb0 100644 --- a/pages/im/group/info.vue +++ b/pages/im/group/info.vue @@ -7,6 +7,7 @@ + @@ -105,6 +106,7 @@ methods: { initData() { getGroupInfo(this.targetId).then(res => { + console.log(res,'群信息。。。。。') this.group = res.group this.groupName = res.group.name this.announcement = res.announcement @@ -150,6 +152,12 @@ showGroupQrCode() { this.qrCodeShow = true }, + // 群聊邀请待确认 + showGroupsSure(){ + uni.navigateTo({ + url:"/pages/im/group/reviewed" + }) + }, onGroupName() { this.modalShow = true }, diff --git a/pages/im/group/invite.vue b/pages/im/group/invite.vue index 0b7331f..852418a 100644 --- a/pages/im/group/invite.vue +++ b/pages/im/group/invite.vue @@ -2,22 +2,24 @@ - + - - - - - - {{ contact(friendItem.targetId).name }} + + + + + + + + {{ contact(friendItem.targetId).name }} + - - + + { + console.log(res) this.indexs = res.indexList this.friends = res.itemArr }) }, - checkNewFriendPending() { - // 获取是否有新的好友申请 - RongIMLib.getConversationList([RongIMLib.ConversationType.SYSTEM], 1000, 0, (res) => { - if (res.code === 0) { - this.pendingCount = res.conversations.filter((item) => { - return item.objectName == RongIMLib.ObjectName.ContactNotification - }).length - } - }) - }, - toGroup() { - uni.navigateTo({ - url: '/pages/im/group/index', - fail(err) { - console.log(err); - } - }) - }, - toFriend(targetId) { - // uni.navigateTo({ - // url: '/pages/im/friends/info?targetId=' + targetId - // }) - console.log('奥克兰打开') - }, - // 新朋友 - toPending() { - if (this.pendingCount > 0) { - uni.navigateTo({ - url: '/pages/im/friends/pending' - }); - } else { - uni.showToast({ - title: ` 暂无好友申请 ~ `, - icon: "none", - mask: true, - duration: 3000 - }) + + selectFriend(targetId) { + console.log(targetId,typeof targetId) + let arr = this.checkboxValue + let index = arr.findIndex(item => item === targetId) + if(index>0){ + console.log('选择了再次点击清除数据le') + + }else{ + console.log('没有选择过,添加数据') + } - } - }, - onNavigationBarButtonTap(e) { - uni.navigateTo({ - url: '/pages/im/friends/search' - }); + + console.log(this.checkboxValue,index) + console.log('奥克兰打开',targetId) + }, } }; diff --git a/pages/im/group/reviewed.vue b/pages/im/group/reviewed.vue new file mode 100644 index 0000000..cd9e087 --- /dev/null +++ b/pages/im/group/reviewed.vue @@ -0,0 +1,47 @@ + + + + + +