|
|
@@ -128,20 +128,11 @@ const performanceStats = reactive({
|
|
|
totalCount: 0
|
|
|
})
|
|
|
|
|
|
-// 日期变化时加载统计数据
|
|
|
-const onDateChange = async ({ startDate, endDate, poolType }) => {
|
|
|
- // 检查登录状态,未登录则不查询
|
|
|
- if (!checkLogin()) {
|
|
|
- console.log('[超短池] 未登录,跳过统计数据查询')
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
+// 加载全量统计数据(不受日期区间影响)
|
|
|
+const loadPerformanceStats = async (poolType) => {
|
|
|
+ if (!checkLogin()) return
|
|
|
try {
|
|
|
- const res = await getStockHistoryStats({
|
|
|
- startDate,
|
|
|
- endDate,
|
|
|
- poolType
|
|
|
- })
|
|
|
+ const res = await getStockHistoryStats({ poolType })
|
|
|
if (res.code === 200 && res.data) {
|
|
|
performanceStats.successRate = res.data.successRate || '0%'
|
|
|
performanceStats.avgTrend = res.data.avgTrend || '+0%'
|
|
|
@@ -152,6 +143,10 @@ const onDateChange = async ({ startDate, endDate, poolType }) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 日期变化时只刷新列表,不再更新统计数据
|
|
|
+const onDateChange = async ({ startDate, endDate, poolType }) => {
|
|
|
+}
|
|
|
+
|
|
|
// 获取涨跌样式
|
|
|
const getChangeClass = (changePercent) => {
|
|
|
if (!changePercent || changePercent === '-') return ''
|
|
|
@@ -415,6 +410,7 @@ onLoad(() => {
|
|
|
isPageVisible.value = true
|
|
|
checkPurchaseStatus()
|
|
|
startSubscriptionRefresh()
|
|
|
+ loadPerformanceStats(1)
|
|
|
})
|
|
|
|
|
|
onShow(() => {
|