From b96a82ad96f070d4e39805c4f57281d697ea7fe5 Mon Sep 17 00:00:00 2001 From: yangzhe Date: Wed, 17 Dec 2025 16:26:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(home):=20=E6=B7=BB=E5=8A=A0currentDMid?= =?UTF-8?q?=E7=A9=BA=E5=80=BC=E6=A3=80=E6=9F=A5=E9=98=B2=E6=AD=A2=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/index/index.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pages/home/index/index.vue b/pages/home/index/index.vue index 783d8c6..144d51c 100644 --- a/pages/home/index/index.vue +++ b/pages/home/index/index.vue @@ -909,6 +909,8 @@ export default { // 刷新当前对话的消息详情 handleGetConversationDetail() { + if (!this.currentDMid) return; + this.$u.api .GetConversationDetail({ "Item1.Id": this.currentDMid, @@ -932,6 +934,8 @@ export default { // 刷新当前页数据;若当前页为空且页码>1,则自动回退上一页 refreshPageWithFallback() { + if (!this.currentDMid) return; + const currentIndex = this.pageQuery.PageIndex || 1; const pageSize = this.pageQuery.PageSize; @@ -983,6 +987,8 @@ export default { onScrollToUpper() { console.log("触发上拉刷新"); + if (!this.currentDMid) return; + // 如果已经没有更多数据或正在切换对话或当前对话为空(新建对话),不再触发上拉刷新 if (this.noMoreData || this.isSwitchingConversation) { return;