diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue index b9fdab4..c9192bb 100755 --- a/pages/detail/detail.vue +++ b/pages/detail/detail.vue @@ -977,6 +977,12 @@ const fetchPortfolioData = async () => { if (response.code === 200) { portfolioData.value = response.data; positions.value = response.data.positions || []; + + // 动态设置页面标题 + if (response.data.name) { + uni.setNavigationBarTitle({ title: response.data.name }); + } + console.log('投资组合数据获取成功:', response.data); } } catch (error) { diff --git a/pages/index/index.vue b/pages/index/index.vue index e94d033..39a6ac1 100755 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -137,7 +137,7 @@ 今日变动 - {{ (holding.todayProfit || 0) >= 0 ? '+' : '' }}{{ getCurrencySymbol(holding.todayProfitCurrency || holding.currency) }}{{ Math.abs(holding.todayProfit || 0).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 }) }} + {{ (holding.todayProfit || 0) >= 0 ? '+' : '-' }}{{ getCurrencySymbol(holding.todayProfitCurrency || holding.currency) }}{{ Math.abs(holding.todayProfit || 0).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 }) }}