【功能完善】商城: 客服消息JSON 化

This commit is contained in:
puhui999
2024-11-10 16:36:05 +08:00
parent 649c24ed51
commit b9e1529623
4 changed files with 21 additions and 17 deletions

View File

@ -57,7 +57,6 @@ watchEffect(() => {
if (type === WebSocketMessageTypeConstants.KEFU_MESSAGE_TYPE) {
const message = JSON.parse(jsonMessage.content)
// 刷新会话列表
// TODO @puhui999不应该刷新列表而是根据消息本地 update 列表的数据;
kefuStore.updateConversation(message.conversationId)
// 刷新消息列表
keFuChatBoxRef.value?.refreshMessageList(message)
@ -66,7 +65,7 @@ watchEffect(() => {
// 2.3 消息类型KEFU_MESSAGE_ADMIN_READ
if (type === WebSocketMessageTypeConstants.KEFU_MESSAGE_ADMIN_READ) {
// 更新会话已读
kefuStore.updateConversationStatus(JSON.parse(jsonMessage.content)?.id)
kefuStore.updateConversationStatus(JSON.parse(jsonMessage.content))
}
} catch (error) {
console.error(error)