From 144d8afc3740343711890322c38cc4bfecfc7a68 Mon Sep 17 00:00:00 2001 From: no99 <17663930442@163.com> Date: Fri, 10 Oct 2025 14:06:10 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=9C=A8=E5=A4=BA=E5=AE=9D=E5=A5=87=E5=85=B5?= =?UTF-8?q?=E5=A4=A7=E6=A8=A1=E5=9E=8B=E7=82=B9=E5=87=BB=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=90=8E=EF=BC=8C=E5=86=8D=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=88=B0=E6=B7=B1=E5=BA=A6=E4=B9=9D=E5=A4=A7=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E4=BC=9A=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98=E7=9A=84?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=202.=E6=B7=B1=E5=BA=A6=E4=B9=9D=E5=A4=A7?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E7=82=B9=E5=87=BB=E5=8E=86=E5=8F=B2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E5=90=8E=EF=BC=8C=E6=BB=9A=E5=8A=A8=E5=88=B0=E9=A1=B6?= =?UTF-8?q?=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/HistoryRecord.vue | 8 ++++++-- src/views/deepNine.vue | 1 + src/views/homePage.vue | 13 ++++++++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/views/components/HistoryRecord.vue b/src/views/components/HistoryRecord.vue index 8d1c1a6..b9d59a5 100644 --- a/src/views/components/HistoryRecord.vue +++ b/src/views/components/HistoryRecord.vue @@ -750,8 +750,12 @@ const selectRecord = async (record) => { } dataStore.isFeedback = false; historyData.value = result.data; - chatStore.dbqbClickRecord = historyData.value; - deepNineStore.dbqbClickRecord = historyData.value; + if (props.currentType == "AIchat") { + chatStore.dbqbClickRecord = historyData.value; + } + if (props.currentType == "deepNine") { + deepNineStore.dbqbClickRecord = historyData.value; + } // 构造股票数据对象,保持与现有结构一致 const stockData = { queryText: result.data.keyword, // 使用记录中的keyword字段作为查询文本 diff --git a/src/views/deepNine.vue b/src/views/deepNine.vue index c654723..fc073bf 100644 --- a/src/views/deepNine.vue +++ b/src/views/deepNine.vue @@ -2181,6 +2181,7 @@ watch( content: "该内容由AI生成,请注意甄别", end: true, }); + } catch (e) { ElMessage.error("历史数据获取出错!"); console.error("e", e); diff --git a/src/views/homePage.vue b/src/views/homePage.vue index 2ed67b4..83974ff 100644 --- a/src/views/homePage.vue +++ b/src/views/homePage.vue @@ -820,7 +820,7 @@ watch( }, { deep: false, immediate: true } ); - +// 监听-当点击夺宝奇兵大模型的历史记录时,滚动到顶部 watch( () => chatStore.dbqbClickRecord, async (newValue, oldValue) => { @@ -831,6 +831,17 @@ watch( container.scrollTop = 0; } ); +// 监听-当点击深度九大模型的历史记录时,滚动到顶部 +watch( + () => deepNineStore.dbqbClickRecord, + async (newValue, oldValue) => { + const container = getCurrentScrollContainer(); + if (!container) return; + + await nextTick(); // 确保在DOM更新后执行 + container.scrollTop = 0; + } +); watch( () => chatStore.dbqbScrollToTop,