From dfc58676f96cbc6d1ac0f647f181d263fe83ff1e Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 16 Feb 2022 18:04:53 +0800 Subject: [PATCH 1/4] clean --- pages/im/index.vue | 2 -- utils/im/index.js | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pages/im/index.vue b/pages/im/index.vue index 111ce88..eb0df3c 100644 --- a/pages/im/index.vue +++ b/pages/im/index.vue @@ -56,7 +56,6 @@ this.checkNewFriendPending() // 监听新的好友申请 uni.$on('onContactNotification', () => { - console.log('监听申请'); this.checkNewFriendPending() }) }, @@ -77,7 +76,6 @@ }, methods: { checkNewFriendPending() { - console.log('触发新申请好友事件'); im.getPendingList((pendings) => { console.log(pendings); this.hasNewFriends = pendings.length diff --git a/utils/im/index.js b/utils/im/index.js index e508f78..3f7d26c 100644 --- a/utils/im/index.js +++ b/utils/im/index.js @@ -160,9 +160,8 @@ const addListeners = () => { console.log('消息删除结果', code) }) } else if (message.objectName === RongIMLib.ObjectName.ContactNotification) { - console.log('onContactNotification'); // 触发一个新好友的通知事件 - uni.$emit('onContactNotification', message.content) + uni.$emit('onContactNotification', message) } }) From 3a3517b5bee565c40e6ab9775a591ca89fe1fc87 Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 17 Feb 2022 09:37:05 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=BE=A4=E7=9A=84=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 12292 -> 14340 bytes pages/im/components/groupUserList.vue | 92 ++++++++++++++------------ pages/im/group/chat.nvue | 33 +++++++-- pages/im/private/chat.nvue | 4 +- 4 files changed, 81 insertions(+), 48 deletions(-) diff --git a/.DS_Store b/.DS_Store index 0451fa5350573968a44737610eb8813fa8341acb..c1a2c05689ed421f0ce5b68a5d14a53025647039 100644 GIT binary patch delta 210 zcmZokXem%&U|?W$DortDU@!nOIe-{M3-ADmHUC;gB?JT~>nezEekh^EKCwY^Gdl+h2cyPj4S~n}6B}eUb1R%< z+WcQBpJlQDkX%;9A@(M`YU~-Ph#LbsgN|~S*)BymjsWe9b diff --git a/pages/im/components/groupUserList.vue b/pages/im/components/groupUserList.vue index 5a3cfcf..ad222ad 100644 --- a/pages/im/components/groupUserList.vue +++ b/pages/im/components/groupUserList.vue @@ -3,13 +3,16 @@ - + + + 管理 + 群主 + {{ item.name }} - 管理 - 群主 - + 邀请好友 @@ -58,17 +61,16 @@ currentUser: {}, avatarSize: 40 } - }, - computed: { - contact() { - return function(targetId) { - return this.$store.getters.contactInfo(targetId) - } - } + }, + computed: { + contact() { + return function(targetId) { + return this.$store.getters.contactInfo(targetId) + } + } }, created() { - this.avatarSize = 126 / 750 * wx.getSystemInfoSync().windowWidth - console.log(this.avatarSize) + this.avatarSize = 90 / 750 * wx.getSystemInfoSync().windowWidth }, mounted() { this.initGroupInfo() @@ -237,7 +239,6 @@ } -