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;