From d4d069ab5aba2efbe82ff008cad5b4b86c4f86a7 Mon Sep 17 00:00:00 2001 From: DCloud_JSON Date: Thu, 20 Jun 2024 17:39:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E7=94=B1=E4=BA=8E?= =?UTF-8?q?=E5=B0=86=E2=80=9Cuser=5Fid=E2=80=9D=E9=94=99=E8=AF=AF=E5=9C=B0?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E2=80=9Cuid=E2=80=9D=E8=80=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E5=9C=A8=E7=BE=A4=E8=81=8A=E5=9C=BA=E6=99=AF=E4=B8=8B?= =?UTF-8?q?=E2=80=9C@=E7=94=A8=E6=88=B7=E2=80=9D=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=B8=AD=EF=BC=8C=E6=B6=88=E6=81=AF=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E9=87=8C=E7=9A=84=E5=B7=B2=E8=AF=BB=E6=9C=AA=E8=AF=BB=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/uni-im-chat-input/uni-im-chat-input.vue | 4 ++-- components/uni-im-editor/uni-im-editor.vue | 2 +- pages/chat/chat.vue | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/uni-im-chat-input/uni-im-chat-input.vue b/components/uni-im-chat-input/uni-im-chat-input.vue index 268d36b..cf7ca1d 100644 --- a/components/uni-im-chat-input/uni-im-chat-input.vue +++ b/components/uni-im-chat-input/uni-im-chat-input.vue @@ -203,7 +203,7 @@ // console.log('focus'); this.$refs.editor.callRmd('$focus') }, - async addCallUser({uid, nickname},needDeleteLeftART = true,DL=0) { + async addCallUser({user_id, nickname},needDeleteLeftART = true,DL=0) { // 隐藏发送语音消息模式 this.soundIsShow = false; @@ -222,7 +222,7 @@ await uniIm.utils.sleep(10) // 提醒末尾的此空格在margin-right: -3px;内,用于解决办法浏览器非文本节点后的光标定位不正确的问题 - const html =`@${nickname} ` + const html =`@${nickname} ` this.addHtmlToCursor(html) // setTimeout(()=>this.$refs.editor.callRmd('$restoreCursor'),500) }, diff --git a/components/uni-im-editor/uni-im-editor.vue b/components/uni-im-editor/uni-im-editor.vue index 4c8c5a4..77003b9 100644 --- a/components/uni-im-editor/uni-im-editor.vue +++ b/components/uni-im-editor/uni-im-editor.vue @@ -360,7 +360,7 @@ // "rich-text": //uniIm.utils.parseHtml( 执行比较消耗内存,改为chat页面 confirm时执行, "html": val, "text": uniImEditor.innerText, - "aboutUserIds": Array.from(uniImEditor.querySelectorAll('.nickname')).map(i=>i.getAttribute('uid')) + "aboutUserIds": Array.from(uniImEditor.querySelectorAll('.nickname')).map(i=>i.getAttribute('user_id')) } } else { param = this.$inputText() diff --git a/pages/chat/chat.vue b/pages/chat/chat.vue index b1a359d..221d88b 100644 --- a/pages/chat/chat.vue +++ b/pages/chat/chat.vue @@ -943,10 +943,10 @@ msgListRef.showLast(duration) } }, - onLongpressMsgAvatar(uid){ + onLongpressMsgAvatar(user_id){ // 当前输入框已经@了的用户id 要过滤掉 let callUidList = this.getCallUid() - if(callUidList.includes(uid)){ + if(callUidList.includes(user_id)){ console.log('此用户id已经@过'); uni.showToast({ title: '此用户已经@过', @@ -955,15 +955,15 @@ }else{ this.$refs['chat-input'].raiseEditor = true this.$nextTick(()=>{ - this.setCallAboutUid(uid,false) + this.setCallAboutUid(user_id,false) }) } }, - setCallAboutUid(uid,needDeleteLeftART = true) { + setCallAboutUid(user_id,needDeleteLeftART = true) { this.aboutMenberIsShow = false this.$refs['chat-input'].addCallUser({ - uid, - nickname: this.group_member[uid].users.nickname + user_id, + nickname: this.group_member[user_id].users.nickname },needDeleteLeftART,this.aboutUserKeyword.length) }, linechange(e) { -- GitLab