diff --git a/im-uniapp/store/chatStore.js b/im-uniapp/store/chatStore.js index 089b337..dd2e46d 100644 --- a/im-uniapp/store/chatStore.js +++ b/im-uniapp/store/chatStore.js @@ -527,7 +527,7 @@ export default defineStore('chatStore', { continue; } if (msgInfo.tmpId == m.tmpId) { - return idx; + return m; } // 如果id比要查询的消息小,说明没有这条消息 if (m.tmpId && m.tmpId < msgInfo.tmpId) { diff --git a/im-web/src/store/chatStore.js b/im-web/src/store/chatStore.js index 7b040d3..5a5d691 100644 --- a/im-web/src/store/chatStore.js +++ b/im-web/src/store/chatStore.js @@ -555,7 +555,7 @@ export default defineStore('chatStore', { continue; } if (msgInfo.tmpId == m.tmpId) { - return idx; + return m; } // 如果id比要查询的消息小,说明没有这条消息 if (m.tmpId && m.tmpId < msgInfo.tmpId) {