Browse Source

修复被@后一直点不掉的bug

master
xie.bx 2 years ago
parent
commit
78af8b199e
  1. 3
      im-ui/src/store/chatStore.js
  2. 4
      im-uniapp/store/chatStore.js

3
im-ui/src/store/chatStore.js

@ -151,7 +151,8 @@ export default {
chat.unreadCount++; chat.unreadCount++;
} }
// 是否有人@我 // 是否有人@我
if(!msgInfo.selfSend && chat.type=="GROUP" && msgInfo.atUserIds){ if(!msgInfo.selfSend && chat.type=="GROUP" && msgInfo.atUserIds
&& msgInfo.status != MESSAGE_STATUS.READED){
let userId = userStore.state.userInfo.id; let userId = userStore.state.userInfo.id;
if(msgInfo.atUserIds.indexOf(userId)>=0){ if(msgInfo.atUserIds.indexOf(userId)>=0){
chat.atMe = true; chat.atMe = true;

4
im-uniapp/store/chatStore.js

@ -143,13 +143,13 @@ export default {
chat.lastSendTime = msgInfo.sendTime; chat.lastSendTime = msgInfo.sendTime;
chat.sendNickName = msgInfo.sendNickName; chat.sendNickName = msgInfo.sendNickName;
} }
// 未读加1 // 未读加1
if (!msgInfo.selfSend && msgInfo.status != MESSAGE_STATUS.READED) { if (!msgInfo.selfSend && msgInfo.status != MESSAGE_STATUS.READED) {
chat.unreadCount++; chat.unreadCount++;
} }
// 是否有人@我 // 是否有人@我
if(!msgInfo.selfSend && chat.type=="GROUP" && msgInfo.atUserIds){ if(!msgInfo.selfSend && chat.type=="GROUP" && msgInfo.atUserIds
&& msgInfo.status != MESSAGE_STATUS.READED){
let userId = userStore.state.userInfo.id; let userId = userStore.state.userInfo.id;
if(msgInfo.atUserIds.indexOf(userId)>=0){ if(msgInfo.atUserIds.indexOf(userId)>=0){
chat.atMe = true; chat.atMe = true;

Loading…
Cancel
Save