Browse Source

Merge branch 'milestone-20251031-简版功能开发' of http://39.101.133.168:8807/qimaohong/deepChartVueApp into wangyi/feature-20251026183100-deepmate王毅

lihuilin/feature-20251024095243-我的
wangyi 4 weeks ago
parent
commit
16d037ac2d
  1. 71
      api/deepExploration/deepExploration.js
  2. 76
      pages/deepExploration/MainForceActions.vue
  3. 4
      utils/http.js

71
api/deepExploration/deepExploration.js

@ -1,11 +1,76 @@
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
})
}

76
pages/deepExploration/MainForceActions.vue

@ -5,7 +5,7 @@
<deepExploration_header></deepExploration_header>
<view class="search">
<input v-model="stockName" class="searchInput" type="text" placeholder="请输入股票名称、股票代码"
<input v-model="searchName" class="searchInput" type="text" placeholder="请输入股票名称、股票代码"
placeholder-style="color: #A6A6A6; font-size: 22rpx;" />
<image @click="searchStock" class="seachIcon" src="/static/deepExploration-images/search.png"
mode="aspectFill"></image>
@ -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,10 +143,43 @@
}
}
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 {
}
}
//
const handleRadar = () => {
@ -129,12 +195,7 @@
const handleCapitalFlow = () => {
}
const stockName = ref('TSLA')
//
const searchStock = () => {
console.log('搜索参数:', stockName.value);
}
// 1. K线
const opts = ref({
@ -733,6 +794,7 @@
width: 100%;
}
}
* {
box-sizing: border-box;
}

4
utils/http.js

@ -42,8 +42,8 @@ const httpInterceptor = {
}
//4 添加token,优先用store,没有则回退到body中的token,保持与Apifox一致
const memberStore = useUserStore()
// const token = memberStore.userInfo?.token || options.data?.token
const token = '1b3a58424c5324e40d4bf4d085e18047'
const token = memberStore.userInfo?.token || options.data?.token
// const token = '1b3a58424c5324e40d4bf4d085e18047'
if (token) {
options.header.token = token
}

Loading…
Cancel
Save