From 0ac0744283a7113165e1618417033570ec9c1feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Fri, 15 Aug 2025 17:19:42 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E4=B8=AA=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E8=AF=B7=E6=B1=82=E5=A4=B1=E8=B4=A5=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E5=8F=91msg?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AiEmotion.vue | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/views/AiEmotion.vue b/src/views/AiEmotion.vue index 16fc6af..ed43dae 100644 --- a/src/views/AiEmotion.vue +++ b/src/views/AiEmotion.vue @@ -2151,16 +2151,17 @@ async function handleSendMessage(input, onComplete) { // 关闭加载状态和等待提示,返回refuse信息,停止图片旋转,恢复历史数据 // isLoading.value = false; isPageLoaded.value = false; + const refuseMessage = response && response.msg ? response.msg : "接口返回数据异常,请重试"; const aiMessage = reactive({ sender: "ai", - text: processRefuseMessage(parsedData.refuse), + text: processRefuseMessage(refuseMessage), }); messages.value.push(aiMessage); // 将AI消息添加到emotion store中 emotionStore.addConversation({ sender: "ai", - text: processRefuseMessage(parsedData.refuse), + text: processRefuseMessage(refuseMessage), timestamp: new Date().toISOString(), }); isRotating.value = false; @@ -2372,18 +2373,6 @@ async function handleSendMessage(input, onComplete) { isPageLoaded.value = false; } - const aiMessage = reactive({ - sender: "ai", - text: "请求工作流接口失败,请检查网络连接", - }); - messages.value.push(aiMessage); - - // 将AI消息添加到emotion store中 - emotionStore.addConversation({ - sender: "ai", - text: "请求工作流接口失败,请检查网络连接", - timestamp: new Date().toISOString(), - }); // 请求失败时停止图片旋转,恢复历史数据 isRotating.value = false; messages.value = [...previousMessages, ...messages.value]; From b4474927b1e08df2d793906b8a158e3c37c4fe10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Fri, 15 Aug 2025 17:29:25 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E6=8E=A5=E5=8F=A3=E5=A4=B1=E8=B4=A5=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E8=AF=AD=E5=AE=BD=E5=BA=A6=E8=B6=85=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AiEmotion.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/AiEmotion.vue b/src/views/AiEmotion.vue index ed43dae..2ac5a05 100644 --- a/src/views/AiEmotion.vue +++ b/src/views/AiEmotion.vue @@ -4273,7 +4273,7 @@ const emit = defineEmits(["updateMessage", "sendMessage", "ensureAIchat"]); text-align: left; margin-right: auto; /* 将AI消息保持在左边 */ - white-space: nowrap; + /* white-space: nowrap; */ width: fit-content; overflow: visible; align-items: center; From df0f904764643fd06ae82a2282fee6885afe83ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Fri, 15 Aug 2025 17:36:54 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=83=85=E7=BB=AA=E8=83=BD=E9=87=8F?= =?UTF-8?q?=E8=BD=AC=E5=8C=96=E5=99=A8=E4=B8=AD=E6=83=85=E7=BB=AA=E4=B8=B4?= =?UTF-8?q?=E7=95=8C=E5=8C=BA=E5=AD=97=E4=BD=93=E9=A2=9C=E8=89=B2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/emoEnergyConverter.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/components/emoEnergyConverter.vue b/src/views/components/emoEnergyConverter.vue index 9019815..559a7ca 100644 --- a/src/views/components/emoEnergyConverter.vue +++ b/src/views/components/emoEnergyConverter.vue @@ -152,7 +152,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) { max: qxnlzhqData.js, name: "【情绪临界区】", color: "#FFC0AA", - fontColor: 'white', + fontColor: '#2D2D89', NumberColor: 'white', }, ]; From 6e85ce23381400b285c23534fd2ba858d250c65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Fri, 15 Aug 2025 17:59:23 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E7=AB=AF=E6=A0=B7=E5=BC=8F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AiEmotion.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/AiEmotion.vue b/src/views/AiEmotion.vue index 2ac5a05..b882636 100644 --- a/src/views/AiEmotion.vue +++ b/src/views/AiEmotion.vue @@ -4528,16 +4528,16 @@ const emit = defineEmits(["updateMessage", "sendMessage", "ensureAIchat"]); height: auto; } - .main { + /* .main { min-height: 100px; height: auto; box-sizing: border-box; background-color: #02107d; margin-bottom: 10rem; - } + } */ .emotion-decoder-section { - width: 80%; + width: 80vw; height: auto; margin: 0 auto; /* min-height: 38rem; */ @@ -4719,7 +4719,7 @@ const emit = defineEmits(["updateMessage", "sendMessage", "ensureAIchat"]); .bottom-radar-section { background-size: 100% 100%; background-repeat: no-repeat; - width: 80%; + width: 80vw; height: auto; /* min-height: 48rem; */ } @@ -4727,7 +4727,7 @@ const emit = defineEmits(["updateMessage", "sendMessage", "ensureAIchat"]); .energy-converter-section { background-size: 100% 100%; background-repeat: no-repeat; - width: 80%; + width: 80vw; height: auto; margin: 0 auto; min-height: 55vh; @@ -4797,7 +4797,7 @@ const emit = defineEmits(["updateMessage", "sendMessage", "ensureAIchat"]); /* 超小屏幕设备 */ @media only screen and (max-width: 480px) { .main { - width: 100%; + width: 90%; padding: 0.3rem; margin-bottom: 3rem; } From 5cb72d6775bad13bc6b591805a817845db53c574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Fri, 15 Aug 2025 19:25:24 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=83=85=E7=BB=AA=E5=A4=A7=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=96=87=E5=8F=AD=E9=A2=9C=E8=89=B2=E6=A0=A1=E6=AD=A3?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AiEmotion.vue | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/views/AiEmotion.vue b/src/views/AiEmotion.vue index b882636..446af76 100644 --- a/src/views/AiEmotion.vue +++ b/src/views/AiEmotion.vue @@ -1664,6 +1664,13 @@ const playNextAudio = () => { emotionAudioStore.nowSound = null; isCallingPlayNext = false; + // 重置当前股票的音频播放状态(所有音频播放完成后按钮应该变暗) + const currentStock = emotionStore.activeStock; + if (currentStock) { + console.log('所有音频播放完成,重置当前股票音频状态:', currentStock.stockInfo?.name); + setStockAudioState(currentStock, { isPlaying: false, isPaused: false }); + } + // 调用完成回调(如果有的话) if ( audioInfo.onComplete && @@ -1681,6 +1688,13 @@ const playNextAudio = () => { emotionAudioStore.playbackPosition = 0; isAudioPlaying.value = false; isPlayingQueueAudio.value = false; + + // 重置当前股票的音频播放状态(音频被停止时按钮应该变暗) + const currentStock = emotionStore.activeStock; + if (currentStock) { + console.log('音频被停止,重置当前股票音频状态:', currentStock.stockInfo?.name); + setStockAudioState(currentStock, { isPlaying: false, isPaused: false }); + } }, onerror: (error) => { console.error(`${audioInfo.name}音频播放失败:`, error); @@ -1844,6 +1858,13 @@ function playAudioQueue( } } else { console.log(`总共找到 ${audioQueue.value.length} 个音频,准备播放`); + + // 设置当前股票的音频播放状态为播放中(自动播放时按钮应该是亮的) + const currentStock = emotionStore.activeStock; + if (currentStock) { + console.log('设置当前股票音频状态为播放中:', currentStock.stockInfo?.name); + setStockAudioState(currentStock, { isPlaying: true, isPaused: false }); + } } } catch (error) { console.error("处理音频播放失败:", error);