fix(distribution): 分销后台展示完整用户手机号信息

- 后端 ListReceivedListings 移除 owner_phone 脱敏,向分销商返回完整卖家手机号
- 前端 Orders.tsx 移除 maskPhone 遮蔽逻辑,订单列表与收号货架均直接展示真实完整手机号
- 手机号文本支持一键复制,方便分销管理员日常履约联系
- 验证方式:go test 运行通过,npm run build(tsc + vite build)通过
This commit is contained in:
yml2213
2026-10-10 14:18:27 +08:00
parent f19c9f62b7
commit 6d34f86765
2 changed files with 10 additions and 13 deletions
+9 -8
View File
@@ -114,10 +114,7 @@ const LISTING_STATUS_LABELS: Record<string, { label: string; color: string }> =
draft: { label: '草稿', color: 'warning' },
}
function maskPhone(phone?: string): string {
if (!phone || phone.length < 7) return phone || '-'
return phone.slice(0, 3) + '****' + phone.slice(-4)
}
function formatGameName(gameName?: string): string {
if (!gameName) return ''
@@ -396,8 +393,8 @@ export default function Orders({ kind }: { kind: 'all' | 'sold' | 'receive' }) {
render: (_: unknown, row: DistributionOrder) => (
<div>
<div style={{ fontWeight: 500, whiteSpace: 'nowrap' }}>{row.renter_nickname || '平台租客'}</div>
<Typography.Text type="secondary" style={{ fontSize: 12, whiteSpace: 'nowrap' }}>
{maskPhone(row.renter_phone)}
<Typography.Text type="secondary" copyable={Boolean(row.renter_phone)} style={{ fontSize: 12, whiteSpace: 'nowrap' }}>
{row.renter_phone || '-'}
</Typography.Text>
</div>
),
@@ -655,8 +652,12 @@ export default function Orders({ kind }: { kind: 'all' | 'sold' | 'receive' }) {
render: (_: unknown, row: ReceivedListing) => (
<div>
<div style={{ fontWeight: 500, whiteSpace: 'nowrap' }}>{row.owner_nickname || '匿名卖家'}</div>
<Typography.Text type="secondary" style={{ fontSize: 12, whiteSpace: 'nowrap' }}>
{maskPhone(row.owner_phone)}
<Typography.Text
type="secondary"
copyable={Boolean(row.owner_phone)}
style={{ fontSize: 12, whiteSpace: 'nowrap' }}
>
{row.owner_phone || '-'}
</Typography.Text>
</div>
),