Browse Source

Merge branch 'milestone-20251031-简版功能开发' of http://39.101.133.168:8807/qimaohong/deepChartVueApp into milestone-20251031-简版功能开发

dongqian/feature-20251022181325-deepmate简版
ZhangYong 3 weeks ago
parent
commit
3e26fd1644
  1. 30
      pages/deepExploration/deepExploration.vue
  2. 46
      pages/deepExploration/stockSelectDetail.vue
  3. 14
      pages/deepMate/deepMate.vue

30
pages/deepExploration/deepExploration.vue

@ -46,14 +46,20 @@
</view> </view>
<view class="stockSelection_content"> <view class="stockSelection_content">
<view class="selectionItem" @click="viewAll">
<view class="selectionItem">
<view class="header"> <view class="header">
<view class="left"> <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> <text>抄底卖顶</text>
</view> </view>
<view class="right"> <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> <text>美股</text>
</view> </view>
</view> </view>
@ -65,7 +71,7 @@
</view> </view>
<view class="contentItem"> <view class="contentItem">
<view class="row" v-for="(item, index) in stockData" :key="index"> <view class="row" v-for="(item, index) in stockData" :key="index">
<view class="nameItem">{{ item.tscode }}</view>
<view class="nameItem">{{ item.tscode }}{{ item.stockName }}</view>
<view class="closeItem">{{ item.close }}</view> <view class="closeItem">{{ item.close }}</view>
<view class="priceItem">{{ item.preClose }}</view> <view class="priceItem">{{ item.preClose }}</view>
</view> </view>
@ -75,14 +81,20 @@
</view> </view>
<view class="stockSelection_content"> <view class="stockSelection_content">
<view class="selectionItem" @click="viewAll">
<view class="selectionItem">
<view class="header"> <view class="header">
<view class="left"> <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> <text>波段行情</text>
</view> </view>
<view class="right"> <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> <text>美股</text>
</view> </view>
</view> </view>
@ -94,7 +106,7 @@
</view> </view>
<view class="contentItem"> <view class="contentItem">
<view class="row" v-for="(item, index) in stockDataByName" :key="index"> <view class="row" v-for="(item, index) in stockDataByName" :key="index">
<view class="nameItem">{{ item.tscode }}</view>
<view class="nameItem">{{ item.tscode }}{{ item.stockName }}</view>
<view class="closeItem">{{ item.close }}</view> <view class="closeItem">{{ item.close }}</view>
<view class="priceItem">{{ item.preClose }}</view> <view class="priceItem">{{ item.preClose }}</view>
</view> </view>
@ -207,6 +219,7 @@
if (Array.isArray(list) && list.length) { if (Array.isArray(list) && list.length) {
const mapped = list.map(item => ({ const mapped = list.map(item => ({
tscode: item.tsCode ?? item.tscode ?? item.code ?? '', tscode: item.tsCode ?? item.tscode ?? item.code ?? '',
stockName: item.stockName ?? item.name ?? '',
close: item.close ?? item.lastClose ?? '', close: item.close ?? item.lastClose ?? '',
preClose: item.preClose ?? item.preclose ?? item.prevClose ?? '' preClose: item.preClose ?? item.preclose ?? item.prevClose ?? ''
})) }))
@ -248,6 +261,7 @@
if (Array.isArray(list) && list.length) { if (Array.isArray(list) && list.length) {
const mapped = list.map(item => ({ const mapped = list.map(item => ({
tscode: item.tsCode ?? item.tscode ?? item.code ?? '', tscode: item.tsCode ?? item.tscode ?? item.code ?? '',
stockName: item.stockName ?? item.name ?? '',
close: item.close ?? item.lastClose ?? '', close: item.close ?? item.lastClose ?? '',
preClose: item.preClose ?? item.preclose ?? item.prevClose ?? '' preClose: item.preClose ?? item.preclose ?? item.prevClose ?? ''
})) }))

46
pages/deepExploration/stockSelectDetail.vue

@ -156,19 +156,22 @@
if (Array.isArray(list)) list = sortByPctDesc(list) if (Array.isArray(list)) list = sortByPctDesc(list)
if (Array.isArray(list) && list.length) { if (Array.isArray(list) && list.length) {
strategyData.value = list.map(item => ({ strategyData.value = list.map(item => ({
name: item.tsCode ?? item.tscode ?? '',
stockCode: item.tsCode ?? item.tscode ?? '',
latest: item.close ?? '',
name: item.stockName ?? item.name ?? item.tsName ?? item.tsname ?? item.secName ?? '',
stockCode: item.tsCode ?? item.tscode ?? item.code ?? item.symbol ?? '',
latest: item.close ?? item.lastClose ?? '',
increase: formatPctChg(item.pctChg), increase: formatPctChg(item.pctChg),
decrease: item.change ?? '',
previousClose: item.preClose ?? item.preclose ?? '',
volume: item.vol ?? '',
turnover: item.amount ?? '',
openingPrice: item.open ?? '',
highestPrice: item.high ?? '',
lowestPrice: item.low ?? ''
decrease: item.change ?? item.chg ?? '',
previousClose: item.preClose ?? item.preclose ?? item.prevClose ?? '',
volume: item.vol ?? item.volume ?? '',
turnover: item.amount ?? item.turnover ?? '',
openingPrice: item.open ?? item.openPrice ?? '',
highestPrice: item.high ?? item.highPrice ?? '',
lowestPrice: item.low ?? item.lowPrice ?? ''
})) }))
console.log(`按名称(${apiName})加载成功,条数:`, strategyData.value.length, '首项:', strategyData.value[0]) console.log(`按名称(${apiName})加载成功,条数:`, strategyData.value.length, '首项:', strategyData.value[0])
if (!strategyData.value[0]?.name) {
console.warn('名称字段未命中,原始keys示例:', Object.keys(list[0] || {}))
}
} else { } else {
console.warn('getStrategyByName 返回空列表或结构不匹配', raw) console.warn('getStrategyByName 返回空列表或结构不匹配', raw)
} }
@ -203,19 +206,22 @@
if (Array.isArray(list)) list = sortByPctDesc(list) if (Array.isArray(list)) list = sortByPctDesc(list)
if (Array.isArray(list) && list.length) { if (Array.isArray(list) && list.length) {
strategyData.value = list.map(item => ({ strategyData.value = list.map(item => ({
name: item.tsCode ?? item.tscode ?? '',
stockCode: item.tsCode ?? item.tscode ?? '',
latest: item.close ?? '',
name: item.stockName ?? item.name ?? item.tsName ?? item.tsname ?? item.secName ?? '',
stockCode: item.tsCode ?? item.tscode ?? item.code ?? item.symbol ?? '',
latest: item.close ?? item.lastClose ?? '',
increase: formatPctChg(item.pctChg), increase: formatPctChg(item.pctChg),
decrease: item.change ?? '',
previousClose: item.preClose ?? item.preclose ?? '',
volume: item.vol ?? '',
turnover: item.amount ?? '',
openingPrice: item.open ?? '',
highestPrice: item.high ?? '',
lowestPrice: item.low ?? ''
decrease: item.change ?? item.chg ?? '',
previousClose: item.preClose ?? item.preclose ?? item.prevClose ?? '',
volume: item.vol ?? item.volume ?? '',
turnover: item.amount ?? item.turnover ?? '',
openingPrice: item.open ?? item.openPrice ?? '',
highestPrice: item.high ?? item.highPrice ?? '',
lowestPrice: item.low ?? item.lowPrice ?? ''
})) }))
console.log('stockSelectDetail 加载成功(已按涨幅降序),条数:', strategyData.value.length, '首项:', strategyData.value[0]) console.log('stockSelectDetail 加载成功(已按涨幅降序),条数:', strategyData.value.length, '首项:', strategyData.value[0])
if (!strategyData.value[0]?.name) {
console.warn('名称字段未命中,原始keys示例:', Object.keys(list[0] || {}))
}
} else { } else {
console.warn('stockSelectDetail 接口返回空列表或结构不匹配', raw) console.warn('stockSelectDetail 接口返回空列表或结构不匹配', raw)
} }

14
pages/deepMate/deepMate.vue

@ -1226,23 +1226,23 @@ async function itemClick(item) {
/* min-height: 20rpx; */ /* min-height: 20rpx; */
/* border-radius: 20rpx; */ /* border-radius: 20rpx; */
padding: 40rpx; padding: 40rpx;
margin-top: 20rpx;
margin-top: 10rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
/* box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05); */ /* box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05); */
} }
.welcome-section { .welcome-section {
/* 灰色卡片(recommend-card)之后展示背景图 */ /* 灰色卡片(recommend-card)之后展示背景图 */
margin-top: 2rem;
margin-top: 1.5rem;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: url("https://d31zlh4on95l9h.cloudfront.net/images/eca84d9fb54712cb3bc6c6174773b83b.svg"); background: url("https://d31zlh4on95l9h.cloudfront.net/images/eca84d9fb54712cb3bc6c6174773b83b.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center top;
/* 放在容器顶部,正好在灰色卡片下方 */
background-size: 80% auto;
/* 缩放以适配宽度 */
background-position: center center;
/* 居中显示,避免顶部被裁剪 */
background-size: contain;
/* 保证整张图片完整展示 */
height: 460rpx; height: 460rpx;
/* 提供可视高度,让背景图可见 */ /* 提供可视高度,让背景图可见 */
} }
@ -1558,7 +1558,7 @@ async function itemClick(item) {
inset: 0; inset: 0;
/* 顶部、底部、左、右都贴合容器 */ /* 顶部、底部、左、右都贴合容器 */
width: 100%; width: 100%;
height: 81%;
height: 83%;
border-radius: 15rpx; border-radius: 15rpx;
z-index: 1; z-index: 1;
/* 在灰底之上、内容之下 */ /* 在灰底之上、内容之下 */

Loading…
Cancel
Save