|
|
|
@ -7,7 +7,7 @@ |
|
|
|
|
|
|
|
<view class="search"> |
|
|
|
<input v-model="searchName" class="searchInput" type="text" placeholder="请输入股票名称、股票代码" |
|
|
|
placeholder-style="color: #A6A6A6; font-size: 22rpx;" /> |
|
|
|
placeholder-style="color: #A6A6A6; font-size: 28rpx;" /> |
|
|
|
<image @click="searchStock" class="seachIcon" src="/static/deepExploration-images/search.png" |
|
|
|
mode="aspectFill"></image> |
|
|
|
</view> |
|
|
|
@ -41,6 +41,7 @@ |
|
|
|
<qiun-data-charts type="candle" :opts="opts" :chartData="chartData" :disableScroll="true" |
|
|
|
:ontouch="true" :onzoom="true" :key="chartKey" /> |
|
|
|
</view> |
|
|
|
<image src="/static/deepExploration-images/kLineAll.png" mode="aspectFill"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="txt"> |
|
|
|
@ -93,11 +94,19 @@ |
|
|
|
import { |
|
|
|
getUserInfo |
|
|
|
} from "@/api/member" |
|
|
|
import { |
|
|
|
useUserStore |
|
|
|
} from '@/stores/modules/userInfo.js' |
|
|
|
|
|
|
|
const deepExplorationStore = useDeepExplorationStore() |
|
|
|
const userInfo = getUserInfo() |
|
|
|
|
|
|
|
//历史数据 |
|
|
|
const historyData = ref({}) |
|
|
|
|
|
|
|
//登录弹窗提示ref |
|
|
|
const loginPrompt = ref(null) |
|
|
|
|
|
|
|
// 响应式变量定义 |
|
|
|
const type = ref('deepExploration') |
|
|
|
const iSMT = ref(0) |
|
|
|
@ -182,6 +191,13 @@ |
|
|
|
//获取模型数据 |
|
|
|
const handleModels = async () => { |
|
|
|
try { |
|
|
|
|
|
|
|
if (userInfo.isVisitor) { |
|
|
|
console.log('是游客'); |
|
|
|
loginPrompt.value.show() |
|
|
|
return |
|
|
|
} |
|
|
|
console.log('搜了吗'); |
|
|
|
// 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; |
|
|
|
@ -190,94 +206,85 @@ |
|
|
|
handleDefault() |
|
|
|
} else { |
|
|
|
if (currentIndex.value == 0) { |
|
|
|
console.log('搜索', searchName.value); |
|
|
|
const result = await getModel1First({ |
|
|
|
content: searchName.value, |
|
|
|
language: "cn", |
|
|
|
marketList: "hk,cn,usa,my,sg,vi,in,gb", |
|
|
|
model: currentIndex.value + 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 |
|
|
|
market.value = result.data.market |
|
|
|
|
|
|
|
|
|
|
|
const res = await getModel1Second({ |
|
|
|
language: language.value, |
|
|
|
recordId: recordId.value, |
|
|
|
parentId: parentId.value, |
|
|
|
stockId: stockId.value, |
|
|
|
token: 'pCtw6AYK0EHAaIexoFHsbZjtsfEAIhcmwkCFm6uKko8VPfMvyDiODL9v9c0veic9fIpQbvT8zN4sH/Si6Q' |
|
|
|
console.log('搜索', searchName.value); |
|
|
|
const result = await getModel1First({ |
|
|
|
content: searchName.value, |
|
|
|
language: "cn", |
|
|
|
marketList: "hk,cn,usa,my,sg,vi,in,gb", |
|
|
|
model: currentIndex.value + 1 |
|
|
|
}) |
|
|
|
if (res.code == 200) { |
|
|
|
const rawMarkdown = res.data.markdown; |
|
|
|
const adaptedMarkdown = rawMarkdown.replace(/^### /gm, ''); // 全局替换行首的### |
|
|
|
markdownContent.value = adaptedMarkdown; |
|
|
|
// markdownContent.value = res.data.markdown |
|
|
|
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 |
|
|
|
market.value = result.data.market |
|
|
|
|
|
|
|
|
|
|
|
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); |
|
|
|
await getServerData() |
|
|
|
} |
|
|
|
console.log('res', res); |
|
|
|
} else if (result.code == 400) { |
|
|
|
markdownContent.value = result.message; |
|
|
|
htmlContent.value = marked.parse(markdownContent.value); |
|
|
|
} else { |
|
|
|
return |
|
|
|
} |
|
|
|
console.log('res', res); |
|
|
|
|
|
|
|
await getServerData() |
|
|
|
|
|
|
|
|
|
|
|
} else if (result.code == 400) { |
|
|
|
markdownContent.value = result.message; |
|
|
|
htmlContent.value = marked.parse(markdownContent.value); |
|
|
|
} else { |
|
|
|
return |
|
|
|
} |
|
|
|
} else if (currentIndex.value == 1) { |
|
|
|
console.log('搜索', searchName.value); |
|
|
|
const result = await getModel2First({ |
|
|
|
content: searchName.value, |
|
|
|
language: "cn", |
|
|
|
marketList: "hk,cn,usa,my,sg,vi,in,gb", |
|
|
|
model: currentIndex.value + 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 |
|
|
|
market.value = result.data.market |
|
|
|
|
|
|
|
|
|
|
|
const res = await getModel2Second({ |
|
|
|
language: language.value, |
|
|
|
recordId: recordId.value, |
|
|
|
parentId: parentId.value, |
|
|
|
stockId: stockId.value, |
|
|
|
token: 'pCtw6AYK0EHAaIexoFHsbZjtsfEAIhcmwkCFm6uKko8VPfMvyDiODL9v9c0veic9fIpQbvT8zN4sH/Si6Q' |
|
|
|
console.log('搜索', searchName.value); |
|
|
|
const result = await getModel2First({ |
|
|
|
content: searchName.value, |
|
|
|
language: "cn", |
|
|
|
marketList: "hk,cn,usa,my,sg,vi,in,gb", |
|
|
|
model: currentIndex.value + 1 |
|
|
|
}) |
|
|
|
if (res.code == 200) { |
|
|
|
const rawMarkdown = res.data.markdown; |
|
|
|
const adaptedMarkdown = rawMarkdown.replace(/^### /gm, ''); // 全局替换行首的### |
|
|
|
markdownContent.value = adaptedMarkdown; |
|
|
|
// markdownContent.value = res.data.markdown |
|
|
|
console.log('result', result); |
|
|
|
if (result.code == 200) { |
|
|
|
stockCode.value = result.data.code |
|
|
|
recordId.value = result.data.recordId |
|
|
|
parentId.value = result.data.parentId |
|
|
|
stockId.value = result.data.stockId |
|
|
|
language.value = result.data.language |
|
|
|
market.value = result.data.market |
|
|
|
const res = await getModel2Second({ |
|
|
|
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); |
|
|
|
await getServerData() |
|
|
|
} |
|
|
|
console.log('res', res); |
|
|
|
} else if (result.code == 400) { |
|
|
|
markdownContent.value = result.message; |
|
|
|
htmlContent.value = marked.parse(markdownContent.value); |
|
|
|
} else { |
|
|
|
return |
|
|
|
} |
|
|
|
console.log('res', res); |
|
|
|
|
|
|
|
await getServerData() |
|
|
|
|
|
|
|
|
|
|
|
} else if (result.code == 400) { |
|
|
|
markdownContent.value = result.message; |
|
|
|
htmlContent.value = marked.parse(markdownContent.value); |
|
|
|
} else { |
|
|
|
return |
|
|
|
} |
|
|
|
}else if(currentIndex.value == 2){ |
|
|
|
} else if (currentIndex.value == 2) { |
|
|
|
console.log('搜索', searchName.value); |
|
|
|
const result = await getModel3First({ |
|
|
|
content: searchName.value, |
|
|
|
@ -294,8 +301,8 @@ |
|
|
|
stockId.value = result.data.stockId |
|
|
|
language.value = result.data.language |
|
|
|
market.value = result.data.market |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const res = await getModel3Second({ |
|
|
|
language: language.value, |
|
|
|
recordId: recordId.value, |
|
|
|
@ -309,19 +316,16 @@ |
|
|
|
markdownContent.value = adaptedMarkdown; |
|
|
|
// markdownContent.value = res.data.markdown |
|
|
|
htmlContent.value = marked.parse(markdownContent.value); |
|
|
|
await getServerData() |
|
|
|
} |
|
|
|
console.log('res', res); |
|
|
|
|
|
|
|
await getServerData() |
|
|
|
|
|
|
|
|
|
|
|
} else if (result.code == 400) { |
|
|
|
markdownContent.value = result.message; |
|
|
|
htmlContent.value = marked.parse(markdownContent.value); |
|
|
|
} else { |
|
|
|
return |
|
|
|
} |
|
|
|
}else if(currentIndex.value == 3){ |
|
|
|
} else if (currentIndex.value == 3) { |
|
|
|
console.log('搜索', searchName.value); |
|
|
|
const result = await getModel4First({ |
|
|
|
content: searchName.value, |
|
|
|
@ -338,8 +342,6 @@ |
|
|
|
stockId.value = result.data.stockId |
|
|
|
language.value = result.data.language |
|
|
|
market.value = result.data.market |
|
|
|
|
|
|
|
|
|
|
|
const res = await getModel4Second({ |
|
|
|
language: language.value, |
|
|
|
recordId: recordId.value, |
|
|
|
@ -353,27 +355,19 @@ |
|
|
|
markdownContent.value = adaptedMarkdown; |
|
|
|
// markdownContent.value = res.data.markdown |
|
|
|
htmlContent.value = marked.parse(markdownContent.value); |
|
|
|
await getServerData() |
|
|
|
} |
|
|
|
console.log('res', res); |
|
|
|
|
|
|
|
await getServerData() |
|
|
|
|
|
|
|
|
|
|
|
} else if (result.code == 400) { |
|
|
|
markdownContent.value = result.message; |
|
|
|
htmlContent.value = marked.parse(markdownContent.value); |
|
|
|
} else { |
|
|
|
return |
|
|
|
} |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
error.value = e.message || '加载失败,请重试'; |
|
|
|
} finally { |
|
|
|
@ -406,7 +400,7 @@ |
|
|
|
const getServerData = async () => { |
|
|
|
const result = await getData({ |
|
|
|
market: market.value || '', |
|
|
|
code: searchName.value || '', |
|
|
|
code: stockCode.value || '', |
|
|
|
language: "cn", |
|
|
|
brainPrivilegeState: 1, |
|
|
|
marketList: "usa.sg.my.hk.cn.can.vi.th.in.gb" |
|
|
|
@ -422,9 +416,13 @@ |
|
|
|
stockPrice.value = result.data.StockInformation.Price || '435.900' |
|
|
|
|
|
|
|
if (result.data.chartData) { |
|
|
|
|
|
|
|
const rawData = JSON.parse(JSON.stringify(result.data.chartData)); |
|
|
|
if (rawData.categories.length > 1) { // 确保至少保留一个日期 |
|
|
|
rawData.categories[rawData.categories.length - 1] = ''; // 删除最后一个日期 |
|
|
|
console.log('删了;'); |
|
|
|
} |
|
|
|
chartData.value = { |
|
|
|
...JSON.parse(JSON.stringify(result.data.chartData)) |
|
|
|
...rawData |
|
|
|
} |
|
|
|
chartKey.value++; |
|
|
|
console.log('chartData', chartData.value); |
|
|
|
@ -437,24 +435,25 @@ |
|
|
|
rotate: false, |
|
|
|
rotateLock: false, |
|
|
|
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"], |
|
|
|
padding: [15, 15, 0, 15], |
|
|
|
padding: [15, 30, 0, 15], |
|
|
|
dataLabel: false, |
|
|
|
enableScroll: true, |
|
|
|
enableMarkLine: false, |
|
|
|
legend: {}, |
|
|
|
xAxis: { |
|
|
|
labelCount: 4, |
|
|
|
itemCount: 30, |
|
|
|
itemCount: 20, |
|
|
|
disableGrid: true, |
|
|
|
gridColor: "#CCCCCC", |
|
|
|
gridType: "solid", |
|
|
|
dashLength: 4, |
|
|
|
scrollShow: false, |
|
|
|
rotate: 45, |
|
|
|
scrollAlign: "left", |
|
|
|
scrollColor: "#A6A6A6", |
|
|
|
scrollBackgroundColor: "#EFEBEF", |
|
|
|
labelColor: "#8C8C8C", |
|
|
|
fontSize: 9 |
|
|
|
fontSize: 9, |
|
|
|
}, |
|
|
|
yAxis: { |
|
|
|
labelColor: "#8C8C8C", |
|
|
|
@ -551,7 +550,6 @@ |
|
|
|
onMounted(async () => { |
|
|
|
iSMT.value = uni.getSystemInfoSync().statusBarHeight |
|
|
|
getUserInfo() |
|
|
|
await getServerData() // 调用数据获取函数 |
|
|
|
await handleModels() |
|
|
|
|
|
|
|
unwatch = watch( |
|
|
|
@ -572,6 +570,9 @@ |
|
|
|
htmlContent.value = marked.parse(markdownContent.value); |
|
|
|
|
|
|
|
//k线 |
|
|
|
if (historyData.value.stockData.chartData.categories.length > 1) { // 确保至少保留一个日期 |
|
|
|
historyData.value.stockData.chartData.categories[historyData.value.stockData.chartData.categories.length - 1] = ''; // 删除最后一个日期 |
|
|
|
} |
|
|
|
chartData.value = { |
|
|
|
...JSON.parse(JSON.stringify(historyData.value.stockData.chartData)) |
|
|
|
} |
|
|
|
@ -584,6 +585,7 @@ |
|
|
|
stockChange.value = historyData.value.stockData.StockInformation.Zhang || '5.120%' |
|
|
|
stockAdd.value = historyData.value.stockData.StockInformation.ZhangFu || '22.410' |
|
|
|
stockPrice.value = historyData.value.stockData.StockInformation.Price || '435.900' |
|
|
|
currentIndex.value = historyData.value.model-1 |
|
|
|
}, { |
|
|
|
deep: true, |
|
|
|
immediate: true |
|
|
|
@ -595,7 +597,7 @@ |
|
|
|
// 页面加载时执行 |
|
|
|
onLoad((e) => { |
|
|
|
if (e.index) { |
|
|
|
currentIndex.value = e.index - 1 |
|
|
|
// currentIndex.value = e.index - 1 |
|
|
|
console.log('模块:', currentIndex.value) |
|
|
|
} |
|
|
|
if (e.stockName) { |
|
|
|
@ -633,6 +635,7 @@ |
|
|
|
|
|
|
|
.searchInput { |
|
|
|
color: #111; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -732,13 +735,14 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.right { |
|
|
|
margin-left: 60rpx; |
|
|
|
margin-left: 50rpx; |
|
|
|
color: #6a6a6a; |
|
|
|
font-family: "PingFang SC"; |
|
|
|
font-size: 13px; |
|
|
|
font-style: normal; |
|
|
|
font-weight: 400; |
|
|
|
line-height: 15px; |
|
|
|
white-space: nowrap; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -764,11 +768,21 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.graph_content { |
|
|
|
position: relative; |
|
|
|
min-height: 500rpx; |
|
|
|
|
|
|
|
image{ |
|
|
|
position: absolute; |
|
|
|
bottom: 20rpx; |
|
|
|
right: 30rpx; |
|
|
|
width: 48rpx; |
|
|
|
height: 48rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.charts-box { |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
overflow: visible; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -787,9 +801,10 @@ |
|
|
|
} |
|
|
|
|
|
|
|
text { |
|
|
|
margin-left: 5rpx; |
|
|
|
background-color: #FFFFFF; |
|
|
|
color: #000000; |
|
|
|
padding: 0 22rpx; |
|
|
|
padding: 5rpx 22rpx; |
|
|
|
border-radius: 22rpx; |
|
|
|
font-size: 28rpx; |
|
|
|
font-weight: 400; |
|
|
|
@ -798,7 +813,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.txtContent { |
|
|
|
min-height: 200rpx; |
|
|
|
min-height: 300rpx; |
|
|
|
padding: 20rpx 30rpx; |
|
|
|
margin-bottom: 100rpx; |
|
|
|
|
|
|
|
|