|
|
|
@ -1,58 +1,33 @@ |
|
|
|
<template> |
|
|
|
<LoginPrompt ref="loginPrompt"></LoginPrompt> |
|
|
|
<view class="main"> |
|
|
|
<!-- 顶部状态栏占位 --> |
|
|
|
<view class="top" :style="{ height: iSMT + 'px' }"></view> |
|
|
|
<!-- 标题图标部分 --> |
|
|
|
<deepExploration_header |
|
|
|
></deepExploration_header> |
|
|
|
<deepExploration_header></deepExploration_header> |
|
|
|
<view class="search"> |
|
|
|
<input |
|
|
|
v-model="stockName" |
|
|
|
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> |
|
|
|
<input v-model="stockName" 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> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 四大功能模块 --> |
|
|
|
<view class="select"> |
|
|
|
<view class="selectItem" @click="toMain('主力追踪')"> |
|
|
|
<image |
|
|
|
class="img" |
|
|
|
src="/static/deepExploration-images/icon3.png" |
|
|
|
mode="aspectFill" |
|
|
|
></image> |
|
|
|
<image class="img" src="/static/deepExploration-images/icon3.png" mode="aspectFill"></image> |
|
|
|
<view class="txt">主力追踪</view> |
|
|
|
</view> |
|
|
|
<view class="selectItem" @click="toMain('主力雷达')"> |
|
|
|
<image |
|
|
|
class="img" |
|
|
|
src="/static/deepExploration-images/icon2.png" |
|
|
|
mode="aspectFill" |
|
|
|
></image> |
|
|
|
<image class="img" src="/static/deepExploration-images/icon2.png" mode="aspectFill"></image> |
|
|
|
<view class="txt">主力雷达</view> |
|
|
|
</view> |
|
|
|
<view class="selectItem" @click="toMain('主力解码')"> |
|
|
|
<image |
|
|
|
class="img" |
|
|
|
src="/static/deepExploration-images/icon1.png" |
|
|
|
mode="aspectFill" |
|
|
|
></image> |
|
|
|
<image class="img" src="/static/deepExploration-images/icon1.png" mode="aspectFill"></image> |
|
|
|
<view class="txt">主力解码</view> |
|
|
|
</view> |
|
|
|
<view class="selectItem" @click="toMain('主力资金流')"> |
|
|
|
<image |
|
|
|
class="img" |
|
|
|
src="/static/deepExploration-images/icon4.png" |
|
|
|
mode="aspectFill" |
|
|
|
></image> |
|
|
|
<image class="img" src="/static/deepExploration-images/icon4.png" mode="aspectFill"></image> |
|
|
|
<view class="txt">主力资金流</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -74,17 +49,11 @@ |
|
|
|
<view class="selectionItem"> |
|
|
|
<view class="header"> |
|
|
|
<view class="left"> |
|
|
|
<image |
|
|
|
src="/static/deepExploration-images/plus.png" |
|
|
|
mode="aspectFill" |
|
|
|
></image> |
|
|
|
<image src="/static/deepExploration-images/plus.png" mode="aspectFill"></image> |
|
|
|
<text>抄底卖顶</text> |
|
|
|
</view> |
|
|
|
<view class="right"> |
|
|
|
<image |
|
|
|
src="/static/deepExploration-images/Americle.png" |
|
|
|
mode="aspectFill" |
|
|
|
></image> |
|
|
|
<image src="/static/deepExploration-images/Americle.png" mode="aspectFill"></image> |
|
|
|
<text>美股</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -109,17 +78,11 @@ |
|
|
|
<view class="selectionItem"> |
|
|
|
<view class="header"> |
|
|
|
<view class="left"> |
|
|
|
<image |
|
|
|
src="/static/deepExploration-images/plus.png" |
|
|
|
mode="aspectFill" |
|
|
|
></image> |
|
|
|
<image src="/static/deepExploration-images/plus.png" mode="aspectFill"></image> |
|
|
|
<text>波段行情</text> |
|
|
|
</view> |
|
|
|
<view class="right"> |
|
|
|
<image |
|
|
|
src="/static/deepExploration-images/Americle.png" |
|
|
|
mode="aspectFill" |
|
|
|
></image> |
|
|
|
<image src="/static/deepExploration-images/Americle.png" mode="aspectFill"></image> |
|
|
|
<text>美股</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -151,8 +114,19 @@ |
|
|
|
} from 'vue' |
|
|
|
import footerBar from '@/components/footerBar.vue' |
|
|
|
import deepExploration_header from '@/components/deepExploration_header.vue' |
|
|
|
import { stocSelectApi, stocSelectByNameApi } from '@/api/deepExploration/deepExploration.js' |
|
|
|
import { |
|
|
|
stocSelectApi, |
|
|
|
stocSelectByNameApi |
|
|
|
} from '@/api/deepExploration/deepExploration.js' |
|
|
|
import { |
|
|
|
useUserStore |
|
|
|
} from '@/stores/modules/userInfo.js' |
|
|
|
import { |
|
|
|
getUserInfo |
|
|
|
} from "@/api/member" |
|
|
|
|
|
|
|
|
|
|
|
const userInfo = ref({}) |
|
|
|
const type = ref("deepExploration"); |
|
|
|
const iSMT = ref(0); |
|
|
|
|
|
|
|
@ -181,6 +155,14 @@ const stockName = ref(""); |
|
|
|
//搜索股票 |
|
|
|
const searchStock = () => { |
|
|
|
console.log("搜索参数:", stockName.value); |
|
|
|
console.log(userInfo.value.isVisitor); |
|
|
|
if (userInfo.value.isVisitor) { |
|
|
|
uni.showToast({ |
|
|
|
title: '请登录', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
uni.navigateTo({ |
|
|
|
url: `/pages/deepExploration/MainForceActions?stockName=${stockName.value}`, |
|
|
|
}); |
|
|
|
@ -199,7 +181,10 @@ const searchStock = () => { |
|
|
|
// 加载选股策略(接口) |
|
|
|
const loadStockSelection = async () => { |
|
|
|
try { |
|
|
|
const res = await stocSelectApi({ language: 'cn', size: 3 }) |
|
|
|
const res = await stocSelectApi({ |
|
|
|
language: 'cn', |
|
|
|
size: 3 |
|
|
|
}) |
|
|
|
// console.log('选股策略接口响应原始:', typeof res === 'object' ? JSON.stringify(res) : res) |
|
|
|
const raw = res?.data |
|
|
|
const listCandidates = [ |
|
|
|
@ -232,14 +217,19 @@ const searchStock = () => { |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
console.error('选股策略接口调用失败', e) |
|
|
|
uni.showToast({ title: '选股策略加载失败', icon: 'none' }) |
|
|
|
uni.showToast({ |
|
|
|
title: '选股策略加载失败', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 安徽板块:按名称查询,仅前三条,字段映射不变 |
|
|
|
const loadStockSelectionByName = async () => { |
|
|
|
try { |
|
|
|
const res = await stocSelectByNameApi({ name: '安徽' }) |
|
|
|
const res = await stocSelectByNameApi({ |
|
|
|
name: '安徽' |
|
|
|
}) |
|
|
|
const raw = res?.data |
|
|
|
const dataObj = raw?.data || raw |
|
|
|
let list = [] |
|
|
|
@ -268,7 +258,10 @@ const searchStock = () => { |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
console.error('按名称(安徽)接口调用失败', e) |
|
|
|
uni.showToast({ title: '安徽板块加载失败', icon: 'none' }) |
|
|
|
uni.showToast({ |
|
|
|
title: '安徽板块加载失败', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -276,8 +269,11 @@ const searchStock = () => { |
|
|
|
// 状态栏高度 |
|
|
|
iSMT.value = uni.getSystemInfoSync().statusBarHeight; |
|
|
|
// 调用接口填充数据 |
|
|
|
getUserInfo() |
|
|
|
loadStockSelection() |
|
|
|
loadStockSelectionByName() // 安徽板块填充 |
|
|
|
userInfo.value = useUserStore().userInfo |
|
|
|
console.log('用户信息', userInfo.value); |
|
|
|
}) |
|
|
|
</script> |
|
|
|
|
|
|
|
|