diff --git a/frontend/admin-web/src/components/features/system-account-report/SystemAccountsTab.tsx b/frontend/admin-web/src/components/features/system-account-report/SystemAccountsTab.tsx index 6136fab6..fc097921 100644 --- a/frontend/admin-web/src/components/features/system-account-report/SystemAccountsTab.tsx +++ b/frontend/admin-web/src/components/features/system-account-report/SystemAccountsTab.tsx @@ -299,9 +299,18 @@ function RegionAccountsSection({ data, type }: { data: RegionAccountsSummary; ty /** * 面对面结算统计区域 - * [2026-01-05] 更新:USDT改为绿积分 + * [2026-01-05] 更新:USDT改为绿积分,添加空值检查 */ -function OfflineSettlementSection({ data }: { data: SystemAccountReportResponse['offlineSettlement'] }) { +function OfflineSettlementSection({ data }: { data: SystemAccountReportResponse['offlineSettlement'] | null | undefined }) { + if (!data) { + return ( +
+

面对面结算统计

+
暂无面对面结算数据
+
+ ); + } + return (

面对面结算统计

@@ -310,7 +319,7 @@ function OfflineSettlementSection({ data }: { data: SystemAccountReportResponse[
总笔数 - {data.totalCount} + {data.totalCount ?? 0}
总金额 @@ -319,7 +328,7 @@ function OfflineSettlementSection({ data }: { data: SystemAccountReportResponse[
{/* 按月统计 */} - {data.byMonth.length > 0 && ( + {data.byMonth && data.byMonth.length > 0 && ( <>

按月统计

@@ -345,7 +354,7 @@ function OfflineSettlementSection({ data }: { data: SystemAccountReportResponse[ )} - {data.byMonth.length === 0 && ( + {(!data.byMonth || data.byMonth.length === 0) && (
暂无面对面结算数据
)}
@@ -354,9 +363,18 @@ function OfflineSettlementSection({ data }: { data: SystemAccountReportResponse[ /** * 过期收益统计区域 - * [2026-01-05] 更新:USDT改为绿积分 + * [2026-01-05] 更新:USDT改为绿积分,添加空值检查 */ -function ExpiredRewardsSection({ data }: { data: SystemAccountReportResponse['expiredRewards'] }) { +function ExpiredRewardsSection({ data }: { data: SystemAccountReportResponse['expiredRewards'] | null | undefined }) { + if (!data) { + return ( +
+

过期收益统计

+
暂无过期收益数据
+
+ ); + } + return (

过期收益统计

@@ -365,7 +383,7 @@ function ExpiredRewardsSection({ data }: { data: SystemAccountReportResponse['ex
总笔数 - {data.totalCount} + {data.totalCount ?? 0}
总金额 @@ -374,7 +392,7 @@ function ExpiredRewardsSection({ data }: { data: SystemAccountReportResponse['ex
{/* 按权益类型统计 */} - {data.byRightType.length > 0 && ( + {data.byRightType && data.byRightType.length > 0 && ( <>

按权益类型统计

@@ -401,7 +419,7 @@ function ExpiredRewardsSection({ data }: { data: SystemAccountReportResponse['ex )} {/* 按月统计 */} - {data.byMonth.length > 0 && ( + {data.byMonth && data.byMonth.length > 0 && ( <>

按月统计

@@ -427,7 +445,7 @@ function ExpiredRewardsSection({ data }: { data: SystemAccountReportResponse['ex )} - {data.byRightType.length === 0 && data.byMonth.length === 0 && ( + {(!data.byRightType || data.byRightType.length === 0) && (!data.byMonth || data.byMonth.length === 0) && (
暂无过期收益数据
)}