|
|
|
@ -165,11 +165,12 @@ |
|
|
|
@touchmove="onBackTopTouchMove" @touchend="onBackTopTouchEnd" @click="onBackTopClick"></image> |
|
|
|
|
|
|
|
<!-- 搜索历史侧拉框 --> |
|
|
|
<view class="drawer-overlay" v-show="showHistoryDrawer" @click="closeHistoryDrawer"></view> |
|
|
|
<view class="drawer-panel" v-show="showHistoryDrawer" @click.stop> |
|
|
|
<view class="drawer-overlay" v-show="showHistoryDrawer"></view> |
|
|
|
<view class="drawer-panel" v-show="showHistoryDrawer" @click.stop :style="{ transform: 'translateX(' + drawerOffsetX + 'px)' }"> |
|
|
|
<view class="drawer-back" @click="onDrawerBackClick"><text class="drawer-back-icon">></text></view> |
|
|
|
<view class="drawer-header"> |
|
|
|
<text class="drawer-title">搜索历史</text> |
|
|
|
<text class="drawer-close" @click="closeHistoryDrawer">×</text> |
|
|
|
<!-- <text class="drawer-close" @click="closeHistoryDrawer">×</text> --> |
|
|
|
</view> |
|
|
|
<scroll-view scroll-y="true" class="drawer-content"> |
|
|
|
<view v-if="searchHistory.length === 0" class="empty-history"> |
|
|
|
@ -211,6 +212,43 @@ const renderMarkdown = (content) => { |
|
|
|
if (!content) return ""; |
|
|
|
return marked.parse(content); |
|
|
|
}; |
|
|
|
// 本地假数据:Tesla 报告(Markdown) |
|
|
|
const FAKE_MARKDOWN = `# <font color="#1890ff">Tesla Inc.全景作战报告</font> |
|
|
|
## 📊 股票分析报告 |
|
|
|
### 📈 股票基本信息 |
|
|
|
- **股票名称**: <font color="#52c41a">Tesla Inc.</font> |
|
|
|
- **股票代码**: <font color="#1890ff">TSLA</font> |
|
|
|
- **当前价格**: <font color="#ff4d4f">433.720</font> |
|
|
|
- **更新时间**: 2025年10月24日 |
|
|
|
- **时间节点**: 今日无变盘点 |
|
|
|
|
|
|
|
### 🎯 核心价值评估 |
|
|
|
- **安全边际**: <font color="#13c2c2">419.978 ~ 445.364</font> |
|
|
|
- **黄金价域**: <font color="#faad14">439.711 ~ 452.902</font> |
|
|
|
- **核心证据链**: |
|
|
|
- 🟢 **资金共识**: 当日多方资金<font color="#52c41a">流入</font> |
|
|
|
- 🔥 **趋势动能**: 该股中长期处于<b><font color='#FF0000'>上升趋势</font></b>,短期处于<b><font color='#FF0000'>强势状态</font></b>。 |
|
|
|
|
|
|
|
### 🕵️ 主力作战分析 |
|
|
|
- **主力行为**: |
|
|
|
1. 📊 该股庄家中长期筹码成本价格为 357.272,短期资金成本价格为 408.076。该股筹码分散,当日筹码成本价格为 439.788。 |
|
|
|
2. 🔍 近日没有出现主力集中吸筹。 |
|
|
|
3. 📈 近期主力持仓比例大于散户持仓比例。 当日主力持仓减少。 当日散户持仓增加。 |
|
|
|
|
|
|
|
### 📊 技术分析 |
|
|
|
- **空间维度**: |
|
|
|
- 📉 预测低一值: <font color="#13c2c2">423.964</font> |
|
|
|
- 📈 预测高一值: <font color="#ff4d4f">469.696</font> |
|
|
|
- 📉 预测低二值: <font color="#13c2c2">433.213</font> |
|
|
|
- 📈 预测高二值: <font color="#ff4d4f">458.396</font> |
|
|
|
- **能量分析**: <font color="#722ed1">AI智能均线非多头排列,当前卖盘大于买盘</font> |
|
|
|
|
|
|
|
### ⚡ 综合作战分析 |
|
|
|
- **触发条件**: <font color="#fa8c16">当前股票处于安全区,牵牛绳为红色,出现蓝色推进K线</font> |
|
|
|
- **攻防指令**: <font color="#eb2f96">该股整体趋势相对较强,个股正处于推进上涨的关键阶段。若当前持有该股票,建议继续持有,进行持续跟踪。若当前无该股票,建议持续跟踪,等待适当时机再进行介入。</font> |
|
|
|
|
|
|
|
--- |
|
|
|
<font color="#8c8c8c">*该内容由AI生成,仅供参考,投资有风险,请注意甄别。*</font>`; |
|
|
|
const type = ref('member') |
|
|
|
const inputMessage = ref(""); |
|
|
|
const showThinking = ref(true); |
|
|
|
@ -220,6 +258,7 @@ const chatContainerHeight = ref(0); |
|
|
|
const uuid = ref(""); |
|
|
|
const messages = ref([]); |
|
|
|
const showHistoryDrawer = ref(false); |
|
|
|
const drawerOffsetX = ref(0); |
|
|
|
const searchHistory = ref([]); |
|
|
|
const hotTopics = ref([ |
|
|
|
{ |
|
|
|
@ -318,6 +357,13 @@ const goBlank = () => { |
|
|
|
// 历史抽屉控制 |
|
|
|
const openHistoryDrawer = () => { showHistoryDrawer.value = true; }; |
|
|
|
const closeHistoryDrawer = () => { showHistoryDrawer.value = false; }; |
|
|
|
const onDrawerBackClick = () => { |
|
|
|
drawerOffsetX.value = 500; |
|
|
|
setTimeout(() => { |
|
|
|
closeHistoryDrawer(); |
|
|
|
drawerOffsetX.value = 0; |
|
|
|
}, 180); |
|
|
|
}; |
|
|
|
|
|
|
|
// 时间格式化:YYYY-MM-DD HH:mm |
|
|
|
const pad2 = (n) => (n < 10 ? '0' + n : '' + n); |
|
|
|
@ -374,11 +420,9 @@ const simulateBotResponse = async(userMessage) => { |
|
|
|
|
|
|
|
|
|
|
|
// 添加请求延迟 |
|
|
|
await new Promise((resolve) => setTimeout(resolve, 2000)); |
|
|
|
const toDataInfo = await getDataInfo(); |
|
|
|
console.log(toDataInfo); |
|
|
|
// dataInfo.value = toDataInfo.data; |
|
|
|
// console.log(dataInfo.value); |
|
|
|
await new Promise((resolve) => setTimeout(resolve, 800)); |
|
|
|
// 使用本地假数据,跳过接口请求 |
|
|
|
const toDataInfo = { data: FAKE_MARKDOWN }; |
|
|
|
messages.value[messages.value.length - 1].isThinking = false; |
|
|
|
|
|
|
|
|
|
|
|
@ -388,11 +432,11 @@ const simulateBotResponse = async(userMessage) => { |
|
|
|
}); |
|
|
|
|
|
|
|
// 模拟流式响应 |
|
|
|
let responseText = `我已经收到您的消息: "${userMessage}"。+"${toDataInfo.data}" `; |
|
|
|
let responseText = FAKE_MARKDOWN; |
|
|
|
let index = 0; |
|
|
|
|
|
|
|
const botIndex = messages.value.length - 1; |
|
|
|
const baseDelay = 5; // 普通字符基础延迟(毫秒) |
|
|
|
const baseDelay = 165; // 普通字符基础延迟(毫秒) |
|
|
|
const slowPunct = /[。!?!?;;]/; // 句号、感叹号、分号等较长停顿 |
|
|
|
const midPunct = /[,、,::]/; // 逗号、顿号、冒号等中等停顿 |
|
|
|
|
|
|
|
@ -1102,6 +1146,27 @@ function getDataInfo() { |
|
|
|
z-index: 901; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
transition: transform 0.2s ease; |
|
|
|
} |
|
|
|
|
|
|
|
.drawer-back { |
|
|
|
position: absolute; |
|
|
|
left: -14px; |
|
|
|
top: 50%; |
|
|
|
transform: translateY(-50%); |
|
|
|
width: 28px; |
|
|
|
height: 28px; |
|
|
|
border-radius: 14px; |
|
|
|
background: #fff; |
|
|
|
box-shadow: 0 2px 8px rgba(0,0,0,.15); |
|
|
|
border: 1px solid #eee; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
} |
|
|
|
.drawer-back-icon { |
|
|
|
font-size: 16px; |
|
|
|
color: #666; |
|
|
|
} |
|
|
|
|
|
|
|
.drawer-header { |
|
|
|
@ -1118,10 +1183,10 @@ function getDataInfo() { |
|
|
|
color: #333333; |
|
|
|
} |
|
|
|
|
|
|
|
.drawer-close { |
|
|
|
/* .drawer-close { |
|
|
|
font-size: 42rpx; |
|
|
|
color: #999999; |
|
|
|
} |
|
|
|
} */ |
|
|
|
|
|
|
|
.drawer-content { |
|
|
|
flex: 1; |
|
|
|
|