Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
60d41753
authored
Jul 10, 2024
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修复】mall 客服会话消息少时触顶不加载bug
parent
79b6b877
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
src/views/mall/promotion/kefu/components/KeFuMessageList.vue
+2
-6
No files found.
src/views/mall/promotion/kefu/components/KeFuMessageList.vue
View file @
60d41753
...
@@ -138,17 +138,13 @@ const getMessageList = async (val: KeFuConversationRespVO, conversationChange: b
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment