From 255ae957b13c23456697726c648fb4af20addadd Mon Sep 17 00:00:00 2001 From: DCloud_JSON Date: Wed, 15 May 2024 21:29:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E7=BD=AE=E9=A1=B6?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E5=AD=98=E5=9C=A8=E6=9C=AA=E8=AF=BB=E5=85=AC?= =?UTF-8?q?=E5=91=8A=EF=BC=8C=E4=B8=94=E6=AD=A4=E5=85=AC=E5=91=8A=E7=A6=BB?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E4=BC=9A=E8=AF=9D=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E6=9D=A1=E6=B6=88=E6=81=AF=E5=9C=A8=2030=20=E6=9D=A1=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=B9=8B=E5=89=8D=EF=BC=88=E8=BF=99=E7=A7=8D=E5=85=AC?= =?UTF-8?q?=E5=91=8A=E4=BC=9A=E7=9B=B4=E6=8E=A5=E4=BB=A5=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=EF=BC=89=EF=BC=8C=E4=B8=94=E6=AD=A4=E6=97=B6?= =?UTF-8?q?=E5=BF=AB=E9=80=9F=E5=88=87=E6=8D=A2=E5=88=B0=E5=8F=A6=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E4=BC=9A=E8=AF=9D=EF=BC=88=E4=BB=8E=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=B8=82=E5=9C=BA=E7=82=B9=E8=BF=9B=E6=9D=A5=E4=BC=9A=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=88=87=E5=88=B0=E6=8C=87=E5=AE=9A=E4=BC=9A=E8=AF=9D?= =?UTF-8?q?=EF=BC=89=E7=A1=AE=E4=BC=9A=E5=BC=B9=E5=87=BA=E7=BD=AE=E9=A1=B6?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E7=9A=84=E5=85=AC=E5=91=8A=E5=86=85=E5=AE=B9?= =?UTF-8?q?=EF=BC=8C=E4=BD=86=E7=82=B9=E5=87=BB=E5=90=8E=E7=9A=84=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E5=85=AC=E5=91=8A=E7=9A=84=E9=80=BB=E8=BE=91=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=90=8C=E6=AD=A5=E5=88=B0=E6=9C=8D=E5=8A=A1=E7=AB=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/uni-im-msg-list/uni-im-msg-list.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/uni-im-msg-list/uni-im-msg-list.vue b/components/uni-im-msg-list/uni-im-msg-list.vue index 90a060d..80e1649 100644 --- a/components/uni-im-msg-list/uni-im-msg-list.vue +++ b/components/uni-im-msg-list/uni-im-msg-list.vue @@ -185,13 +185,19 @@ 'conversation.has_unread_group_notification': { async handler(hasUnreadGroupNotification) { const group_notification = this.conversation?.group_info?.notification + const conversation_id = this.conversationId // 弹出群公告 if (hasUnreadGroupNotification && group_notification && group_notification.content) { await uniIm.utils.sleep(1000) + // TODO 临时解决,公告还没弹出来就切换会话,导致弹出多次 + if(conversation_id !== this.conversationId){ + return + } // 判断列表中是否已经渲染了此群公告,是则 call 当前用户。否则弹框提示 let groupNotificationMsg = [...this.visibleMsgList].reverse().find(msg => msg.action === 'update-group-info-notification') // console.log('groupNotificationMsg', groupNotificationMsg,this.visibleMsgList); + if (groupNotificationMsg) { this.conversation.call_list.push(groupNotificationMsg._id) this.closeGroupNotification() -- GitLab