优化 UID 履约闸门、运营可见性与一键兑换
lewan 发货强制 expectedUid 并取消无 UID 旧路径回落;任务详情展示 UID 匹配态;领取页匹配后可一键兑换;补充 identity 单测并收口短链说明。
This commit is contained in:
@@ -681,13 +681,57 @@ function FulfillmentOverviewPanel({
|
||||
}) {
|
||||
const executor = resolveTaskExecutorDisplay(detail.task.executorKey)
|
||||
const steps = buildFulfillmentOverviewSteps(detail, claimUrl, claimLinkInvalid)
|
||||
const currentBlocker = resolveTaskBlocker(detail.task, claimUrl, claimLinkInvalid)
|
||||
const claimIdentity = detail.claimIdentity
|
||||
const currentBlocker = resolveTaskBlocker(
|
||||
detail.task,
|
||||
claimUrl,
|
||||
claimLinkInvalid,
|
||||
claimIdentity,
|
||||
)
|
||||
const uidMatchTag =
|
||||
claimIdentity?.uidMatched === true
|
||||
? { color: 'success' as const, text: 'UID 已匹配' }
|
||||
: claimIdentity?.uidMatched === false
|
||||
? { color: 'error' as const, text: 'UID 不一致' }
|
||||
: claimIdentity?.ready
|
||||
? { color: 'processing' as const, text: '已填 UID' }
|
||||
: { color: 'warning' as const, text: '未填 UID' }
|
||||
|
||||
return (
|
||||
<Card
|
||||
title="履约链路总览"
|
||||
extra={<Tag color={executor.color}>{executor.label}</Tag>}
|
||||
>
|
||||
<Descriptions
|
||||
size="small"
|
||||
column={{ xs: 1, sm: 2, md: 3 }}
|
||||
className="platform-section-gap"
|
||||
style={{ marginBottom: 12 }}
|
||||
>
|
||||
<Descriptions.Item label="填写 UID">
|
||||
{claimIdentity?.expectedUid || (
|
||||
<Typography.Text type="warning">未提交</Typography.Text>
|
||||
)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="绑定角色 ID">
|
||||
{claimIdentity?.boundUid || detail.task.roleId || '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="绑定角色名">
|
||||
{claimIdentity?.boundRoleName || detail.task.roleName || '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="匹配状态">
|
||||
<Tag color={uidMatchTag.color}>{uidMatchTag.text}</Tag>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="兼容模式">
|
||||
{claimIdentity?.compatibilityMode === 'legacy_no_uid' ? '旧单无 UID' : 'UID 闸门'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="说明" span={3}>
|
||||
<Typography.Text type="secondary">
|
||||
{claimIdentity?.note || '暂无 UID 信息'}
|
||||
</Typography.Text>
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
|
||||
<div className="fulfillment-overview-grid">
|
||||
{steps.map((step) => (
|
||||
<div key={step.key} className="fulfillment-step-card">
|
||||
@@ -791,6 +835,7 @@ function resolveTaskBlocker(
|
||||
task: AdminTaskDetail['task'],
|
||||
claimUrl: string,
|
||||
claimLinkInvalid: boolean,
|
||||
claimIdentity?: AdminTaskDetail['claimIdentity'],
|
||||
): { level: 'success' | 'info' | 'warning' | 'error'; title: string; detail: string } {
|
||||
if (['completed', 'redeemed', 'delivered'].includes(task.status) || task.deliveryStatus === 'delivered') {
|
||||
return {
|
||||
@@ -808,6 +853,29 @@ function resolveTaskBlocker(
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
task.executorKey === 'kuaishou_ct_assisted' &&
|
||||
claimIdentity &&
|
||||
!claimIdentity.ready
|
||||
) {
|
||||
return {
|
||||
level: 'warning',
|
||||
title: '等待用户填写 UID',
|
||||
detail: '旧单或新单均需用户打开领取页提交游戏 UID,否则禁止自动发货。',
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
task.executorKey === 'kuaishou_ct_assisted' &&
|
||||
claimIdentity?.uidMatched === false
|
||||
) {
|
||||
return {
|
||||
level: 'error',
|
||||
title: 'UID 与绑定角色不一致',
|
||||
detail: `填写 ${claimIdentity.expectedUid || '-'},绑定 ${claimIdentity.boundUid || '-'},请用户换绑或更正 UID。`,
|
||||
}
|
||||
}
|
||||
|
||||
if (claimLinkInvalid) {
|
||||
return {
|
||||
level: 'warning',
|
||||
|
||||
Reference in New Issue
Block a user