From e0beca81d2cc0ea3b818aa5d85fe285c0e79bfe9 Mon Sep 17 00:00:00 2001 From: no99 <17663930442@163.com> Date: Sat, 16 Aug 2025 09:37:36 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E7=89=88=E5=9B=9E?= =?UTF-8?q?=E7=BB=9D=E6=96=87=E6=A1=88=E6=BA=A2=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AIchat.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/AIchat.vue b/src/views/AIchat.vue index 1e176b6..779405b 100644 --- a/src/views/AIchat.vue +++ b/src/views/AIchat.vue @@ -1178,7 +1178,7 @@ watch( class: "ing", type: "ing", flag: flag, - content: aiContent, + content: AIcontent, }); chatStore.isLoading = false; @@ -5088,7 +5088,7 @@ p { .ai-message-content { display: flex; align-items: center; - white-space: nowrap; + /* white-space: nowrap; */ width: fit-content; overflow: visible; } From cc952e012199b71dbe2e90adb99c50ea6588a21a Mon Sep 17 00:00:00 2001 From: no99 <17663930442@163.com> Date: Sat, 16 Aug 2025 09:53:31 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=AD=A3=E5=9C=A8=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E9=9F=B3=E9=A2=91=E7=9A=84=E8=BF=87=E7=A8=8B?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E5=8F=91=E9=80=81=E6=B6=88=E6=81=AF=E5=90=8E?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E6=96=B0=E9=9F=B3=E9=A2=91=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=97=A7=E9=9F=B3=E9=A2=91=E6=8C=89=E9=92=AE=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=9C=AA=E6=94=B9=E5=8F=98=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AIchat.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/views/AIchat.vue b/src/views/AIchat.vue index 779405b..f0ffef9 100644 --- a/src/views/AIchat.vue +++ b/src/views/AIchat.vue @@ -1064,6 +1064,10 @@ watch( previousMessagesLength.value = newVal.length; if (newVal.length > 0) { // 清理语音下标 + console.log("chatStore.currentUserIndex", chatStore.currentUserIndex); + if (chatStore.currentUserIndex!=null) { + chatStore.messages[chatStore.currentUserIndex].audioStatus = false; + } chatStore.currentUserIndex = null; audioStore.stop(); // 暂停语音 From 4b7b2b0258557f0f609b35bb850a08627b56c188 Mon Sep 17 00:00:00 2001 From: no99 <17663930442@163.com> Date: Sat, 16 Aug 2025 14:50:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=83=85=E7=BB=AA=E5=A4=A7=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=92=8C=E5=A4=BA=E5=AE=9D=E5=A5=87=E5=85=B5=E5=A4=A7?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E5=88=86=E5=BC=80=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/chat.js | 2 ++ src/views/components/HistoryRecord.vue | 51 ++++++++++++++++++++++++++++++---- src/views/homePage.vue | 5 ++++ 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/src/store/chat.js b/src/store/chat.js index 757df8d..98f8a88 100644 --- a/src/store/chat.js +++ b/src/store/chat.js @@ -11,6 +11,8 @@ export const useChatStore = defineStore("chat", { searchRecord: false, currentUserIndex: null, announcementMsg: null, + aiChatCall:false, + aiEmotionCall:false }), actions: { async getUserCount() { diff --git a/src/views/components/HistoryRecord.vue b/src/views/components/HistoryRecord.vue index fceb264..054d7a1 100644 --- a/src/views/components/HistoryRecord.vue +++ b/src/views/components/HistoryRecord.vue @@ -96,7 +96,7 @@
- {{ record.stockName }} + {{ record.stockName }} ({{ record.stockCode }})
{ const historyRecords = ref([]); const categoryHistory = ref([]); -let firstFlag = false; +let chatFirstFlag = true; +let emotionTirstFlag = true; const getHistoryList = async (params) => { try { const result = await getHistoryListAPI(params); historyRecords.value = result.data; let remainingRecords = result.data; // 复制原数组 - console.log("result", result.data, "firstFlag", firstFlag); - if (result.data.length != 0 && !firstFlag) { + console.log( + "params", + params, + "result", + result.data, + "chatFirstFlag", + chatFirstFlag, + "emotionTirstFlag", + emotionTirstFlag + ); + + if (chatFirstFlag && params.model == 1 && result.data.length != 0) { const userAgent = navigator.userAgent; if ( !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( userAgent ) ) { - isCollapsed.value = false; + chatStore.aiChatCall = true; } - firstFlag = true; + chatFirstFlag = false; } + if (emotionTirstFlag && params.model == 2 && result.data.length != 0) { + const userAgent = navigator.userAgent; + if ( + !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( + userAgent + ) + ) { + chatStore.aiEmotionCall = true; + } + emotionTirstFlag = false; + } + + if (props.currentType == "AIchat") { + isCollapsed.value = !chatStore.aiChatCall; + } else { + isCollapsed.value = !chatStore.aiEmotionCall; + } + // 1. 筛选置顶记录 let topList = remainingRecords.filter((record) => record.isTop === 1); remainingRecords = remainingRecords.filter((record) => record.isTop !== 1); @@ -606,10 +635,20 @@ const openHistory = () => { // token: localStorage.getItem("localToken"), // }); isCollapsed.value = false; + if (props.currentType == "AIchat") { + chatStore.aiChatCall = true; + } else if (props.currentType == "AiEmotion") { + chatStore.aiEmotionCall = true; + } }; const closeHistory = () => { isCollapsed.value = true; + if (props.currentType == "AIchat") { + chatStore.aiChatCall = false; + } else if (props.currentType == "AiEmotion") { + chatStore.aiEmotionCall = false; + } }; const openDetail = (record) => { diff --git a/src/views/homePage.vue b/src/views/homePage.vue index ae0e851..fee536e 100644 --- a/src/views/homePage.vue +++ b/src/views/homePage.vue @@ -634,6 +634,11 @@ const expandHistory = () => { ) { console.log("存在"); historyRecordRef.value.isCollapsed = !historyRecordRef.value.isCollapsed; + if (activeTab.value == "AIchat") { + chatStore.aiChatCall = true; + } else if (activeTab.value == "AiEmotion") { + chatStore.aiEmotionCall = true; + } } };