【修复】mall 客服会话消息少时触顶不加载bug

This commit is contained in:
puhui999 2024-07-10 21:02:10 +08:00
parent 79b6b87721
commit 60d4175396

View File

@ -138,17 +138,13 @@ const getMessageList = async (val: KeFuConversationRespVO, conversationChange: b
} }
conversation.value = val conversation.value = val
queryParams.conversationId = val.id queryParams.conversationId = val.id
//
if (skipGetMessageList.value) {
return
}
const res = await KeFuMessageApi.getKeFuMessagePage(queryParams) const res = await KeFuMessageApi.getKeFuMessagePage(queryParams)
total.value = res.total total.value = res.total
// //
if (queryParams.pageNo === 1) { if (queryParams.pageNo === 1) {
messageList.value = res.list messageList.value = res.list
} else { } else {
// //
for (const item of res.list) { for (const item of res.list) {
if (messageList.value.some((val) => val.id === item.id)) { if (messageList.value.some((val) => val.id === item.id)) {
continue continue