feat(semi-auto): 重构客户资料收集与虎牙绑定确认流程
- 客户资料页按设计稿重构,区服固定四项下拉,游戏编号/角色名校验 - 虎牙登录与绑定页统一深色样式,扫码页新增改用手机号登录 - 待确认角色 UID 改用 huyaUid,不再展示虎牙加密 roleId - 绑定确认新增两侧角色比对,不一致禁止确认,会话过期引导重新登录 - 新增迁移 168/169 与角色绑定单测,脚本换行符固定为 LF
This commit is contained in:
@@ -54,6 +54,8 @@ const STATUS_COLORS: Record<string, string> = {
|
||||
login_scanned: 'cyan',
|
||||
waiting_binding: 'gold',
|
||||
binding_confirm: 'orange',
|
||||
binding_expired: 'red',
|
||||
binding_failed: 'red',
|
||||
waiting_operator: 'volcano',
|
||||
credential_expired: 'red',
|
||||
processing: 'processing',
|
||||
@@ -67,6 +69,16 @@ const PLATFORM_LABELS: Record<string, string> = {
|
||||
weibo: '微博',
|
||||
}
|
||||
|
||||
const BINDING_STATUS_LABELS: Record<string, string> = {
|
||||
not_started: '未开始',
|
||||
qr_pending: '待扫码',
|
||||
scanned: '已扫码',
|
||||
role_ready: '待确认角色',
|
||||
confirmed: '已确认',
|
||||
failed: '失败',
|
||||
expired: '已过期',
|
||||
}
|
||||
|
||||
type CompleteFormValues = {
|
||||
note?: string
|
||||
externalOrderNo?: string
|
||||
@@ -344,6 +356,16 @@ export default function AdminSemiAutoTasksPage() {
|
||||
<Space direction="vertical" size={2}>
|
||||
<Tag>{task.displayStatus.label}</Tag>
|
||||
<Text type="secondary">{task.huyaUid ? `UID ${task.huyaUid}` : '未获取 UID'}</Text>
|
||||
<Text type="secondary">
|
||||
{task.platform === 'huya'
|
||||
? `绑定:${BINDING_STATUS_LABELS[task.bindingStatus] || task.bindingStatus}`
|
||||
: '微博登录即授权'}
|
||||
</Text>
|
||||
{task.platform === 'huya' && (task.bindGameRole || task.bindGameRoleId) ? (
|
||||
<Text type="secondary">
|
||||
{`角色:${task.bindGameRole || '-'}${task.bindGameRoleId ? `(${task.bindGameRoleId})` : '(无角色ID)'}`}
|
||||
</Text>
|
||||
) : null}
|
||||
<Text type="secondary">
|
||||
CK:
|
||||
{task.credentialStatus === 'valid'
|
||||
@@ -616,6 +638,24 @@ export default function AdminSemiAutoTasksPage() {
|
||||
<Descriptions.Item label="登录状态">
|
||||
{detail.task.loginStatus === 'authenticated' ? 'CK 已获取' : '等待客户登录'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="绑定状态">
|
||||
{detail.task.platform === 'weibo'
|
||||
? '微博登录即授权'
|
||||
: BINDING_STATUS_LABELS[detail.task.bindingStatus] || detail.task.bindingStatus}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="绑定角色">
|
||||
{detail.task.bindGameRole
|
||||
? `${detail.task.bindGameRole}${detail.task.bindGameRoleId ? `(${detail.task.bindGameRoleId})` : '(无角色ID)'}`
|
||||
: '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="客户填写角色">
|
||||
{detail.task.customerGameRoleName
|
||||
? `${detail.task.customerGameRoleName}${detail.task.customerGameRoleId ? `(${detail.task.customerGameRoleId})` : ''}`
|
||||
: '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="区服">
|
||||
{detail.task.customerServerZone || '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="客服">
|
||||
{detail.task.assignedAdminName || '未领取'}
|
||||
</Descriptions.Item>
|
||||
@@ -765,6 +805,7 @@ function taskNeedsCustomerReauth(task: SemiAutoTask) {
|
||||
function taskCanUseCredential(task: SemiAutoTask) {
|
||||
return (
|
||||
task.loginStatus === 'authenticated' &&
|
||||
(task.platform === 'weibo' || task.bindingStatus === 'confirmed') &&
|
||||
task.credentialReady &&
|
||||
task.credentialStatus !== 'invalid' &&
|
||||
task.credentialStatus !== 'error'
|
||||
|
||||
Reference in New Issue
Block a user