From 3a7d24916024fe2ef0c4ecf638cff8b658bd92d5 Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Wed, 29 Oct 2025 11:53:40 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/deepExploration/deepExploration.js | 71 ++++++++++++++++++++++++-- api/tcpConnection.js | 2 +- pages/deepExploration/MainForceActions.vue | 80 ++++++++++++++++++++++++++---- 3 files changed, 140 insertions(+), 13 deletions(-) diff --git a/api/deepExploration/deepExploration.js b/api/deepExploration/deepExploration.js index 96e9cad..34dfc8f 100644 --- a/api/deepExploration/deepExploration.js +++ b/api/deepExploration/deepExploration.js @@ -1,10 +1,75 @@ import { http } from '@/utils/http.js' -//点击主力追踪 -export const getModel1 = () => { +//主力追踪意图 +export const getModel1First = (data) => { return http({ - method: 'GET', + method: 'POST', url: '/api/coze/trackingFirst', + data + }) +} + +//主力追踪意图 +export const getModel1Second = (data) => { + return http({ + method: 'POST', + url: '/api/coze/trackingSecond', + data + }) +} + + +//主力追踪意图 +export const getModel2First = (data) => { + return http({ + method: 'POST', + url: '/api/coze/radarFirst', + data + }) +} + +//主力追踪意图 +export const getModel2Second = (data) => { + return http({ + method: 'POST', + url: '/api/coze/radarSecond', + data + }) +} + +//主力追踪意图 +export const getModel3First = (data) => { + return http({ + method: 'POST', + url: '/api/coze/decodingFirst', + data + }) +} + +//主力追踪意图 +export const getModel3Second = (data) => { + return http({ + method: 'POST', + url: '/api/coze/decodingSecond', + data + }) +} + +//主力追踪意图 +export const getModel4First = (data) => { + return http({ + method: 'POST', + url: '/api/coze/fundsFirst', + data + }) +} + +//主力追踪意图 +export const getModel4Second = (data) => { + return http({ + method: 'POST', + url: '/api/coze/fundsSecond', + data }) } \ No newline at end of file diff --git a/api/tcpConnection.js b/api/tcpConnection.js index 235c1ad..c701ca3 100644 --- a/api/tcpConnection.js +++ b/api/tcpConnection.js @@ -7,7 +7,7 @@ // 引用TCP插件 // const TCPSocket = uni.requireNativePlugin('Aimer-TCPPlugin'); -const TCPSocket = uni.requireNativePlugin("Aimer-TCPPlugin"); +// const TCPSocket = uni.requireNativePlugin("Aimer-TCPPlugin"); // TCP连接配置 const TCP_CONFIG = { diff --git a/pages/deepExploration/MainForceActions.vue b/pages/deepExploration/MainForceActions.vue index 6f40650..f9e87fc 100644 --- a/pages/deepExploration/MainForceActions.vue +++ b/pages/deepExploration/MainForceActions.vue @@ -5,7 +5,7 @@ - @@ -69,6 +69,16 @@ import { onLoad } from '@dcloudio/uni-app' + import { + getModel1First, + getModel1Second, + getModel2First, + getModel2Second, + getModel3First, + getModel3Second, + getModel4First, + getModel4Second, + } from '/api/deepExploration/deepExploration.js' // 响应式变量定义 const type = ref('deepExploration') @@ -92,6 +102,29 @@ }, ]) + //搜索股票 + const searchStock = () => { + 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{ + uni.showToast({ + title: '请选择模块', + icon: 'none', + duration: 2000 + }) + } + + } //点击四大模块 const handleModel = (index) => { currentIndex.value = index @@ -110,9 +143,42 @@ } } + const stockName = ref('') + const searchName = ref('') + const stockCode = ref('') + const language = ref('') + const recordId = ref('') + const parentId = ref('') + const stockId = ref('') //点击主力追踪 - const handleTrack = () => { - + 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); + } + + } catch { + + } } //点击主力雷达 @@ -129,12 +195,7 @@ const handleCapitalFlow = () => { } - const stockName = ref('TSLA') - //搜索股票 - const searchStock = () => { - console.log('搜索参数:', stockName.value); - } // 1. K线图配置 const opts = ref({ @@ -733,7 +794,8 @@ width: 100%; } } - *{ + + * { box-sizing: border-box; } \ No newline at end of file From 3e7ac6fbf06932f80890bd9ca43641b77a636b7a Mon Sep 17 00:00:00 2001 From: wangyi <3432649580@qq.com> Date: Wed, 29 Oct 2025 13:23:33 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B7=B1=E5=BA=A6=E6=8E=A2=E7=B4=A2?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/deepExploration/deepExploration.js | 13 + components/deepExploration_header.vue | 66 +-- pages/deepExploration/deepExploration.vue | 871 ++++++++++++++++-------------- stores/index.js | 1 + stores/modules/deepExploration.js | 44 ++ utils/http.js | 7 +- 6 files changed, 532 insertions(+), 470 deletions(-) create mode 100644 stores/modules/deepExploration.js diff --git a/api/deepExploration/deepExploration.js b/api/deepExploration/deepExploration.js index 386e0bf..d2d33bb 100644 --- a/api/deepExploration/deepExploration.js +++ b/api/deepExploration/deepExploration.js @@ -21,3 +21,16 @@ export const RecordListApi = (data) => { } + + +//历史记录详情 +export const RecordInfoApi = (data) => { + return http({ + method: 'POST', + url: '/api/coze/clickRecord', + data:data + }) +} + + + diff --git a/components/deepExploration_header.vue b/components/deepExploration_header.vue index 2a63d6a..daae53c 100644 --- a/components/deepExploration_header.vue +++ b/components/deepExploration_header.vue @@ -84,8 +84,12 @@ \ No newline at end of file diff --git a/stores/index.js b/stores/index.js index 354b74d..ada9fd8 100644 --- a/stores/index.js +++ b/stores/index.js @@ -9,5 +9,6 @@ pinia.use(persist) // 导入所有模块 export * from './modules/userInfo' export * from './modules/deviceInfo' +export * from './modules/deepExploration' // 默认导出,给 main.js 使用 export default pinia \ No newline at end of file diff --git a/stores/modules/deepExploration.js b/stores/modules/deepExploration.js new file mode 100644 index 0000000..d326807 --- /dev/null +++ b/stores/modules/deepExploration.js @@ -0,0 +1,44 @@ +import { defineStore } from 'pinia' +import { ref } from 'vue' + +// 定义 Store +export const useDeepExplorationStore = defineStore( + 'deepExploration', + () => { + // 会员信息 + const deepExplorationInfo = ref() + + // 保存会员信息,登录时使用 + const setDeepExplorationInfo = (val) => { + deepExplorationInfo.value = val + } + + // 清理会员信息,退出时使用 + const clearDeepExplorationInfo = () => { + deepExplorationInfo.value = undefined + } + + // 记得 return + return { + deepExplorationInfo, + setDeepExplorationInfo, + clearDeepExplorationInfo, + } + }, + // TODO: 持久化 + { + // 网页端持久化 + // persist: true, + // 小程序端持久化 + persist: { + storage: { + getItem(key) { + return uni.getStorageSync(key) + }, + setItem(key, value) { + uni.setStorageSync(key, value) + }, + }, + }, + }, +) diff --git a/utils/http.js b/utils/http.js index 51668a2..7ef4d56 100644 --- a/utils/http.js +++ b/utils/http.js @@ -30,15 +30,14 @@ const httpInterceptor = { const deviceInfo =useDeviceStore() - const client = 'ios'; + options.header = { ...options.header, - 'source-client': 'miniapp', // 标准头与文档头同时设置,确保兼容 'content-type': 'application/json', 'contentType': 'application/json', - 'version': '1', - 'client': client, + 'version': uni.getSystemInfoSync().appVersion, + 'client': uni.getSystemInfoSync().platform == 'ios' ? 'ios' : 'android', 'deviceId': deviceInfo.deviceInfo.deviceId } //4 添加token,优先用store,没有则回退到body中的token,保持与Apifox一致 From 4aa1b1aca4ccfa07bd03df5ca236242e343c5350 Mon Sep 17 00:00:00 2001 From: wangyi <3432649580@qq.com> Date: Wed, 29 Oct 2025 13:29:14 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/tcpConnection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tcpConnection.js b/api/tcpConnection.js index c701ca3..c31188e 100644 --- a/api/tcpConnection.js +++ b/api/tcpConnection.js @@ -6,7 +6,7 @@ */ // 引用TCP插件 -// const TCPSocket = uni.requireNativePlugin('Aimer-TCPPlugin'); +const TCPSocket = uni.requireNativePlugin('Aimer-TCPPlugin'); // const TCPSocket = uni.requireNativePlugin("Aimer-TCPPlugin"); // TCP连接配置 From a8eb4f3d52a936894ea4cf245039d2a43c06a9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Wed, 29 Oct 2025 15:21:22 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=9F=9F=E5=90=8D=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/util.js | 2 +- utils/http.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/util.js b/common/util.js index 3fbc198..8ef5cb4 100644 --- a/common/util.js +++ b/common/util.js @@ -1,6 +1,6 @@ var util = {} util.data = {} -util.data.base_url = 'https://hwjb.homilychart.com/testApi' +util.data.base_url = 'https://dbqb.nfdxy.net/testApi' // util.data.base_url = 'https://dbqb.nfdxy.net/prodApi' // AJAX 请求方法 diff --git a/utils/http.js b/utils/http.js index b4a2740..69d672f 100644 --- a/utils/http.js +++ b/utils/http.js @@ -1,7 +1,7 @@ import { useUserStore } from "../stores/modules/userInfo" import { useDeviceStore } from "../stores/modules/deviceInfo" -const baseURL = "https://hwjb.homilychart.com/testApi" +const baseURL = "https://dbqb.nfdxy.net/testApi" const httpInterceptor = {