From 7baee5faff7330a4c3c10ccfadbd09845b300fca Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Wed, 4 Mar 2026 22:12:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=A7=E5=B1=8F=EF=BC=8C=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=94=B6=E7=9B=8A=E5=80=92=E5=BA=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/invest/accountBigScreen/index.vue | 26 +++++++++++++-------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/views/invest/accountBigScreen/index.vue b/src/views/invest/accountBigScreen/index.vue index 1f9ae75..5719b0c 100644 --- a/src/views/invest/accountBigScreen/index.vue +++ b/src/views/invest/accountBigScreen/index.vue @@ -1722,12 +1722,15 @@ const loadAllData = async () => { weeklyExpenseData.value = weekDates.map((date) => ({ date, value: 0 })) } - // 处理近一周投资收益数据(使用 tableAccountsList 字段) + // 处理近一周投资收益数据(使用 tableAccountsList 字段,倒序后按时间正序展示) if (weeklyInvestRes && weeklyInvestRes.data && weeklyInvestRes.data.tableAccountsList) { - weeklyInvestIncomeData.value = weeklyInvestRes.data.tableAccountsList.map((item) => ({ - date: item.time.substring(5), // 只显示 MM-DD - value: Number(item.value) || 0 - })) + weeklyInvestIncomeData.value = weeklyInvestRes.data.tableAccountsList + .slice() + .reverse() + .map((item) => ({ + date: item.time.substring(5), // 只显示 MM-DD + value: Number(item.value) || 0 + })) } else { weeklyInvestIncomeData.value = weekDates.map((date) => ({ date, value: 0 })) } @@ -1784,12 +1787,15 @@ const loadAllData = async () => { monthlyExpenseData.value = [] } - // 处理近一月投资收益数据(使用 tableAccountsList 字段) + // 处理近一月投资收益数据(使用 tableAccountsList 字段,倒序后按时间正序展示) if (monthlyInvestRes && monthlyInvestRes.data && monthlyInvestRes.data.tableAccountsList) { - monthlyInvestIncomeData.value = monthlyInvestRes.data.tableAccountsList.map((item) => ({ - date: item.time.substring(5), // 只显示 MM-DD - value: Number(item.value) || 0 - })) + monthlyInvestIncomeData.value = monthlyInvestRes.data.tableAccountsList + .slice() + .reverse() + .map((item) => ({ + date: item.time.substring(5), // 只显示 MM-DD + value: Number(item.value) || 0 + })) } else { monthlyInvestIncomeData.value = [] }