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',