From c4b4ec323a9185fda52979324f9b26b87e2a12cf Mon Sep 17 00:00:00 2001 From: wangyifeng <812766448@qq.com> Date: Fri, 7 Mar 2025 16:14:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E8=81=8A=E5=A4=A9=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=AF=B7=E6=B1=82=E7=89=B9=E6=AE=8A=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useTalkRecord.js | 3 ++- src/pages/dialog/index.vue | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hooks/useTalkRecord.js b/src/hooks/useTalkRecord.js index 51596b1..f9dcc76 100644 --- a/src/hooks/useTalkRecord.js +++ b/src/hooks/useTalkRecord.js @@ -114,7 +114,8 @@ export const useTalkRecord = (uid) => { ) zpagingComplete(dialogueStore.index_name, reverseItems) const dialogueList = getDialogueList(dialogueStore.index_name) - loadConfig.status = dialogueList.records?.[0]?.sequence > 1 ? 1 : 2 + loadConfig.status = + dialogueList.records?.[0]?.sequence > 1 && data?.items?.length > 0 ? 1 : 2 // loadConfig.cursor = data.cursor nextTick(() => { diff --git a/src/pages/dialog/index.vue b/src/pages/dialog/index.vue index 474e2dc..b08a70c 100644 --- a/src/pages/dialog/index.vue +++ b/src/pages/dialog/index.vue @@ -831,9 +831,9 @@ watch( (newValue, oldValue) => { if (newValue) { const dialogueList = getDialogueList(talkParams.index_name) - console.log(newValue[newValue.length - 1].sequence, dialogueList.records?.[0]?.sequence) + // console.log(newValue[newValue.length - 1]?.sequence, dialogueList?.records?.[0]?.sequence) if ( - newValue[newValue.length - 1].sequence === + newValue[newValue.length - 1]?.sequence === dialogueList.records?.[0]?.sequence ) { //相同意味着分页加载缓存中的聊天记录完毕