diff --git a/api/deepExploration/deepExploration.js b/api/deepExploration/deepExploration.js
index 754ad5e..ea763a4 100644
--- a/api/deepExploration/deepExploration.js
+++ b/api/deepExploration/deepExploration.js
@@ -92,7 +92,14 @@ export const stocSelectApi = (data) => {
data:data
})
}
-
+//根据名字选股策略
+export const stocSelectByNameApi = (data) => {
+ return http({
+ method: 'POST',
+ url: '/api/deep/getStrategyByName',
+ data:data
+ })
+}
//历史记录详情
diff --git a/pages/deepExploration/deepExploration.vue b/pages/deepExploration/deepExploration.vue
index 026d156..f6e6e67 100644
--- a/pages/deepExploration/deepExploration.vue
+++ b/pages/deepExploration/deepExploration.vue
@@ -113,7 +113,7 @@
src="/static/deepExploration-images/plus.png"
mode="aspectFill"
>
- 抄底卖顶
+ 波段行情
选股价格
-
+
{{ item.tscode }}
{{ item.close }}
{{ item.preClose }}
@@ -151,7 +151,7 @@
} from 'vue'
import footerBar from '@/components/footerBar.vue'
import deepExploration_header from '@/components/deepExploration_header.vue'
- import { stocSelectApi } from '@/api/deepExploration/deepExploration.js'
+ import { stocSelectApi, stocSelectByNameApi } from '@/api/deepExploration/deepExploration.js'
const type = ref("deepExploration");
const iSMT = ref(0);
@@ -194,6 +194,7 @@ const searchStock = () => {
}
//选股策略数据(接口填充)
const stockData = ref([]);
+ const stockDataByName = ref([]); // 安徽板块数据(只显示前三条)
// 加载选股策略(接口)
const loadStockSelection = async () => {
@@ -235,11 +236,48 @@ const searchStock = () => {
}
}
+ // 安徽板块:按名称查询,仅前三条,字段映射不变
+ const loadStockSelectionByName = async () => {
+ try {
+ const res = await stocSelectByNameApi({ name: '安徽' })
+ const raw = res?.data
+ const dataObj = raw?.data || raw
+ let list = []
+ if (Array.isArray(dataObj)) {
+ list = dataObj
+ } else if (dataObj && typeof dataObj === 'object') {
+ const target = dataObj['安徽']
+ if (Array.isArray(target)) {
+ list = target
+ } else {
+ const firstArr = Object.values(dataObj).find(v => Array.isArray(v))
+ if (Array.isArray(firstArr)) list = firstArr
+ }
+ }
+
+ if (Array.isArray(list) && list.length) {
+ const mapped = list.map(item => ({
+ tscode: item.tsCode ?? item.tscode ?? item.code ?? '',
+ close: item.close ?? item.lastClose ?? '',
+ preClose: item.preClose ?? item.preclose ?? item.prevClose ?? ''
+ }))
+ stockDataByName.value = mapped.slice(0, 3)
+ console.log('安徽板块列表长度:', stockDataByName.value.length, '首项:', stockDataByName.value[0])
+ } else {
+ console.warn('按名称(安徽)接口返回空列表或结构不匹配', raw)
+ }
+ } catch (e) {
+ console.error('按名称(安徽)接口调用失败', e)
+ uni.showToast({ title: '安徽板块加载失败', icon: 'none' })
+ }
+ }
+
onMounted(() => {
// 状态栏高度
iSMT.value = uni.getSystemInfoSync().statusBarHeight;
// 调用接口填充数据
loadStockSelection()
+ loadStockSelectionByName() // 安徽板块填充
})
diff --git a/pages/deepExploration/stockSelectDetail.vue b/pages/deepExploration/stockSelectDetail.vue
index 64ee01d..3a90ec4 100644
--- a/pages/deepExploration/stockSelectDetail.vue
+++ b/pages/deepExploration/stockSelectDetail.vue
@@ -3,12 +3,12 @@
-
+
+
@@ -23,7 +23,7 @@
-
{{item.name}}
@@ -48,153 +48,176 @@