|
|
|
@ -114,6 +114,7 @@ |
|
|
|
} from 'vue' |
|
|
|
import footerBar from '@/components/footerBar.vue' |
|
|
|
import deepExploration_header from '@/components/deepExploration_header.vue' |
|
|
|
import { stocSelectApi } from '@/api/deepExploration/deepExploration.js' |
|
|
|
|
|
|
|
const type = ref('deepExploration') |
|
|
|
const iSMT = ref(0) |
|
|
|
@ -172,9 +173,35 @@ |
|
|
|
select: "$13.180" |
|
|
|
} |
|
|
|
]; |
|
|
|
|
|
|
|
// 加载选股策略(接口) |
|
|
|
const loadStockSelection = async () => { |
|
|
|
try { |
|
|
|
const res = await stocSelectApi({ |
|
|
|
language: 'cn' |
|
|
|
}) |
|
|
|
console.log('选股策略接口响应:', res) |
|
|
|
const list = Array.isArray(res?.data?.list) ? res.data.list : (Array.isArray(res?.data) ? res.data : []) |
|
|
|
if (Array.isArray(list) && list.length) { |
|
|
|
stockData.value = list.map(item => ({ |
|
|
|
name: item.name || item.stockName || item.code || '', |
|
|
|
close: item.close || item.lastClose || item.closePrice || '', |
|
|
|
select: item.select || item.selectPrice || item.price || '' |
|
|
|
})) |
|
|
|
} else { |
|
|
|
console.warn('选股策略接口返回空列表或结构不匹配') |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
console.error('选股策略接口调用失败', e) |
|
|
|
uni.showToast({ title: '选股策略加载失败', icon: 'none' }) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
// 状态栏高度 |
|
|
|
iSMT.value = uni.getSystemInfoSync().statusBarHeight; |
|
|
|
// 调用接口填充数据 |
|
|
|
loadStockSelection() |
|
|
|
}) |
|
|
|
</script> |
|
|
|
|
|
|
|
|