From 5fc2a1ad493ceb979edb45bc266e714bbab602d2 Mon Sep 17 00:00:00 2001 From: DCloud_JSON Date: Thu, 25 Apr 2024 11:38:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=8F=91=E9=80=81=E8=80=85=E4=B8=BA=E9=9D=9Estaff=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E7=9A=84=E7=AE=A1=E7=90=86=E5=91=98=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E7=82=B9=E5=87=BB=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/types/rich-text.vue | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/components/uni-im-msg/types/rich-text.vue b/components/uni-im-msg/types/rich-text.vue index 06b803b..a41b00a 100644 --- a/components/uni-im-msg/types/rich-text.vue +++ b/components/uni-im-msg/types/rich-text.vue @@ -125,8 +125,9 @@ if(this.uniIDHasRole('staff')){ return true } - const {group_member} = uniIm.convasation?.dataList?.find(item => item.id === this.msg.conversation_id)||{} - return group_member ? group_member[currentUserId]?.role.includes('admin') : false + const {conversation_id,from_uid} = this.msg + const {group_member} = uniIm.conversation.getCached(conversation_id) + return group_member ? group_member[from_uid]?.role.includes('admin') : false } }, methods: { @@ -156,15 +157,15 @@ }) }, privateChat(user_id) { - if (this.canPrivateChat) { - if (uniIm.isWidescreen) { - uni.$emit('uni-im-toChat', { - user_id - }) - } else { - uni.navigateTo({ - url: '/uni_modules/uni-im/pages/chat/chat?user_id=' + user_id, - animationDuration: 300 + if (this.canPrivateChat) { + if (uniIm.isWidescreen) { + uni.$emit('uni-im-toChat', { + user_id + }) + } else { + uni.navigateTo({ + url: '/uni_modules/uni-im/pages/chat/chat?user_id=' + user_id, + animationDuration: 300 }) } } -- GitLab