Browse Source

fix: 查询消息异常的bug

master
xsx 7 months ago
parent
commit
cadbe0c6d0
  1. 4
      im-uniapp/store/chatStore.js
  2. 4
      im-web/src/store/chatStore.js

4
im-uniapp/store/chatStore.js

@ -513,10 +513,6 @@ export default defineStore('chatStore', {
if (msgInfo.tmpId == chat.messages[idx].tmpId) { if (msgInfo.tmpId == chat.messages[idx].tmpId) {
return chat.messages[idx]; return chat.messages[idx];
} }
// 如果id比要查询的消息小,说明没有这条消息
if (msgInfo.tmpId > chat.messages[idx].tmpId) {
break;
}
} }
} }
return null; return null;

4
im-web/src/store/chatStore.js

@ -538,10 +538,6 @@ export default defineStore('chatStore', {
if (msgInfo.tmpId == chat.messages[idx].tmpId) { if (msgInfo.tmpId == chat.messages[idx].tmpId) {
return chat.messages[idx]; return chat.messages[idx];
} }
// 如果id比要查询的消息小,说明没有这条消息
if (msgInfo.tmpId > chat.messages[idx].tmpId) {
break;
}
} }
} }
} }

Loading…
Cancel
Save