diff --git a/api/deepExploration/deepExploration.js b/api/deepExploration/deepExploration.js
index 800b626..be5cd8b 100644
--- a/api/deepExploration/deepExploration.js
+++ b/api/deepExploration/deepExploration.js
@@ -74,7 +74,24 @@ export const getModel4Second = (data) => {
})
}
+//不搜索时走这个
+export const getModeldefault = (data) => {
+ return http({
+ method: 'POST',
+ url: '/api/coze/default',
+ data
+ })
+}
+
+//k线数据
+export const getData = (data) => {
+ return http({
+ method: 'POST',
+ url: '/api/coze/WorkFlowData',
+ data
+ })
+}
//历史记录列表
export const RecordListApi = (data) => {
diff --git a/package-lock.json b/package-lock.json
index 48bcede..8fb591c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"@dcloudio/uni-ui": "^1.5.11",
"@element-plus/icons-vue": "^2.3.2",
"element-plus": "^2.11.5",
+ "highlight.js": "^11.11.1",
"marked": "^2.0.1",
"pinia": "^3.0.3",
"pinia-plugin-persistedstate": "^4.5.0",
@@ -480,6 +481,15 @@
"license": "MIT",
"peer": true
},
+ "node_modules/highlight.js": {
+ "version": "11.11.1",
+ "resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-11.11.1.tgz",
+ "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
"node_modules/hookable": {
"version": "5.5.3",
"license": "MIT"
diff --git a/package.json b/package.json
index ba80520..14c932c 100644
--- a/package.json
+++ b/package.json
@@ -3,6 +3,7 @@
"@dcloudio/uni-ui": "^1.5.11",
"@element-plus/icons-vue": "^2.3.2",
"element-plus": "^2.11.5",
+ "highlight.js": "^11.11.1",
"marked": "^2.0.1",
"pinia": "^3.0.3",
"pinia-plugin-persistedstate": "^4.5.0",
diff --git a/pages.json b/pages.json
index 7099984..299278f 100644
--- a/pages.json
+++ b/pages.json
@@ -29,16 +29,6 @@
}
},
{
- "path": "pages/start/index/index",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "uni-app",
- "disableSwipeBack": true,
- "titleNView": false,
- "bounce": false
- }
- },
- {
"path": "pages/start/Registration/Registration",
"style": {
"navigationBarTitleText": "",
@@ -98,7 +88,25 @@
}
},
{
- "path": "pages/home/marketSituation",
+ "path": "pages/marketSituation/marketSituation",
+ "style": {
+ "navigationStyle": "custom",
+ "disableSwipeBack": true,
+ "titleNView": false,
+ "bounce": false
+ }
+ },
+ {
+ "path": "pages/marketSituation/globalIndex",
+ "style": {
+ "navigationStyle": "custom",
+ "disableSwipeBack": true,
+ "titleNView": false,
+ "bounce": false
+ }
+ },
+ {
+ "path": "pages/marketSituation/marketDetail",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true,
@@ -116,7 +124,7 @@
}
},
{
- "path": "pages/home/deepExploration",
+ "path": "pages/deepExploration/deepExploration",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true,
@@ -134,7 +142,17 @@
}
},
{
- "path": "pages/blank/blank",
+ "path": "pages/blank/institutionalTrendsBriefing",
+ "style": {
+ "navigationBarTitleText": "",
+ "navigationStyle": "custom",
+ "disableSwipeBack": true,
+ "titleNView": false,
+ "bounce": false
+ }
+ },
+ {
+ "path": "pages/blank/notice",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
@@ -260,14 +278,29 @@
}
},
{
- "path" : "pages/home/marketCondition",
+ "path" : "pages/marketSituation/marketCondition",
"style" :
{
"navigationBarTitleText" : "行情",
"navigationStyle": "custom"
}
+ },{
+ "path": "pages/deepExploration/MainForceActions",
+ "style": {
+ "navigationStyle": "custom",
+ "disableSwipeBack": true,
+ "titleNView": false,
+ "bounce": false
+ }
},
{
+ "path" : "pages/deepExploration/stockSelectDetail",
+ "style" :
+ {
+ "navigationBarTitleText": "选股策略"
+ }
+ },
+ {
"path" : "pages/setting/createPwd",
"style" :
{
diff --git a/pages/deepExploration/MainForceActions.vue b/pages/deepExploration/MainForceActions.vue
index f9e87fc..5ce2647 100644
--- a/pages/deepExploration/MainForceActions.vue
+++ b/pages/deepExploration/MainForceActions.vue
@@ -47,9 +47,12 @@
+
+ 加载中...
+
-
@@ -78,7 +81,12 @@
getModel3Second,
getModel4First,
getModel4Second,
+ getModeldefault,
+ getData
} 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')
@@ -104,43 +112,25 @@
//搜索股票
const searchStock = () => {
+ htmlContent.value = ''
console.log('搜索参数:', stockName.value);
- if (currentIndex.value == 0) {
- handleModel(0)
- } else if (currentIndex.value == 1) {
- console.log(index);
- handleModel(1)
- } else if (currentIndex.value == 2) {
- console.log(index);
- handleModel(2)
- } else if (currentIndex.value == 3) {
- console.log(index);
- handleModel(3)
- }else{
+ if (currentIndex.value ) {
+ handleModels()
+ getServerData()
+ } else {
uni.showToast({
- title: '请选择模块',
- icon: 'none',
- duration: 2000
- })
+ title: '请选择模块',
+ icon: 'none',
+ duration: 2000
+ })
}
}
//点击四大模块
- const handleModel = (index) => {
+ const handleModel = async(index) => {
+ htmlContent.value = ''
currentIndex.value = index
- if (currentIndex.value == 0) {
- console.log(index);
- handleTrack()
- } else if (currentIndex.value == 1) {
- console.log(index);
- handleRadar()
- } else if (currentIndex.value == 2) {
- console.log(index);
- handleDecode()
- } else if (currentIndex.value == 3) {
- console.log(index);
- handleCapitalFlow()
- }
+ await handleModels()
}
const stockName = ref('')
@@ -150,52 +140,116 @@
const recordId = ref('')
const parentId = ref('')
const stockId = ref('')
- //点击主力追踪
- const handleTrack = async () => {
+ const market = 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 `
${text}
`;
+ };
+ // 初始化 marked 配置(支持代码高亮)
+ marked.setOptions({
+ highlight: (code, lang) => {
+ if (lang && hljs.getLanguage(lang)) {
+ return hljs.highlight(code, {
+ language: lang
+ }).value;
+ }
+ return hljs.highlightAuto(code).value;
+ },
+ renderer,
+ breaks: true, // 换行转
+ gfm: true, // 支持GitHub flavored Markdown
+ sanitize: false, // 保留HTML标签(如)
+ });
+
+ //获取模型数据
+ const handleModels = 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
+ // markdownContent.value = '\n## 📊 主力追踪分析:\n\n### 🕵️ 主力行为\n\t1. 📊 该股庄家中长期筹码成本价格为 360.249,短期资金成本价格为 412.577。该股筹码分散,当日筹码成本价格为 444.330。\n\t2. 🔍 近日没有出现主力集中吸筹。\n\t3. 📈 近期主力持仓比例大于散户持仓比例。 当日主力持仓增加。 当日散户持仓减少。\n\n### 📊 空间维度:\n\t- 📉 预测低一值: 443.092 \n - 📈 预测高一值: 466.458\n\t- 📉 预测低二值: 447.354\n\t- 📈 预测高二值: 462.514\n\tAI智能均线空头排列,当前卖盘小于买盘\n\n### 综合作战\n\t\t\t当前股票处于安全区,牵牛绳为红色,出现蓝色推进K线。\n\t\t\t该股整体趋势相对较强,个股正处于推进上涨的关键阶段。若当前持有该股票,建议继续持有,进行持续跟踪。若当前无该股票,建议持续跟踪,等待适当时机再进行介入。\n\n---\n*该内容由AI生成,仅供参考,投资有风险,请注意甄别。*\n '
+ // htmlContent.value = marked.parse(markdownContent.value);
+ loading.value = true;
+ if (searchName.value == '') {
+ console.log('没有搜索',searchName.value);
+ const rresult = await handleDefault()
+
+ // markdownContent.value = res.data.markdown
+ htmlContent.value = marked.parse(markdownContent.value);
+ }else{
+ 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
+ } else {
+ return
+ }
+
+
const res = await getModel1Second({
language: language.value,
recordId: recordId.value,
parentId: parentId.value,
- stockId: stockId.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;
}
}
- //点击主力雷达
- const handleRadar = () => {
-
- }
-
- //点击主力解码
- const handleDecode = () => {
-
+ const handleDefault = async () => {
+ const result = await getModeldefault({
+ token: "pCtw6AYK0EHAaIexoFHsbZjtsfEAIhcmwkCFm6uKko8VPfMvyDiODL9v9c0veic9fIpQbvT8zN4sH/Si6Q",
+ model: currentIndex.value+1
+ })
+
+ const rawMarkdown = result.data.markdown;
+ const adaptedMarkdown = rawMarkdown.replace(/^### /gm, ''); // 全局替换行首的###
+ markdownContent.value = adaptedMarkdown;
+ htmlContent.value = marked.parse(markdownContent.value);
}
-
- //点击主力资金流
- const handleCapitalFlow = () => {
-
- }
-
+
+ const getServerData = async() =>{
+ const result = await getData({
+ market: market.value || '',
+ code: searchName || '',
+ language: "cn",
+ brainPrivilegeState: 1,
+ marketList: "usa.sg.my.hk.cn.can.vi.th.in.gb"
+ })
+
+ console.log('k线数据',result);
+ }
// 1. K线图配置
const opts = ref({
@@ -265,302 +319,302 @@
const chartData = ref({})
// 获取K线数据函数(直接定义,无需methods)
- const getServerData = () => {
- // 模拟服务器请求延时
- setTimeout(() => {
- const res = {
- "categories": [
- "2025/08/25",
- "2025/08/26",
- "2025/08/27",
- "2025/08/28",
- "2025/08/29",
- "2025/09/01",
- "2025/09/02",
- "2025/09/03",
- "2025/09/04",
- "2025/09/05",
- "2025/09/08",
- "2025/09/09",
- "2025/09/10",
- "2025/09/11",
- "2025/09/12",
- "2025/09/15",
- "2025/09/16",
- "2025/09/17",
- "2025/09/18",
- "2025/09/19",
- "2025/09/22",
- "2025/09/23",
- "2025/09/24",
- "2025/09/25",
- "2025/09/26",
- "2025/09/29",
- "2025/09/30",
- "2025/10/09",
- "2025/10/10",
- "2025/10/13",
- "2025/10/14",
- "2025/10/15",
- "2025/10/16",
- "2025/10/17",
- "2025/10/20",
- "2025/10/21",
- "2025/10/22",
- "2025/10/23",
- "2025/10/24",
- "2025/10/27"
- ],
- series: [{
- "name": "贵州茅台",
- "data": [
- [
- 1470.01,
- 1496.0,
- 1466.0,
- 1499.33
- ],
- [
- 1490.32,
- 1474.23,
- 1480.01,
- 1481.61
- ],
- [
- 1481.88,
- 1484.93,
- 1448.0,
- 1448.0
- ],
- [
- 1447.97,
- 1456.1,
- 1438.77,
- 1446.1
- ],
- [
- 1453.0,
- 1482.58,
- 1452.0,
- 1480.0
- ],
- [
- 1482.2,
- 1488.0,
- 1465.7,
- 1476.1
- ],
- [
- 1478.66,
- 1509.0,
- 1478.0,
- 1491.3
- ],
- [
- 1491.0,
- 1503.5,
- 1466.0,
- 1480.55
- ],
- [
- 1472.0,
- 1479.3,
- 1460.47,
- 1480.66
- ],
- [
- 1471.0,
- 1486.97,
- 1464.0,
- 1483.0
- ],
- [
- 1483.0,
- 1506.44,
- 1477.5,
- 1501.23
- ],
- [
- 1505.0,
- 1509.95,
- 1493.42,
- 1505.0
- ],
- [
- 1506.66,
- 1529.95,
- 1496.0,
- 1522.01
- ],
- [
- 1522.01,
- 1526.02,
- 1508.5,
- 1523.5
- ],
- [
- 1526.0,
- 1538.02,
- 1510.53,
- 1516.0
- ],
- [
- 1515.87,
- 1517.48,
- 1501.5,
- 1515.1
- ],
- [
- 1515.1,
- 1520.99,
- 1496.21,
- 1499.98
- ],
- [
- 1499.99,
- 1510.28,
- 1490.01,
- 1493.0
- ],
- [
- 1492.0,
- 1497.8,
- 1463.5,
- 1467.96
- ],
- [
- 1467.99,
- 1475.5,
- 1457.01,
- 1467.97
- ],
- [
- 1465.09,
- 1467.97,
- 1450.01,
- 1453.35
- ],
- [
- 1450.5,
- 1457.5,
- 1440.0,
- 1447.42
- ],
- [
- 1434.07,
- 1456.78,
- 1434.07,
- 1442.0
- ],
- [
- 1442.83,
- 1445.21,
- 1436.0,
- 1439.0
- ],
- [
- 1441.18,
- 1447.11,
- 1428.01,
- 1435.0
- ],
- [
- 1439.38,
- 1469.99,
- 1435.0,
- 1460.86
- ],
- [
- 1460.0,
- 1460.76,
- 1440.0,
- 1443.99
- ],
- [
- 1436.0,
- 1439.38,
- 1420.0,
- 1436.78
- ],
- [
- 1437.6,
- 1439.94,
- 1427.5,
- 1430.0
- ],
- [
- 1415.7,
- 1422.85,
- 1415.12,
- 1419.2
- ],
- [
- 1429.99,
- 1464.0,
- 1429.99,
- 1451.02
- ],
- [
- 1450.98,
- 1463.0,
- 1445.08,
- 1462.0
- ],
- [
- 1461.92,
- 1484.95,
- 1458.88,
- 1484.91
- ],
- [
- 1483.1,
- 1488.0,
- 1454.03,
- 1455.0
- ],
- [
- 1455.0,
- 1469.5,
- 1454.88,
- 1457.93
- ],
- [
- 1459.0,
- 1469.94,
- 1455.5,
- 1462.26
- ],
- [
- 1462.08,
- 1465.73,
- 1456.0,
- 1458.7
- ],
- [
- 1455.0,
- 1468.8,
- 1447.2,
- 1467.98
- ],
- [
- 1467.95,
- 1478.88,
- 1449.34,
- 1450.0
- ],
- [
- 1440.0,
- 1452.49,
- 1435.99,
- 1440.41
- ]
- ],
- }]
- }
- // 给响应式变量赋值(需修改.value)
- chartData.value = JSON.parse(JSON.stringify(res))
- }, 500)
- }
+ // const getServerData = () => {
+ // // 模拟服务器请求延时
+ // setTimeout(() => {
+ // const res = {
+ // "categories": [
+ // "2025/08/25",
+ // "2025/08/26",
+ // "2025/08/27",
+ // "2025/08/28",
+ // "2025/08/29",
+ // "2025/09/01",
+ // "2025/09/02",
+ // "2025/09/03",
+ // "2025/09/04",
+ // "2025/09/05",
+ // "2025/09/08",
+ // "2025/09/09",
+ // "2025/09/10",
+ // "2025/09/11",
+ // "2025/09/12",
+ // "2025/09/15",
+ // "2025/09/16",
+ // "2025/09/17",
+ // "2025/09/18",
+ // "2025/09/19",
+ // "2025/09/22",
+ // "2025/09/23",
+ // "2025/09/24",
+ // "2025/09/25",
+ // "2025/09/26",
+ // "2025/09/29",
+ // "2025/09/30",
+ // "2025/10/09",
+ // "2025/10/10",
+ // "2025/10/13",
+ // "2025/10/14",
+ // "2025/10/15",
+ // "2025/10/16",
+ // "2025/10/17",
+ // "2025/10/20",
+ // "2025/10/21",
+ // "2025/10/22",
+ // "2025/10/23",
+ // "2025/10/24",
+ // "2025/10/27"
+ // ],
+ // series: [{
+ // "name": "贵州茅台",
+ // "data": [
+ // [
+ // 1470.01,
+ // 1496.0,
+ // 1466.0,
+ // 1499.33
+ // ],
+ // [
+ // 1490.32,
+ // 1474.23,
+ // 1480.01,
+ // 1481.61
+ // ],
+ // [
+ // 1481.88,
+ // 1484.93,
+ // 1448.0,
+ // 1448.0
+ // ],
+ // [
+ // 1447.97,
+ // 1456.1,
+ // 1438.77,
+ // 1446.1
+ // ],
+ // [
+ // 1453.0,
+ // 1482.58,
+ // 1452.0,
+ // 1480.0
+ // ],
+ // [
+ // 1482.2,
+ // 1488.0,
+ // 1465.7,
+ // 1476.1
+ // ],
+ // [
+ // 1478.66,
+ // 1509.0,
+ // 1478.0,
+ // 1491.3
+ // ],
+ // [
+ // 1491.0,
+ // 1503.5,
+ // 1466.0,
+ // 1480.55
+ // ],
+ // [
+ // 1472.0,
+ // 1479.3,
+ // 1460.47,
+ // 1480.66
+ // ],
+ // [
+ // 1471.0,
+ // 1486.97,
+ // 1464.0,
+ // 1483.0
+ // ],
+ // [
+ // 1483.0,
+ // 1506.44,
+ // 1477.5,
+ // 1501.23
+ // ],
+ // [
+ // 1505.0,
+ // 1509.95,
+ // 1493.42,
+ // 1505.0
+ // ],
+ // [
+ // 1506.66,
+ // 1529.95,
+ // 1496.0,
+ // 1522.01
+ // ],
+ // [
+ // 1522.01,
+ // 1526.02,
+ // 1508.5,
+ // 1523.5
+ // ],
+ // [
+ // 1526.0,
+ // 1538.02,
+ // 1510.53,
+ // 1516.0
+ // ],
+ // [
+ // 1515.87,
+ // 1517.48,
+ // 1501.5,
+ // 1515.1
+ // ],
+ // [
+ // 1515.1,
+ // 1520.99,
+ // 1496.21,
+ // 1499.98
+ // ],
+ // [
+ // 1499.99,
+ // 1510.28,
+ // 1490.01,
+ // 1493.0
+ // ],
+ // [
+ // 1492.0,
+ // 1497.8,
+ // 1463.5,
+ // 1467.96
+ // ],
+ // [
+ // 1467.99,
+ // 1475.5,
+ // 1457.01,
+ // 1467.97
+ // ],
+ // [
+ // 1465.09,
+ // 1467.97,
+ // 1450.01,
+ // 1453.35
+ // ],
+ // [
+ // 1450.5,
+ // 1457.5,
+ // 1440.0,
+ // 1447.42
+ // ],
+ // [
+ // 1434.07,
+ // 1456.78,
+ // 1434.07,
+ // 1442.0
+ // ],
+ // [
+ // 1442.83,
+ // 1445.21,
+ // 1436.0,
+ // 1439.0
+ // ],
+ // [
+ // 1441.18,
+ // 1447.11,
+ // 1428.01,
+ // 1435.0
+ // ],
+ // [
+ // 1439.38,
+ // 1469.99,
+ // 1435.0,
+ // 1460.86
+ // ],
+ // [
+ // 1460.0,
+ // 1460.76,
+ // 1440.0,
+ // 1443.99
+ // ],
+ // [
+ // 1436.0,
+ // 1439.38,
+ // 1420.0,
+ // 1436.78
+ // ],
+ // [
+ // 1437.6,
+ // 1439.94,
+ // 1427.5,
+ // 1430.0
+ // ],
+ // [
+ // 1415.7,
+ // 1422.85,
+ // 1415.12,
+ // 1419.2
+ // ],
+ // [
+ // 1429.99,
+ // 1464.0,
+ // 1429.99,
+ // 1451.02
+ // ],
+ // [
+ // 1450.98,
+ // 1463.0,
+ // 1445.08,
+ // 1462.0
+ // ],
+ // [
+ // 1461.92,
+ // 1484.95,
+ // 1458.88,
+ // 1484.91
+ // ],
+ // [
+ // 1483.1,
+ // 1488.0,
+ // 1454.03,
+ // 1455.0
+ // ],
+ // [
+ // 1455.0,
+ // 1469.5,
+ // 1454.88,
+ // 1457.93
+ // ],
+ // [
+ // 1459.0,
+ // 1469.94,
+ // 1455.5,
+ // 1462.26
+ // ],
+ // [
+ // 1462.08,
+ // 1465.73,
+ // 1456.0,
+ // 1458.7
+ // ],
+ // [
+ // 1455.0,
+ // 1468.8,
+ // 1447.2,
+ // 1467.98
+ // ],
+ // [
+ // 1467.95,
+ // 1478.88,
+ // 1449.34,
+ // 1450.0
+ // ],
+ // [
+ // 1440.0,
+ // 1452.49,
+ // 1435.99,
+ // 1440.41
+ // ]
+ // ],
+ // }]
+ // }
+ // // 给响应式变量赋值(需修改.value)
+ // chartData.value = JSON.parse(JSON.stringify(res))
+ // }, 500)
+ // }
// 生命周期钩子:组件挂载后执行(替代onReady)
onMounted(() => {
@@ -584,8 +638,9 @@