修复(半自动履约): 收口虎牙绑定为单一状态机
This commit is contained in:
@@ -60,6 +60,11 @@ const STATUS_COLORS: Record<string, string> = {
|
||||
login_scanned: 'cyan',
|
||||
waiting_binding: 'gold',
|
||||
binding_confirm: 'orange',
|
||||
rebind_required: 'gold',
|
||||
rebind_blocked_account: 'red',
|
||||
rebind_blocked_target_role: 'red',
|
||||
rebind_effect_pending: 'processing',
|
||||
binding_support: 'magenta',
|
||||
binding_expired: 'red',
|
||||
binding_failed: 'red',
|
||||
waiting_operator: 'volcano',
|
||||
@@ -85,6 +90,27 @@ const BINDING_STATUS_LABELS: Record<string, string> = {
|
||||
expired: '已过期',
|
||||
}
|
||||
|
||||
const BINDING_FLOW_LABELS: Record<string, string> = {
|
||||
binding_query_required: '待查询绑定',
|
||||
initial_bind_required: '待首次绑定',
|
||||
first_bind_qr_pending: '首次绑定待扫码',
|
||||
first_bind_role_ready: '首次绑定待确认',
|
||||
first_bind_role_mismatch: '首次绑定角色不一致',
|
||||
first_bind_failed: '首次绑定失败',
|
||||
current_role_confirmable: '当前角色待确认',
|
||||
rebind_required: '需要换绑',
|
||||
rebind_qr_pending: '换绑待扫码',
|
||||
rebind_role_ready: '换绑待确认',
|
||||
rebind_effect_pending: '换绑生效中',
|
||||
rebind_blocked_account: '账号换绑冷却',
|
||||
rebind_blocked_target_role: '目标角色冷却',
|
||||
rebind_rejected: '虎牙拒绝换绑',
|
||||
rebind_effect_failed: '换绑未生效',
|
||||
confirmed: '绑定已确认',
|
||||
manual_review: '绑定需人工核实',
|
||||
expired: '绑定已过期',
|
||||
}
|
||||
|
||||
type CompleteFormValues = {
|
||||
note?: string
|
||||
externalOrderNo?: string
|
||||
@@ -481,7 +507,11 @@ export default function AdminSemiAutoTasksPage() {
|
||||
<Text type="secondary">{task.displayStatus.nextAction}</Text>
|
||||
<Text type="secondary">{task.huyaUid ? `UID ${task.huyaUid}` : '未获取 UID'}</Text>
|
||||
<Text type="secondary">
|
||||
{`绑定:${BINDING_STATUS_LABELS[task.bindingStatus] || task.bindingStatus}`}
|
||||
{`绑定:${
|
||||
BINDING_FLOW_LABELS[task.bindingFlowState] ||
|
||||
BINDING_STATUS_LABELS[task.bindingStatus] ||
|
||||
task.bindingStatus
|
||||
}`}
|
||||
</Text>
|
||||
{task.bindGameRole || task.bindGameRoleToken ? (
|
||||
<Text type="secondary">
|
||||
@@ -773,7 +803,9 @@ export default function AdminSemiAutoTasksPage() {
|
||||
{detail.task.loginStatus === 'authenticated' ? 'CK 已获取' : '等待客户登录'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="绑定状态">
|
||||
{BINDING_STATUS_LABELS[detail.task.bindingStatus] || detail.task.bindingStatus}
|
||||
{BINDING_FLOW_LABELS[detail.task.bindingFlowState] ||
|
||||
BINDING_STATUS_LABELS[detail.task.bindingStatus] ||
|
||||
detail.task.bindingStatus}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="平台当前角色">
|
||||
{detail.task.bindGameRole || '-'}
|
||||
@@ -825,6 +857,22 @@ export default function AdminSemiAutoTasksPage() {
|
||||
<Text type="secondary">{detail.comparison?.message || '-'}</Text>
|
||||
</Space>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="绑定判定" span={2}>
|
||||
<Space direction="vertical" size={2}>
|
||||
<Text strong>{BINDING_FLOW_LABELS[detail.task.bindingFlowState] || '-'}</Text>
|
||||
<Text type="secondary">{detail.task.bindingDecision?.message || '-'}</Text>
|
||||
{detail.task.bindingDecision?.rebindBlockScope ? (
|
||||
<Text type="warning">
|
||||
阻塞作用域:
|
||||
{detail.task.bindingDecision.rebindBlockScope === 'account'
|
||||
? '虎牙账号'
|
||||
: detail.task.bindingDecision.rebindBlockScope === 'target_role'
|
||||
? '目标游戏角色'
|
||||
: '平台其他原因'}
|
||||
</Text>
|
||||
) : null}
|
||||
</Space>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="客服">
|
||||
{detail.task.assignedAdminName || '未领取'}
|
||||
</Descriptions.Item>
|
||||
|
||||
Reference in New Issue
Block a user