From 048adef4ea637384dc006dc76a910f859effe634 Mon Sep 17 00:00:00 2001 From: bob <312777916@qq.com> Date: Wed, 21 May 2025 15:38:28 +0800 Subject: [PATCH] bug fixed --- .../components/DialogForMsgHistory.vue | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/views/message/components/DialogForMsgHistory.vue b/src/views/message/components/DialogForMsgHistory.vue index bfb4cba..d548e22 100644 --- a/src/views/message/components/DialogForMsgHistory.vue +++ b/src/views/message/components/DialogForMsgHistory.vue @@ -703,30 +703,29 @@ const pullMsg = async () => { } const loadingInstance = ElLoading.service(el_loading_options) isLoadingMsg.value = true - msgChatHistoryService(params) - .then(async (res) => { - const list = res.data.data.msgList - const totalCount = res.data.data.count - if (totalCount > 0) { - await historyMsgsAddData(list) - isAtbottom.value = false - } + try { + const res = await msgChatHistoryService(params) + const list = res.data.data.msgList + const totalCount = res.data.data.count + if (totalCount > 0) { + await historyMsgsAddData(list) + isAtbottom.value = false + } - // 如果totalCount比pageSize少,说明服务器没有更多数据了 - if (totalCount < pageSize) { - pullDoneFlag.value = true - } + // 如果totalCount比pageSize少,说明服务器没有更多数据了 + if (totalCount < pageSize) { + pullDoneFlag.value = true + } - if (list.length > step) { - endIndex.value += step - } else { - endIndex.value += list.length - } - }) - .finally(() => { - isLoadingMsg.value = false - loadingInstance.close() - }) + if (list.length > step) { + endIndex.value += step + } else { + endIndex.value += list.length + } + } finally { + isLoadingMsg.value = false + loadingInstance.close() + } } let noMoreMsgTipsTimer = null @@ -811,6 +810,7 @@ const handleConfirmTimeFilter = async () => { :name="item.name" >
{ padding: 24px 24px 16px 24px; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3); border-radius: 5px; - background-color: #409eff1a; + background-color: #f5f5f5; .filter-time { :deep(.el-input__wrapper) { border-radius: 25px;