|
|
|
@ -43,7 +43,7 @@ |
|
|
|
</view> |
|
|
|
<view class="cards-grid-three"> |
|
|
|
<view v-for="(item, index) in asiachinaIndexes" :key="index" class="card-item"> |
|
|
|
<IndexCard :flagIcon="item.flagIcon" :indexName="item.indexName" |
|
|
|
<IndexCard :flagIcon="item.flagIcon" :stockName="item.stockName" |
|
|
|
:currentPrice="item.currentPrice" :changeAmount="item.changeAmount" |
|
|
|
:changePercent="item.changePercent" :isRising="item.isRising" |
|
|
|
@click="viewIndexDetail(item)" /> |
|
|
|
@ -62,7 +62,7 @@ |
|
|
|
</view> |
|
|
|
<view class="cards-grid-three"> |
|
|
|
<view v-for="(item, index) in asiaIndexes" :key="index" class="card-item"> |
|
|
|
<IndexCard :flagIcon="item.flagIcon" :indexName="item.indexName" |
|
|
|
<IndexCard :flagIcon="item.flagIcon" :stockName="item.stockName" |
|
|
|
:currentPrice="item.currentPrice" :changeAmount="item.changeAmount" |
|
|
|
:changePercent="item.changePercent" :isRising="item.isRising" |
|
|
|
@click="viewIndexDetail(item)" /> |
|
|
|
@ -81,7 +81,7 @@ |
|
|
|
</view> |
|
|
|
<view class="cards-grid-three"> |
|
|
|
<view v-for="(item, index) in americaIndexes" :key="index" class="card-item"> |
|
|
|
<IndexCard :flagIcon="item.flagIcon" :indexName="item.indexName" |
|
|
|
<IndexCard :flagIcon="item.flagIcon" :stockName="item.stockName" |
|
|
|
:currentPrice="item.currentPrice" :changeAmount="item.changeAmount" |
|
|
|
:changePercent="item.changePercent" :isRising="item.isRising" |
|
|
|
@click="viewIndexDetail(item)" /> |
|
|
|
@ -145,7 +145,8 @@ const checkWarnTextOverflow = () => { |
|
|
|
const asiachinaIndexes = ref([ |
|
|
|
{ |
|
|
|
flagIcon: '/static/c1.png', |
|
|
|
indexName: '上证指数', |
|
|
|
stockName: '上证指数', |
|
|
|
stockCode:'noCode', |
|
|
|
currentPrice: '3933.96', |
|
|
|
changeAmount: '+24.32', |
|
|
|
changePercent: '+0.62%', |
|
|
|
@ -153,7 +154,8 @@ const asiachinaIndexes = ref([ |
|
|
|
}, |
|
|
|
{ |
|
|
|
flagIcon: '/static/c2.png', |
|
|
|
indexName: '深证成指', |
|
|
|
stockName: '深证成指', |
|
|
|
stockCode:'noCode', |
|
|
|
currentPrice: '45757.90', |
|
|
|
changeAmount: '-123.45', |
|
|
|
changePercent: '-0.27%', |
|
|
|
@ -161,7 +163,8 @@ const asiachinaIndexes = ref([ |
|
|
|
}, |
|
|
|
{ |
|
|
|
flagIcon: '/static/c3.png', |
|
|
|
indexName: '创业板指', |
|
|
|
stockName: '创业板指', |
|
|
|
stockCode:'noCode', |
|
|
|
currentPrice: '6606.08', |
|
|
|
changeAmount: '+89.76', |
|
|
|
changePercent: '+1.38%', |
|
|
|
@ -169,7 +172,8 @@ const asiachinaIndexes = ref([ |
|
|
|
}, |
|
|
|
{ |
|
|
|
flagIcon: '/static/c4.png', |
|
|
|
indexName: 'HSI50', |
|
|
|
stockName: 'HSI50', |
|
|
|
stockCode:'noCode', |
|
|
|
currentPrice: '22333.96', |
|
|
|
changeAmount: '+156.78', |
|
|
|
changePercent: '+0.71%', |
|
|
|
@ -177,7 +181,8 @@ const asiachinaIndexes = ref([ |
|
|
|
}, |
|
|
|
{ |
|
|
|
flagIcon: '/static/c5.png', |
|
|
|
indexName: '沪深300', |
|
|
|
stockName: '沪深300', |
|
|
|
stockCode:'noCode', |
|
|
|
currentPrice: '45757.90', |
|
|
|
changeAmount: '-89.12', |
|
|
|
changePercent: '-0.19%', |
|
|
|
@ -185,7 +190,8 @@ const asiachinaIndexes = ref([ |
|
|
|
}, |
|
|
|
{ |
|
|
|
flagIcon: '/static/c6.png', |
|
|
|
indexName: '上证50', |
|
|
|
stockName: '上证50', |
|
|
|
stockCode:'noCode', |
|
|
|
currentPrice: '45757.90', |
|
|
|
changeAmount: '+234.56', |
|
|
|
changePercent: '+0.52%', |
|
|
|
@ -197,7 +203,8 @@ const asiachinaIndexes = ref([ |
|
|
|
const asiaIndexes = ref([ |
|
|
|
{ |
|
|
|
flagIcon: '/static/c7.png', |
|
|
|
indexName: '日经225', |
|
|
|
stockName: '日经225', |
|
|
|
stockCode:'noCode', |
|
|
|
currentPrice: '28456.78', |
|
|
|
changeAmount: '+234.56', |
|
|
|
changePercent: '+0.83%', |
|
|
|
@ -205,7 +212,8 @@ const asiaIndexes = ref([ |
|
|
|
}, |
|
|
|
{ |
|
|
|
flagIcon: '/static/c8.png', |
|
|
|
indexName: '韩国KOSPI', |
|
|
|
stockName: '韩国KOSPI', |
|
|
|
stockCode:'noCode', |
|
|
|
currentPrice: '2567.89', |
|
|
|
changeAmount: '-12.34', |
|
|
|
changePercent: '-0.48%', |
|
|
|
@ -213,7 +221,8 @@ const asiaIndexes = ref([ |
|
|
|
}, |
|
|
|
{ |
|
|
|
flagIcon: '/static/c9.png', |
|
|
|
indexName: '印度孟买', |
|
|
|
stockName: '印度孟买', |
|
|
|
stockCode:'noCode', |
|
|
|
currentPrice: '65432.10', |
|
|
|
changeAmount: '+456.78', |
|
|
|
changePercent: '+0.70%', |
|
|
|
@ -225,7 +234,8 @@ const asiaIndexes = ref([ |
|
|
|
const americaIndexes = ref([ |
|
|
|
{ |
|
|
|
flagIcon: '/static/c7.png', |
|
|
|
indexName: '道琼斯指数', |
|
|
|
stockName: '道琼斯指数', |
|
|
|
stockCode:'noCode', |
|
|
|
currentPrice: '34567.89', |
|
|
|
changeAmount: '+123.45', |
|
|
|
changePercent: '+0.36%', |
|
|
|
@ -233,7 +243,8 @@ const americaIndexes = ref([ |
|
|
|
}, |
|
|
|
{ |
|
|
|
flagIcon: '/static/c8.png', |
|
|
|
indexName: '纳斯达克', |
|
|
|
stockName: '纳斯达克', |
|
|
|
stockCode:'noCode', |
|
|
|
currentPrice: '13456.78', |
|
|
|
changeAmount: '-67.89', |
|
|
|
changePercent: '-0.50%', |
|
|
|
@ -241,7 +252,8 @@ const americaIndexes = ref([ |
|
|
|
}, |
|
|
|
{ |
|
|
|
flagIcon: '/static/c9.png', |
|
|
|
indexName: '标普500', |
|
|
|
stockName: '标普500', |
|
|
|
stockCode:'noCode', |
|
|
|
currentPrice: '4234.56', |
|
|
|
changeAmount: '+23.45', |
|
|
|
changePercent: '+0.56%', |
|
|
|
@ -281,16 +293,16 @@ const viewMore = (market) => { |
|
|
|
|
|
|
|
// 方法:查看指数详情 |
|
|
|
const viewIndexDetail = (item) => { |
|
|
|
console.log('查看指数详情:', item.indexName) |
|
|
|
uni.showToast({ |
|
|
|
title: `查看 ${item.indexName} 详情`, |
|
|
|
icon: 'none', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
// 这里可以跳转到具体的指数详情页面 |
|
|
|
// uni.navigateTo({ |
|
|
|
// url: `/pages/detail/indexDetail?id=${item.id}` |
|
|
|
console.log('查看指数详情:', item.stockName) |
|
|
|
// uni.showToast({ |
|
|
|
// title: `查看 ${item.stockName} 详情`, |
|
|
|
// icon: 'none', |
|
|
|
// duration: 2000 |
|
|
|
// }) |
|
|
|
// 这里可以跳转到具体的指数详情页面 |
|
|
|
uni.navigateTo({ |
|
|
|
url: `/pages/marketSituation/marketCondition?stockInformation=${encodeURIComponent(JSON.stringify(item))}` |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 生命周期:页面挂载 |
|
|
|
|