From ae4799e702d71b824b21afd1c46cbf26716968ae Mon Sep 17 00:00:00 2001
From: Ethereal <3432649580@qq.com>
Date: Sun, 26 Oct 2025 16:38:37 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96deepmate=E6=BB=9A=E5=8A=A8?=
=?UTF-8?q?=E5=8A=A8=E7=94=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 7 +++++
pages/deepMate/deepMate.vue | 56 +++++++----------------------------
pages/deepMate/scroll/scroll.vue | 63 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 81 insertions(+), 45 deletions(-)
create mode 100644 pages/deepMate/scroll/scroll.vue
diff --git a/pages.json b/pages.json
index e20f43e..78c4567 100644
--- a/pages.json
+++ b/pages.json
@@ -146,6 +146,13 @@
"navigationStyle": "custom",
"titleNView": false
}
+ },
+ {
+ "path" : "pages/deepMate/scroll/scroll",
+ "style" :
+ {
+ "navigationBarTitleText" : ""
+ }
}
],
"globalStyle": {
diff --git a/pages/deepMate/deepMate.vue b/pages/deepMate/deepMate.vue
index 363f17b..348effe 100644
--- a/pages/deepMate/deepMate.vue
+++ b/pages/deepMate/deepMate.vue
@@ -116,6 +116,7 @@
class="chat-container"
scroll-y="true"
:scroll-top="chatScrollTop"
+ :scroll-with-animation="!isSending"
@scroll="onChatScroll"
v-if="messages.length > 0"
>
@@ -282,43 +283,7 @@ const renderMarkdown = (content) => {
if (!content) return "";
return marked.parse(content);
};
-// 本地假数据:Tesla 报告(Markdown)
-const FAKE_MARKDOWN = `# Tesla Inc.全景作战报告
-## 📊 股票分析报告
-### 📈 股票基本信息
-- **股票名称**: Tesla Inc.
-- **股票代码**: TSLA
-- **当前价格**: 433.720
-- **更新时间**: 2025年10月24日
-- **时间节点**: 今日无变盘点
-
-### 🎯 核心价值评估
-- **安全边际**: 419.978 ~ 445.364
-- **黄金价域**: 439.711 ~ 452.902
-- **核心证据链**:
- - 🟢 **资金共识**: 当日多方资金流入
- - 🔥 **趋势动能**: 该股中长期处于上升趋势,短期处于强势状态。
-
-### 🕵️ 主力作战分析
-- **主力行为**:
- 1. 📊 该股庄家中长期筹码成本价格为 357.272,短期资金成本价格为 408.076。该股筹码分散,当日筹码成本价格为 439.788。
- 2. 🔍 近日没有出现主力集中吸筹。
- 3. 📈 近期主力持仓比例大于散户持仓比例。 当日主力持仓减少。 当日散户持仓增加。
-
-### 📊 技术分析
-- **空间维度**:
- - 📉 预测低一值: 423.964
- - 📈 预测高一值: 469.696
- - 📉 预测低二值: 433.213
- - 📈 预测高二值: 458.396
-- **能量分析**: AI智能均线非多头排列,当前卖盘大于买盘
-
-### ⚡ 综合作战分析
-- **触发条件**: 当前股票处于安全区,牵牛绳为红色,出现蓝色推进K线
-- **攻防指令**: 该股整体趋势相对较强,个股正处于推进上涨的关键阶段。若当前持有该股票,建议继续持有,进行持续跟踪。若当前无该股票,建议持续跟踪,等待适当时机再进行介入。
-
----
-*该内容由AI生成,仅供参考,投资有风险,请注意甄别。*`;
+
const type = ref("member");
const inputMessage = ref("");
const showThinking = ref(true);
@@ -352,10 +317,6 @@ const hotTopics = ref([
icon: "https://d31zlh4on95l9h.cloudfront.net/images/7ed58be0f4b81aeb398d9ba2534a624b.svg",
},
]);
-// 统一 raf/caf(小程序端可能没有 rAF)
-// const hasRAF = typeof requestAnimationFrame === 'function';
-// const startFrame = (fn) => hasRAF ? requestAnimationFrame(fn) : setTimeout(fn, 16);
-// const stopFrame = (id) => hasRAF ? cancelAnimationFrame(id) : clearTimeout(id);
// 初始化
onMounted(() => {
@@ -485,8 +446,6 @@ const sendMessage = () => {
// 模拟机器人回复
const simulateBotResponse = async (userMessage) => {
- isSending.value = true;
-
// 添加机器人加载消息
const botMsg = {
content: "",
@@ -498,6 +457,8 @@ const simulateBotResponse = async (userMessage) => {
messages.value.push(botMsg);
await new Promise((resolve) => setTimeout(resolve, 2000));
+ isSending.value = true;
+
// 首先进行意图识别
const res = await postIntent({
content: "森那美",
@@ -592,9 +553,7 @@ const simulateBotResponse = async (userMessage) => {
// 启动前稍作停顿,避免过快开始
setTimeout(typeWriter, 500);
-
console.log("messages", messages);
-
};
// 当消息出现或变化时,测量容器并滚到底部
@@ -607,6 +566,13 @@ watch(messages, (arr) => {
}
});
+// 监听 isSending 状态变化,保持最新的状态
+watch(isSending, (newVal, oldVal) => {
+ console.log(`isSending changed from ${oldVal} to ${newVal}`);
+ // 可以在这里添加其他需要在 isSending 状态变化时执行的逻辑
+ // 例如更新 UI 状态、触发动画等
+});
+
// 滚动到底部(仅聊天区域滚动)
const scrollToBottom = () => {
if (!shouldAutoScroll.value) return;
diff --git a/pages/deepMate/scroll/scroll.vue b/pages/deepMate/scroll/scroll.vue
new file mode 100644
index 0000000..fdde18b
--- /dev/null
+++ b/pages/deepMate/scroll/scroll.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file