Compare commits

...

2 Commits

Author SHA1 Message Date
guke fdda834a71 fix: 比价记录列表兼容 user_id 为空的孤儿行 (#103)
后端 admin 比价列表现允许 user_id=null(软鉴权/匿名帧0 建行的孤儿行)。
同步 ComparisonRecordListItem 类型为可空,用户列由 #null 兜底显示为「匿名」。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: guke <guke@autohome.com.cn>
Reviewed-on: #103
2026-08-04 11:05:13 +08:00
guke b7fa15ec9c fix: 比价记录列表兼容 user_id 为空的孤儿行 (#102)
后端 admin 比价列表现允许 user_id=null(软鉴权/匿名帧0 建行的孤儿行)。
同步 ComparisonRecordListItem 类型为可空,用户列由 #null 兜底显示为「匿名」。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: guke <guke@autohome.com.cn>
Reviewed-on: #102
2026-08-04 10:55:05 +08:00
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -408,7 +408,7 @@ export default function ComparisonRecordsPage() {
width: 140,
render: (_, r) => (
<div style={{ color: '#1677ff' }}>
<div>{r.phone || `#${r.user_id}`}</div>
<div>{r.phone || (r.user_id != null ? `#${r.user_id}` : '匿名')}</div>
{r.nickname && <div style={{ fontSize: 12 }}>{r.nickname}</div>}
</div>
),
@@ -622,7 +622,7 @@ export default function ComparisonRecordsPage() {
<Space direction="vertical" size="middle" style={{ width: '100%' }}>
<Descriptions size="small" column={2} bordered>
<Descriptions.Item label="用户">
{detail.phone || `#${detail.user_id}`}{detail.nickname ? `(${detail.nickname})` : ''}
{detail.phone || (detail.user_id != null ? `#${detail.user_id}` : '匿名')}{detail.nickname ? `(${detail.nickname})` : ''}
</Descriptions.Item>
<Descriptions.Item label="状态"><Tag color={STATUS_COLOR[detail.status]}>{STATUS_LABEL[detail.status] || detail.status}</Tag></Descriptions.Item>
<Descriptions.Item label="业务">{detail.business_type}</Descriptions.Item>
+1 -1
View File
@@ -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;