From c51201e3082c3e233179178bcfc5a1112d839431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Fri, 27 Jun 2025 10:46:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=83=85=E7=BB=AA=E5=A4=A7=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=B8=A9=E5=BA=A6=E8=AE=A1=E9=83=A8=E5=88=86=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=94=9F=E6=95=88=EF=BC=9B=E7=82=B9=E5=87=BB=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E5=90=8E=E6=89=80=E6=9C=89=E8=AE=B0=E5=BD=95=E6=B8=85=E7=A9=BA?= =?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 | 44 ++++++++++++++++++++++++++++++ src/views/components/marketTemperature.vue | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/views/AiEmotion.vue b/src/views/AiEmotion.vue index d3e2cba..ec7cb85 100644 --- a/src/views/AiEmotion.vue +++ b/src/views/AiEmotion.vue @@ -318,6 +318,50 @@ const parsedConclusion = computed(() => { +// 监听股票列表变化,当列表为空时隐藏页面数据 +watch(() => emotionStore.stockList, (newStockList) => { + if (newStockList.length === 0) { + // 当股票列表为空时,隐藏页面数据 + isPageLoaded.value = false; + // 停止音频播放 + stopAudio(); + // 清理音频URL + audioUrl.value = ''; + emotionAudioStore.resetAudioState(); + // 清理打字机效果 + clearTypewriterTimers(); + // 重置所有状态 + hasTriggeredAudio.value = false; + hasTriggeredTypewriter.value = false; + stockTypewriterShown.value.clear(); + stockAudioPlayed.value.clear(); + // 清理显示的文本和标题 + displayedTexts.value = { + one1: '', + one2: '', + two: '', + three: '', + four: '', + disclaimer: '' + }; + displayedTitles.value = { + one: '', + two: '', + three: '', + four: '' + }; + // 隐藏所有模块 + moduleVisibility.value = { + one: false, + two: false, + three: false, + four: false, + disclaimer: false + }; + console.log('股票列表已清空,页面数据已隐藏'); + } +}, { deep: true }); + // 监听当前股票变化,重新渲染图表 watch(currentStock, (newStock) => { if (newStock && newStock.apiData) { diff --git a/src/views/components/marketTemperature.vue b/src/views/components/marketTemperature.vue index a72239c..f5f5d40 100644 --- a/src/views/components/marketTemperature.vue +++ b/src/views/components/marketTemperature.vue @@ -367,7 +367,7 @@ function initChart(raw, klineDataRawValue, WDRLValue) { textStyle: { color: 'white' }, - bottom: "5%", // 下移数据缩放滑块 + bottom: "0%", // 下移数据缩放滑块 }, { type: 'inside',