修复(半自动履约): 收口虎牙确认恢复与任务切换

This commit is contained in:
yml
2026-11-20 14:39:45 +08:00
parent a584e26016
commit 3b7d133dc9
13 changed files with 981 additions and 25 deletions
@@ -101,7 +101,7 @@ const BINDING_FLOW_LABELS: Record<string, string> = {
rebind_required: '需要换绑',
rebind_qr_pending: '换绑待扫码',
rebind_role_ready: '换绑待确认',
rebind_effect_pending: '换绑生效中',
rebind_effect_pending: '绑定生效中',
rebind_blocked_account: '虎牙账号换绑冷却中',
rebind_blocked_target_role: '目标角色冷却',
rebind_rejected: '虎牙拒绝换绑',
@@ -849,7 +849,9 @@ export default function AdminSemiAutoTasksPage() {
}
>
{detail.comparison?.verdict === 'match'
? '三项一致,可提交平台绑定'
? detail.comparison.verificationBasis === 'platform_numeric_uid'
? '角色名、区服和平台角色 UID 一致,可提交平台绑定'
: '角色名与区服一致,可提交平台绑定'
: detail.comparison?.verdict === 'mismatch'
? '资料与平台角色不一致'
: '信息不完整,需人工核实'}
@@ -110,9 +110,9 @@ export default function CustomerFulfillmentPage({
const huyaBindingConfirmed = bindingDecision?.flowState === 'confirmed'
const huyaBindingPolling = Boolean(
selectedTask?.platform === 'huya' &&
(bindingActions.has('refresh_binding_status') ||
bindingActions.has('refresh_first_binding_qr') ||
bindingActions.has('refresh_rebind_qr')),
['first_bind_qr_pending', 'rebind_qr_pending', 'rebind_effect_pending'].includes(
bindingDecision?.flowState || '',
),
)
const isWeibo = selectedTask?.platform === 'weibo'
// 虎牙流程:登录 → 填写资料(区服/游戏角色 UID/角色名)→ 绑定角色。
@@ -46,6 +46,16 @@ test('登录和绑定专用同步阶段暂停整单轮询', () => {
assert.ok(source.includes('}, 10_000)'))
})
test('虎牙绑定只在二维码或平台生效等待态轮询,过期二维码不再持续请求', () => {
assert.ok(source.includes("'first_bind_qr_pending'"))
assert.ok(source.includes("'rebind_qr_pending'"))
assert.ok(source.includes("'rebind_effect_pending'"))
const pollingStart = source.indexOf('const huyaBindingPolling')
const pollingEnd = source.indexOf('const isWeibo', pollingStart)
const pollingSource = source.slice(pollingStart, pollingEnd)
assert.ok(!pollingSource.includes('bindingActions.has('))
})
test('角色名和区服一致才出现确认绑定,不一致时展示原因', () => {
assert.ok(source.includes('确认绑定此角色'))
assert.ok(source.includes('canConfirmDecision'))
@@ -59,3 +59,9 @@ test('注入按钮和完成按钮使用各自的门槛', () => {
test('换绑冷却明确指向虎牙登录账号', () => {
assert.ok(adminPage.includes("rebind_blocked_account: '虎牙账号换绑冷却中'"))
})
test('虎牙默认只声明角色名与区服一致,不把客户角色 UID 冒充已核验', () => {
assert.ok(!adminPage.includes('三项一致,可提交平台绑定'))
assert.ok(adminPage.includes('角色名与区服一致,可提交平台绑定'))
assert.ok(adminPage.includes('角色名、区服和平台角色 UID 一致,可提交平台绑定'))
})