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 = [] }