fix(delivery): 隐藏上游单号并对齐无角色发货结果展示

1. 隐藏内部与上游单号:彻底移除提货页面顶部展示的内部工单号 (FO2026...),以及凭据图片中生成的官方单号行与表格凭证单号,防止暴露上游平台来源;
2. 对齐无角色发货结果展示:当订单无游戏角色名(为空或为 "-")时,提货页面结果卡片与 Canvas 生成的深海蓝凭据大图统一不渲染游戏角色项,消除多余占位横杠;
3. 两端信息项保持完全一致:提货结果卡片与发货凭据图片统一按照「游戏区服 -> 兑换账号/UID -> 时间」一致排版,干净清爽。
This commit is contained in:
yml2213
2026-10-05 18:59:36 +08:00
parent bf3f3a3626
commit 372a13e86d
3 changed files with 32 additions and 40 deletions
+15 -16
View File
@@ -341,9 +341,6 @@ export default function Delivery() {
<Typography.Title level={3} style={{ marginBottom: 4 }}>
游戏道具发货
</Typography.Title>
<Typography.Text type="secondary">
订单编号:{decodedOrderNo}
</Typography.Text>
</div>
{order.status === 'delivering' && (
<Button
@@ -479,7 +476,21 @@ export default function Delivery() {
</div>
<Descriptions column={{ xs: 1, sm: 2 }} size="middle">
<Descriptions.Item label="游戏账号 UID">
{order.role_name && order.role_name.trim() !== '' && order.role_name.trim() !== '-' && (
<Descriptions.Item label="游戏角色名">
<Typography.Text
strong
style={{ fontSize: 15, color: '#0f172a' }}
copyable={{ text: order.role_name }}
>
{order.role_name}
</Typography.Text>
</Descriptions.Item>
)}
<Descriptions.Item label="游戏区服">
{order.game_channel || (order.game_uid?.length === 10 ? '微信区' : '手Q / 微信区')}
</Descriptions.Item>
<Descriptions.Item label="兑换账号 UID">
<Typography.Text
code
strong
@@ -489,18 +500,6 @@ export default function Delivery() {
{order.game_uid || gameAccount || '-'}
</Typography.Text>
</Descriptions.Item>
<Descriptions.Item label="游戏角色名">
<Typography.Text
strong
style={{ fontSize: 15, color: '#0f172a' }}
copyable={order.role_name ? { text: order.role_name } : false}
>
{order.role_name || '-'}
</Typography.Text>
</Descriptions.Item>
<Descriptions.Item label="区服信息">
{order.game_channel || (order.game_uid?.length === 10 ? '微信区' : '手Q / 微信区')}
</Descriptions.Item>
<Descriptions.Item label="下单时间">{formatDateTime(order.created_at)}</Descriptions.Item>
<Descriptions.Item label="完成时间">
{order.shipped_at ? formatDateTime(order.shipped_at) : '已完成'}
+5 -15
View File
@@ -227,16 +227,16 @@ export default function PlatformRock() {
const productName = record.target_skin || (isRockBlue ? '蓝色运动服上衣' : '黑色ROCK长袖T恤')
const channel = record.actual_channel || record.region || '安卓-微信'
const timeStr = record.redeemed_at || record.bound_at || record.created_at
const cleanRole = (record.actual_role_name || '').trim()
const dataURL = await generateVoucherDataURL({
productName,
productSKU: sku,
roleName: record.actual_role_name || '-',
roleName: cleanRole && cleanRole !== '-' ? cleanRole : '',
roleUID: record.expected_uid || record.actual_role_id || '-',
channel,
currencyText: '幸运币 x 10',
redeemedAt: timeStr ? formatDateTime(timeStr) : formatDateTime(new Date().toISOString()),
voucherNo: record.upstream_fulfill_id ? String(record.upstream_fulfill_id) : (record.assigned_order_no || undefined),
})
const copied = await copyVoucherDataUrlToClipboard(dataURL)
@@ -261,16 +261,16 @@ export default function PlatformRock() {
const productName = record.target_skin || (isRockBlue ? '蓝色运动服上衣' : '黑色ROCK长袖T恤')
const channel = record.actual_channel || record.region || '安卓-微信'
const timeStr = record.redeemed_at || record.bound_at || record.created_at
const cleanRole = (record.actual_role_name || '').trim()
const dataURL = await generateVoucherDataURL({
productName,
productSKU: sku,
roleName: record.actual_role_name || '-',
roleName: cleanRole && cleanRole !== '-' ? cleanRole : '',
roleUID: record.expected_uid || record.actual_role_id || '-',
channel,
currencyText: '幸运币 x 10',
redeemedAt: timeStr ? formatDateTime(timeStr) : formatDateTime(new Date().toISOString()),
voucherNo: record.upstream_fulfill_id ? String(record.upstream_fulfill_id) : (record.assigned_order_no || undefined),
})
setPreviewVoucherUrl(dataURL)
@@ -440,20 +440,10 @@ export default function PlatformRock() {
/>
</Tooltip>
</Space>
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
<div>
<Tag color="cyan" style={{ fontSize: 11, margin: 0 }}>
{record.target_skin || '黑色ROCK长袖T恤'}
</Tag>
{record.upstream_fulfill_id && (
<Text
type="secondary"
copyable={{ text: String(record.upstream_fulfill_id) }}
style={{ fontSize: 11, fontFamily: 'monospace' }}
title={`官方凭据号: ${record.upstream_fulfill_id}`}
>
{record.upstream_fulfill_id}
</Text>
)}
</div>
</Space>
)
+12 -9
View File
@@ -163,16 +163,20 @@ export async function generateVoucherDataURL(data: DeliveryVoucherData): Promise
ctx.lineTo(width - 80, lineY)
ctx.stroke()
// 6. 核心数据列表明细 (Key - Value 对齐)
const listItems = [
{ label: '游戏角色', value: data.roleName || '-' },
// 6. 核心数据列表明细 (Key - Value 对齐,与提货页保持完全一致)
const listItems: Array<{ label: string; value: string }> = []
// 仅在有合法角色名且非 '-' 时才展示游戏角色
const cleanRole = (data.roleName || '').trim()
if (cleanRole && cleanRole !== '-') {
listItems.push({ label: '游戏角色', value: cleanRole })
}
listItems.push(
{ label: '游戏区服', value: data.channel || '安卓-微信' },
{ label: '兑换账号', value: data.roleUID || '-' },
{ label: '兑换时间', value: data.redeemedAt || formatDateTime(new Date().toISOString()) },
]
if (data.voucherNo) {
listItems.push({ label: '官方单号', value: data.voucherNo })
}
)
let rowY = 475
const rowHeight = 44
@@ -241,12 +245,11 @@ export async function generateDeliveryVoucher(order: DeliveryOrderInfo): Promise
productName: order.product?.name || (isRock ? '黑色ROCK长袖T恤' : '和平精英道具'),
productSKU: order.product?.sku,
productImage: resolveProductImage({ sku: order.product?.sku, name: order.product?.name, url: order.product?.image }),
roleName: order.role_name || '-',
roleName: order.role_name && order.role_name.trim() !== '-' ? order.role_name.trim() : '',
roleUID: order.game_uid || order.buyer_name || '-',
channel: order.game_channel || (order.game_uid?.length === 10 ? '微信区' : '手Q / 微信区'),
currencyText: isRock ? '幸运币 x 10' : undefined,
redeemedAt: order.shipped_at ? formatDateTime(order.shipped_at) : formatDateTime(order.created_at),
voucherNo: order.provider_order_no || undefined,
})
}