优化 UID 履约闸门、运营可见性与一键兑换

lewan 发货强制 expectedUid 并取消无 UID 旧路径回落;任务详情展示 UID 匹配态;领取页匹配后可一键兑换;补充 identity 单测并收口短链说明。
This commit is contained in:
yml2213
2026-07-10 13:51:02 +08:00
parent dc89188f7a
commit 8de56b0354
13 changed files with 383 additions and 152 deletions
+41 -15
View File
@@ -521,6 +521,7 @@ function createClaimSnapshot(
hasRedeemResult,
isRoleConfirmed,
isFeifeiFlow,
isUidMatched,
})
const progressText = resolveProgressText({
feifei,
@@ -613,6 +614,7 @@ function resolveCurrentStep(options: {
hasRedeemResult: boolean
isRoleConfirmed: boolean
isFeifeiFlow: boolean
isUidMatched?: boolean
}) {
if (!options.hasExpectedUid) {
return 1
@@ -620,6 +622,10 @@ function resolveCurrentStep(options: {
if (options.hasRedeemResult) {
return 4
}
// UID 匹配后仍停留在绑定步,提供一键兑换;已 ROLE_CONFIRMED 走确认页
if (!options.isFeifeiFlow && options.isRoleConfirmed && !options.isUidMatched) {
return 3
}
if (!options.isFeifeiFlow && options.isRoleConfirmed) {
return 3
}
@@ -857,10 +863,12 @@ function KuaishouCloudClaimSteps({
refreshingRole={refreshingRole}
confirmingRole={confirmingRole}
rebindingRole={rebindingRole}
redeeming={redeeming}
onOpenBindUrl={onOpenBindUrl}
onRefreshRole={onRefreshRole}
onRebindRole={onRebindRole}
onConfirmRole={onConfirmRole}
onConfirmRedeem={onConfirmRedeem}
uidInput={uidInput}
submittingUid={submittingUid}
onUidChange={onUidChange}
@@ -875,10 +883,12 @@ function ClaimBindingStep({
refreshingRole,
confirmingRole,
rebindingRole,
redeeming,
onOpenBindUrl,
onRefreshRole,
onRebindRole,
onConfirmRole,
onConfirmRedeem,
uidInput,
submittingUid,
onUidChange,
@@ -889,10 +899,12 @@ function ClaimBindingStep({
refreshingRole: boolean
confirmingRole: boolean
rebindingRole: boolean
redeeming: boolean
onOpenBindUrl: (useCurrentPage?: boolean) => void
onRefreshRole: () => void
onRebindRole: () => void
onConfirmRole: () => void
onConfirmRedeem: () => void
uidInput: string
submittingUid: boolean
onUidChange: (value: string) => void
@@ -962,25 +974,39 @@ function ClaimBindingStep({
size="large"
icon={<SwapOutlined />}
loading={rebindingRole}
disabled={confirmingRole}
disabled={confirmingRole || redeeming}
onClick={onRebindRole}
>
</Button>
<Tooltip title={snapshot.confirmRoleDisabledReason || undefined}>
<span className="claim-action-tooltip-wrap">
<Button
type="primary"
size="large"
icon={<CheckCircleOutlined />}
loading={confirmingRole}
disabled={Boolean(snapshot.confirmRoleDisabledReason)}
onClick={onConfirmRole}
>
UID
</Button>
</span>
</Tooltip>
{snapshot.isUidMatched ? (
<Button
type="primary"
size="large"
danger
icon={<CheckCircleOutlined />}
loading={redeeming}
disabled={rebindingRole}
onClick={onConfirmRedeem}
>
UID
</Button>
) : (
<Tooltip title={snapshot.confirmRoleDisabledReason || undefined}>
<span className="claim-action-tooltip-wrap">
<Button
type="primary"
size="large"
icon={<CheckCircleOutlined />}
loading={confirmingRole}
disabled={Boolean(snapshot.confirmRoleDisabledReason)}
onClick={onConfirmRole}
>
</Button>
</span>
</Tooltip>
)}
</Space>
<div className="claim-meta-footer">