|
|
|
@ -47,9 +47,12 @@ |
|
|
|
<view class="txt"> |
|
|
|
<view class="txtHeader"> |
|
|
|
<image src="/static/deepExploration-images/plus.png" mode="aspectFill"></image> |
|
|
|
<text>主力追踪</text> |
|
|
|
<text>{{navItems[currentIndex].name}}</text> |
|
|
|
</view> |
|
|
|
<view class="txtContent"> |
|
|
|
<view v-if="loading" class="loading">加载中...</view> |
|
|
|
<rich-text :nodes="htmlContent"></rich-text> |
|
|
|
</view> |
|
|
|
<view class="txtContent"></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -78,7 +81,11 @@ |
|
|
|
getModel3Second, |
|
|
|
getModel4First, |
|
|
|
getModel4Second, |
|
|
|
getModeldefault |
|
|
|
} from '/api/deepExploration/deepExploration.js' |
|
|
|
import marked from 'marked'; // 引入 marked 库 |
|
|
|
import hljs from 'highlight.js'; |
|
|
|
import 'highlight.js/styles/atom-one-dark.css'; // 可替换为其他主题 |
|
|
|
|
|
|
|
// 响应式变量定义 |
|
|
|
const type = ref('deepExploration') |
|
|
|
@ -116,12 +123,12 @@ |
|
|
|
} else if (currentIndex.value == 3) { |
|
|
|
console.log(index); |
|
|
|
handleModel(3) |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: '请选择模块', |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
title: '请选择模块', |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
@ -150,34 +157,79 @@ |
|
|
|
const recordId = ref('') |
|
|
|
const parentId = ref('') |
|
|
|
const stockId = ref('') |
|
|
|
|
|
|
|
const loading = ref(true); |
|
|
|
const error = ref(''); |
|
|
|
const htmlContent = ref(''); |
|
|
|
const markdownContent = ref(''); |
|
|
|
|
|
|
|
|
|
|
|
const renderer = new marked.Renderer(); |
|
|
|
renderer.heading = function(text, level) { |
|
|
|
return `<p>${text}</p>`; |
|
|
|
}; |
|
|
|
// 初始化 marked 配置(支持代码高亮) |
|
|
|
marked.setOptions({ |
|
|
|
renderer: new marked.Renderer(), |
|
|
|
highlight: null, // 如果需要代码高亮,可以设置适当的函数 |
|
|
|
langPrefix: "language-", |
|
|
|
pedantic: false, |
|
|
|
gfm: true, |
|
|
|
breaks: false, |
|
|
|
sanitize: false, |
|
|
|
smartLists: true, |
|
|
|
smartypants: false, |
|
|
|
xhtml: false, |
|
|
|
}); |
|
|
|
|
|
|
|
//点击主力追踪 |
|
|
|
const handleTrack = async () => { |
|
|
|
try { |
|
|
|
const result = await getModel1First({ |
|
|
|
content: searchName.value, |
|
|
|
language: "cn", |
|
|
|
marketList: "hk,cn,usa,my,sg,vi,in,gb", |
|
|
|
model: 1 |
|
|
|
}) |
|
|
|
console.log('result', result); |
|
|
|
if (result.code == 200) { |
|
|
|
stockCode.value = result.data.code |
|
|
|
stockName.value = result.data.name |
|
|
|
recordId.value = result.data.recordId |
|
|
|
parentId.value = result.data.parentId |
|
|
|
stockId.value = result.data.stockId |
|
|
|
language.value = result.data.language |
|
|
|
const res = await getModel1Second({ |
|
|
|
language: language.value, |
|
|
|
recordId: recordId.value, |
|
|
|
parentId: parentId.value, |
|
|
|
stockId: stockId.value |
|
|
|
}) |
|
|
|
console.log('res', res); |
|
|
|
} |
|
|
|
markdownContent.value = '\n## 📊 主力追踪分析:\n\n### 🕵️ 主力行为\n\t1. 📊 该股庄家中长期筹码成本价格为 360.249,短期资金成本价格为 412.577。该股筹码分散,当日筹码成本价格为 444.330。\n\t2. 🔍 近日没有出现主力集中吸筹。\n\t3. 📈 近期主力持仓比例大于散户持仓比例。 当日主力持仓增加。 当日散户持仓减少。\n\n### 📊 空间维度:\n\t- 📉 预测低一值: <font color=\"#13c2c2\">443.092</font> \n - 📈 预测高一值: <font color=\"#ff4d4f\">466.458</font>\n\t- 📉 预测低二值: <font color=\"#13c2c2\">447.354</font>\n\t- 📈 预测高二值: <font color=\"#ff4d4f\">462.514</font>\n\t<font color=\"#722ed1\">AI智能均线空头排列,当前卖盘小于买盘</font>\n\n### 综合作战\n\t\t\t<font color=\"#fa8c16\">当前股票处于安全区,牵牛绳为红色,出现蓝色推进K线。</font>\n\t\t\t<font color=\"#eb2f96\">该股整体趋势相对较强,个股正处于推进上涨的关键阶段。若当前持有该股票,建议继续持有,进行持续跟踪。若当前无该股票,建议持续跟踪,等待适当时机再进行介入。</font>\n\n---\n<font color=\"#8c8c8c\">*该内容由AI生成,仅供参考,投资有风险,请注意甄别。*</font>\n ' |
|
|
|
htmlContent.value = marked.parse(markdownContent.value); |
|
|
|
loading.value = true; |
|
|
|
// if(searchName.value){ |
|
|
|
|
|
|
|
// } |
|
|
|
// const result = await getModel1First({ |
|
|
|
// content: searchName.value, |
|
|
|
// language: "cn", |
|
|
|
// marketList: "hk,cn,usa,my,sg,vi,in,gb", |
|
|
|
// model: 1 |
|
|
|
// }) |
|
|
|
// console.log('result', result); |
|
|
|
// if (result.code == 200) { |
|
|
|
// stockCode.value = result.data.code |
|
|
|
// stockName.value = result.data.name |
|
|
|
// recordId.value = result.data.recordId |
|
|
|
// parentId.value = result.data.parentId |
|
|
|
// stockId.value = result.data.stockId |
|
|
|
// language.value = result.data.language |
|
|
|
// }else{ |
|
|
|
// return |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// const res = await getModel1Second({ |
|
|
|
// language: language.value, |
|
|
|
// recordId: recordId.value, |
|
|
|
// parentId: parentId.value, |
|
|
|
// stockId: stockId.value, |
|
|
|
// token: 'pCtw6AYK0EHAaIexoFHsbZjtsfEAIhcmwkCFm6uKko8VPfMvyDiODL9v9c0veic9fIpQbvT8zN4sH/Si6Q' |
|
|
|
// }) |
|
|
|
// if (res.code == 200) { |
|
|
|
// const rawMarkdown = res.data.markdown; |
|
|
|
// const adaptedMarkdown = rawMarkdown.replace(/^### /gm, ''); // 全局替换行首的### |
|
|
|
// markdownContent.value = adaptedMarkdown; |
|
|
|
// // markdownContent.value = res.data.markdown |
|
|
|
// htmlContent.value = marked.parse(markdownContent.value); |
|
|
|
// } |
|
|
|
// console.log('res', res); |
|
|
|
|
|
|
|
} catch { |
|
|
|
|
|
|
|
error.value = e.message || '加载失败,请重试'; |
|
|
|
} finally { |
|
|
|
loading.value = false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -195,7 +247,9 @@ |
|
|
|
const handleCapitalFlow = () => { |
|
|
|
|
|
|
|
} |
|
|
|
const handleDefault = async()=>{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 1. K线图配置 |
|
|
|
const opts = ref({ |
|
|
|
@ -584,8 +638,9 @@ |
|
|
|
<style scoped lang="scss"> |
|
|
|
.main { |
|
|
|
width: 100%; |
|
|
|
height: 100vh; |
|
|
|
min-height: 100vh; |
|
|
|
background-color: #fff; |
|
|
|
padding-bottom: 120rpx; |
|
|
|
|
|
|
|
.search { |
|
|
|
position: relative; |
|
|
|
@ -660,7 +715,6 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.graphAndTxt { |
|
|
|
height: 300rpx; |
|
|
|
background-color: #fff; |
|
|
|
border-radius: 50rpx 50rpx 0 0; |
|
|
|
padding: 68.6rpx 36.5rpx 0 36.5rpx; |
|
|
|
@ -783,6 +837,51 @@ |
|
|
|
|
|
|
|
.txtContent { |
|
|
|
min-height: 200rpx; |
|
|
|
padding: 20rpx 30rpx; |
|
|
|
margin-bottom: 100rpx; |
|
|
|
|
|
|
|
::v-deep * { |
|
|
|
box-sizing: border-box; |
|
|
|
width: 100% !important; // 强制所有解析后的标签占满容器宽度 |
|
|
|
white-space: normal !important; // 取消强制不换行 |
|
|
|
word-wrap: break-word !important; // 长词/长数字自动换行 |
|
|
|
} |
|
|
|
|
|
|
|
// 标题样式(确保换行) |
|
|
|
::v-deep h2 { |
|
|
|
font-size: 32rpx; |
|
|
|
color: #333; |
|
|
|
margin: 25rpx 0 15rpx; |
|
|
|
line-height: 1.5; |
|
|
|
} |
|
|
|
|
|
|
|
// 段落样式(核心换行控制) |
|
|
|
::v-deep p { |
|
|
|
font-size: 26rpx; |
|
|
|
color: #666; |
|
|
|
margin: 15rpx 0; |
|
|
|
line-height: 1.8; // 增加行高,提升可读性 |
|
|
|
text-align: justify; // 两端对齐,避免单侧参差不齐 |
|
|
|
} |
|
|
|
|
|
|
|
// 列表样式(纵向排列) |
|
|
|
::v-deep ul, |
|
|
|
::v-deep ol { |
|
|
|
margin: 15rpx 0 15rpx 30rpx; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep li { |
|
|
|
margin: 10rpx 0; |
|
|
|
line-height: 1.6; |
|
|
|
} |
|
|
|
|
|
|
|
// 加载状态样式 |
|
|
|
.loading { |
|
|
|
text-align: center; |
|
|
|
padding: 50rpx 0; |
|
|
|
color: #666; |
|
|
|
font-size: 26rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|