提交 d4d069ab 编写于 作者: DCloud_JSON's avatar DCloud_JSON

修复 由于将“user_id”错误地改为“uid”而导致在群聊场景下“@用户”的功能中,消息内容里的已读未读图标无法显示的问题。

上级 43d10d6c
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
// console.log('focus'); // console.log('focus');
this.$refs.editor.callRmd('$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; this.soundIsShow = false;
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
await uniIm.utils.sleep(10) await uniIm.utils.sleep(10)
// 提醒末尾的此空格在margin-right: -3px;内,用于解决办法浏览器非文本节点后的光标定位不正确的问题 // 提醒末尾的此空格在margin-right: -3px;内,用于解决办法浏览器非文本节点后的光标定位不正确的问题
const html =`<span class="nickname" contenteditable="false" uid="${uid}">@${nickname}</span>&nbsp;` const html =`<span class="nickname" contenteditable="false" user_id="${user_id}">@${nickname}</span>&nbsp;`
this.addHtmlToCursor(html) this.addHtmlToCursor(html)
// setTimeout(()=>this.$refs.editor.callRmd('$restoreCursor'),500) // setTimeout(()=>this.$refs.editor.callRmd('$restoreCursor'),500)
}, },
......
...@@ -360,7 +360,7 @@ ...@@ -360,7 +360,7 @@
// "rich-text": //uniIm.utils.parseHtml( 执行比较消耗内存,改为chat页面 confirm时执行, // "rich-text": //uniIm.utils.parseHtml( 执行比较消耗内存,改为chat页面 confirm时执行,
"html": val, "html": val,
"text": uniImEditor.innerText, "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 { } else {
param = this.$inputText() param = this.$inputText()
......
...@@ -943,10 +943,10 @@ ...@@ -943,10 +943,10 @@
msgListRef.showLast(duration) msgListRef.showLast(duration)
} }
}, },
onLongpressMsgAvatar(uid){ onLongpressMsgAvatar(user_id){
// 当前输入框已经@了的用户id 要过滤掉 // 当前输入框已经@了的用户id 要过滤掉
let callUidList = this.getCallUid() let callUidList = this.getCallUid()
if(callUidList.includes(uid)){ if(callUidList.includes(user_id)){
console.log('此用户id已经@过'); console.log('此用户id已经@过');
uni.showToast({ uni.showToast({
title: '此用户已经@过', title: '此用户已经@过',
...@@ -955,15 +955,15 @@ ...@@ -955,15 +955,15 @@
}else{ }else{
this.$refs['chat-input'].raiseEditor = true this.$refs['chat-input'].raiseEditor = true
this.$nextTick(()=>{ this.$nextTick(()=>{
this.setCallAboutUid(uid,false) this.setCallAboutUid(user_id,false)
}) })
} }
}, },
setCallAboutUid(uid,needDeleteLeftART = true) { setCallAboutUid(user_id,needDeleteLeftART = true) {
this.aboutMenberIsShow = false this.aboutMenberIsShow = false
this.$refs['chat-input'].addCallUser({ this.$refs['chat-input'].addCallUser({
uid, user_id,
nickname: this.group_member[uid].users.nickname nickname: this.group_member[user_id].users.nickname
},needDeleteLeftART,this.aboutUserKeyword.length) },needDeleteLeftART,this.aboutUserKeyword.length)
}, },
linechange(e) { linechange(e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册