diff --git a/src/app/(main)/comparison-records/page.tsx b/src/app/(main)/comparison-records/page.tsx index 0be31eb..a5311ac 100644 --- a/src/app/(main)/comparison-records/page.tsx +++ b/src/app/(main)/comparison-records/page.tsx @@ -408,7 +408,7 @@ export default function ComparisonRecordsPage() { width: 140, render: (_, r) => (
-
{r.phone || `#${r.user_id}`}
+
{r.phone || (r.user_id != null ? `#${r.user_id}` : '匿名')}
{r.nickname &&
{r.nickname}
}
), @@ -622,7 +622,7 @@ export default function ComparisonRecordsPage() { - {detail.phone || `#${detail.user_id}`}{detail.nickname ? `(${detail.nickname})` : ''} + {detail.phone || (detail.user_id != null ? `#${detail.user_id}` : '匿名')}{detail.nickname ? `(${detail.nickname})` : ''} {STATUS_LABEL[detail.status] || detail.status} {detail.business_type} diff --git a/src/lib/types.ts b/src/lib/types.ts index 467ccad..4776905 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -443,7 +443,7 @@ export interface AuditLog { // ===== 比价记录(admin debug 页)===== export interface ComparisonRecordListItem { id: number; - user_id: number; + user_id: number | null; // 软鉴权/匿名下帧0 建行时可能暂缺,admin 全看含孤儿行 phone: string | null; nickname: string | null; business_type: string;