@@ -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) && (
暂无过期收益数据
)}