From a01b8c957a05bef33b4dde0bc74d7f9030bf5a44 Mon Sep 17 00:00:00 2001 From: JiXinHui <985276981@qq.com> Date: Thu, 19 Mar 2026 15:36:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=AE=9E=E6=97=B6=E9=80=9A=E4=BF=A1?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E9=94=99=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/App.vue b/App.vue index 804e6d0..2c75b91 100644 --- a/App.vue +++ b/App.vue @@ -232,20 +232,31 @@ export default { message: data.Message, }; const id = data.Id || data.id || Math.random().toString(36).substring(2); - const msg = { - ...processData, - messageType: 0, - filePath: "", - id, - }; - const storeState = (this.$store && this.$store.state) || {}; - const isTransferChat = !!storeState.vuex_isTransferChat; - - if (isTransferChat) { - this.$store.commit("push_AiLiveAgentMsg", msg); - } else { - this.$store.commit("push_Msg", msg); - } + const msg = { + ...processData, + messageType: 0, + filePath: "", + id, + }; + const storeState = (this.$store && this.$store.state) || {}; + const isTransferChat = !!storeState.vuex_isTransferChat; + const activeDialogueId = + storeState.vuex_msgUser?.dialogueManagementId || + storeState.vuex_msgUser?.friendId || + storeState.vuex_msgUser?.id; + const isActiveChat = + activeDialogueId && + String(activeDialogueId) === String(processData.dialogueManagementId); + + if (isTransferChat) { + if (isActiveChat) { + this.$store.commit("push_AiLiveAgentMsg", msg); + } + } else { + if (isActiveChat) { + this.$store.commit("push_Msg", msg); + } + } // 更新会话列表的未读数 / 文案 / 时间,保持实时展示 if (processData.dialogueManagementId) {