From baaa8e4bbb7e704c707fcf40e57e5a784e913ac9 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Thu, 20 Apr 2023 15:38:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E7=BE=A4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/socket.js | 13 ++- .../newMap/display/newChat/chatDialog.vue | 108 +++++++++++++++--- 2 files changed, 104 insertions(+), 17 deletions(-) diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 56145740d..16a91edec 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -120,7 +120,14 @@ const socket = { conversationMessage: {}, controlTransfer: {}, operationModeApplyList: [], // 模式转换消息列表 - conversationGroup: {} // 群组消息 + conversationGroup: { // 群组 + JOIN: {}, // 创建或加入群组 + UPDATE_NAME: {}, // 更新名称 + UPDATE_MEMBER: {}, // 更新群成员 + EXIT: {}, // 退群 + MESSAGE: {}, // 消息 + MESSAGE_STATUS: {} // 消息状态 + } }, getters: { }, @@ -409,7 +416,9 @@ const socket = { }); }, setConversationGroup: (state, message) => { - state.conversationGroup = message; + if (state.conversationGroup[message.messageType] !== undefined) { + state.conversationGroup[message.messageType] = message; + } } }, diff --git a/src/views/newMap/display/newChat/chatDialog.vue b/src/views/newMap/display/newChat/chatDialog.vue index 345c28778..55ffda5c5 100644 --- a/src/views/newMap/display/newChat/chatDialog.vue +++ b/src/views/newMap/display/newChat/chatDialog.vue @@ -39,20 +39,27 @@