feat(semi-auto): 缺角色ID时引导客户联系客服并拦截确认
This commit is contained in:
@@ -14,3 +14,33 @@ export function resolveBindingRoleId(roleId: unknown, huyaUid: unknown): string
|
|||||||
|
|
||||||
return /^\d+$/.test(uid) ? uid : rawRoleId
|
return /^\d+$/.test(uid) ? uid : rawRoleId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 只有纯数字角色 ID 才能和客户填写的游戏编号做可信比对。 */
|
||||||
|
export function isNumericBindingRoleId(value: unknown): boolean {
|
||||||
|
return /^\d+$/.test(String(value ?? '').trim())
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BindingRoleInfo = {
|
||||||
|
resolvedRoleId: string
|
||||||
|
roleIdVerified: boolean
|
||||||
|
hasBoundRole: boolean
|
||||||
|
/** 平台返回了绑定角色,但没有可核对的数字角色 ID → 必须人工核实。 */
|
||||||
|
requiresSupport: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 统一计算「绑定角色 + 可核对角色 ID」的展示状态,避免前后端各自判断。 */
|
||||||
|
export function describeBindingRole(
|
||||||
|
roleName: unknown,
|
||||||
|
roleId: unknown,
|
||||||
|
huyaUid: unknown,
|
||||||
|
): BindingRoleInfo {
|
||||||
|
const resolvedRoleId = resolveBindingRoleId(roleId, huyaUid)
|
||||||
|
const roleIdVerified = isNumericBindingRoleId(resolvedRoleId)
|
||||||
|
const hasBoundRole = String(roleName ?? '').trim().length > 0
|
||||||
|
return {
|
||||||
|
resolvedRoleId,
|
||||||
|
roleIdVerified,
|
||||||
|
hasBoundRole,
|
||||||
|
requiresSupport: hasBoundRole && !roleIdVerified,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -101,6 +101,10 @@ export type ConnectorBindingSession = {
|
|||||||
bindGameRole: string
|
bindGameRole: string
|
||||||
bindGameRoleId: string
|
bindGameRoleId: string
|
||||||
bindGameChannel: string
|
bindGameChannel: string
|
||||||
|
/** 平台返回的角色 ID 是否可核对(纯数字);false 时需引导客户联系客服人工核实。 */
|
||||||
|
roleIdVerified?: boolean
|
||||||
|
/** 已绑定角色但缺少可核对角色 ID:客户页应提示联系客服,禁止直接确认绑定。 */
|
||||||
|
requiresSupport?: boolean
|
||||||
hasExistingBinding?: boolean
|
hasExistingBinding?: boolean
|
||||||
rebindRequested?: boolean
|
rebindRequested?: boolean
|
||||||
rebindUnchanged?: boolean
|
rebindUnchanged?: boolean
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import path from 'node:path'
|
|||||||
import { runtimeConfig } from '../../../config/runtime.js'
|
import { runtimeConfig } from '../../../config/runtime.js'
|
||||||
import { createHttpError } from '../../../utils/http.js'
|
import { createHttpError } from '../../../utils/http.js'
|
||||||
import { logWarn } from '../../../utils/logger.js'
|
import { logWarn } from '../../../utils/logger.js'
|
||||||
import { resolveBindingRoleId } from '../binding-role-id.js'
|
import { describeBindingRole } from '../binding-role-id.js'
|
||||||
import type {
|
import type {
|
||||||
ConnectorBindingSession,
|
ConnectorBindingSession,
|
||||||
ConnectorBrowserTicket,
|
ConnectorBrowserTicket,
|
||||||
@@ -833,8 +833,12 @@ export class HuyaNativeConnector {
|
|||||||
const hasExistingBinding = hasExistingHuyaBinding(roleResponse)
|
const hasExistingBinding = hasExistingHuyaBinding(roleResponse)
|
||||||
session.binding.hasExistingBinding = hasExistingBinding
|
session.binding.hasExistingBinding = hasExistingBinding
|
||||||
applyRebindMeta(session, roleResponse, this.now())
|
applyRebindMeta(session, roleResponse, this.now())
|
||||||
if (role.role && !options.forceRebind) {
|
// 只有平台明确「已绑定」才允许直接确认;没有绑定(即使残留角色名)必须走扫码绑定。
|
||||||
this.markRoleReady(session, role, hasExistingBinding && !session.binding.rebindRequested)
|
if (hasExistingBinding && !options.forceRebind) {
|
||||||
|
this.markRoleReady(session, role, true)
|
||||||
|
if (!role.role) {
|
||||||
|
session.binding.message = '当前账号已有绑定角色,但平台未返回角色信息,请联系客服人工核实'
|
||||||
|
}
|
||||||
if (session.binding.rebindRequested) {
|
if (session.binding.rebindRequested) {
|
||||||
session.binding.message = session.binding.rebindUnchanged
|
session.binding.message = session.binding.rebindUnchanged
|
||||||
? rebindFailureMessage(
|
? rebindFailureMessage(
|
||||||
@@ -1069,7 +1073,7 @@ export class HuyaNativeConnector {
|
|||||||
const hasExistingBinding = hasExistingHuyaBinding(response)
|
const hasExistingBinding = hasExistingHuyaBinding(response)
|
||||||
session.binding.hasExistingBinding = hasExistingBinding
|
session.binding.hasExistingBinding = hasExistingBinding
|
||||||
applyRebindMeta(session, response, this.now())
|
applyRebindMeta(session, response, this.now())
|
||||||
if (role.role) {
|
if (role.role && hasExistingBinding) {
|
||||||
const rebindRequested = session.binding.rebindRequested
|
const rebindRequested = session.binding.rebindRequested
|
||||||
const roleKey = bindingRoleKey(role)
|
const roleKey = bindingRoleKey(role)
|
||||||
const changedRole =
|
const changedRole =
|
||||||
@@ -1112,6 +1116,10 @@ export class HuyaNativeConnector {
|
|||||||
if (rebindRequested) {
|
if (rebindRequested) {
|
||||||
session.binding.message = '已识别换绑角色,请确认换绑'
|
session.binding.message = '已识别换绑角色,请确认换绑'
|
||||||
}
|
}
|
||||||
|
} else if (hasExistingBinding) {
|
||||||
|
// 平台标记已绑定,但没有返回角色信息(或角色ID不可核对):必须人工核实,不能生成二维码。
|
||||||
|
this.markRoleReady(session, role, true)
|
||||||
|
session.binding.message = '当前账号已有绑定角色,但平台未返回角色信息,请联系客服人工核实'
|
||||||
} else if (
|
} else if (
|
||||||
!session.binding.rebindRequested &&
|
!session.binding.rebindRequested &&
|
||||||
session.binding.bindConfirmState === 'rejected'
|
session.binding.bindConfirmState === 'rejected'
|
||||||
@@ -1449,6 +1457,13 @@ export class HuyaNativeConnector {
|
|||||||
session.binding.role = role.role
|
session.binding.role = role.role
|
||||||
session.binding.roleId = role.roleId || ''
|
session.binding.roleId = role.roleId || ''
|
||||||
session.binding.channel = role.channel
|
session.binding.channel = role.channel
|
||||||
|
const roleInfo = describeBindingRole(role.role, role.roleId, session.uid)
|
||||||
|
if (roleInfo.requiresSupport) {
|
||||||
|
session.binding.message = existingBinding
|
||||||
|
? '当前账号已有绑定角色,但未获取到可核对的角色ID,请联系客服人工核实'
|
||||||
|
: '已识别绑定角色,但未获取到可核对的角色ID,请联系客服人工核实'
|
||||||
|
return
|
||||||
|
}
|
||||||
session.binding.message = existingBinding
|
session.binding.message = existingBinding
|
||||||
? '当前账号已有绑定角色,请确认直接使用'
|
? '当前账号已有绑定角色,请确认直接使用'
|
||||||
: '绑定角色已识别,请确认绑定'
|
: '绑定角色已识别,请确认绑定'
|
||||||
@@ -1526,6 +1541,9 @@ export class HuyaNativeConnector {
|
|||||||
|
|
||||||
private bindingView(session: NativeSession): ConnectorBindingSession {
|
private bindingView(session: NativeSession): ConnectorBindingSession {
|
||||||
const binding = session.binding
|
const binding = session.binding
|
||||||
|
const roleInfo = describeBindingRole(binding.role, binding.roleId, session.uid)
|
||||||
|
const requiresSupport =
|
||||||
|
roleInfo.requiresSupport || (binding.hasExistingBinding === true && !roleInfo.roleIdVerified)
|
||||||
return {
|
return {
|
||||||
sessionId: session.sessionId,
|
sessionId: session.sessionId,
|
||||||
status: binding.status,
|
status: binding.status,
|
||||||
@@ -1534,8 +1552,10 @@ export class HuyaNativeConnector {
|
|||||||
qrUrl: binding.qrUrl,
|
qrUrl: binding.qrUrl,
|
||||||
bindGameAccount: binding.account,
|
bindGameAccount: binding.account,
|
||||||
bindGameRole: binding.role,
|
bindGameRole: binding.role,
|
||||||
bindGameRoleId: resolveBindingRoleId(binding.roleId, session.uid),
|
bindGameRoleId: roleInfo.resolvedRoleId,
|
||||||
bindGameChannel: binding.channel,
|
bindGameChannel: binding.channel,
|
||||||
|
roleIdVerified: roleInfo.roleIdVerified,
|
||||||
|
requiresSupport,
|
||||||
hasExistingBinding: binding.hasExistingBinding,
|
hasExistingBinding: binding.hasExistingBinding,
|
||||||
rebindRequested: binding.rebindRequested,
|
rebindRequested: binding.rebindRequested,
|
||||||
rebindUnchanged: binding.rebindUnchanged,
|
rebindUnchanged: binding.rebindUnchanged,
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
import assert from 'node:assert/strict'
|
import assert from 'node:assert/strict'
|
||||||
import { describe, it } from 'node:test'
|
import { describe, it } from 'node:test'
|
||||||
|
|
||||||
import { resolveBindingRoleId } from './binding-role-id.js'
|
import {
|
||||||
|
describeBindingRole,
|
||||||
|
isNumericBindingRoleId,
|
||||||
|
resolveBindingRoleId,
|
||||||
|
} from './binding-role-id.js'
|
||||||
import {
|
import {
|
||||||
compareBindingRole,
|
compareBindingRole,
|
||||||
detectServerZone,
|
detectServerZone,
|
||||||
@@ -58,6 +62,45 @@ describe('待确认角色 UID 取数(huyaUid)', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('绑定角色可核对性(缺角色ID)', () => {
|
||||||
|
it('数字角色 ID 可直接核对', () => {
|
||||||
|
const info = describeBindingRole('大鲨鱼伊塞53', '1192083858', '')
|
||||||
|
assert.equal(info.roleIdVerified, true)
|
||||||
|
assert.equal(info.requiresSupport, false)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('加密角色 ID 但 UID 是数字时可核对', () => {
|
||||||
|
const info = describeBindingRole(
|
||||||
|
'大鲨鱼伊塞53',
|
||||||
|
'834ee3e75a1bfc9f65fb6b966bac7ef318e68ea',
|
||||||
|
'1199608910400',
|
||||||
|
)
|
||||||
|
assert.equal(info.resolvedRoleId, '1199608910400')
|
||||||
|
assert.equal(info.roleIdVerified, true)
|
||||||
|
assert.equal(info.requiresSupport, false)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('有角色但没有可核对数字 ID 时需要联系客服', () => {
|
||||||
|
const info = describeBindingRole('Mock测试角色', 'mock-role-abc', 'mock-huya-abc')
|
||||||
|
assert.equal(info.roleIdVerified, false)
|
||||||
|
assert.equal(info.requiresSupport, true)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('没有角色名时不需要人工核实', () => {
|
||||||
|
const info = describeBindingRole('', '', '')
|
||||||
|
assert.equal(info.hasBoundRole, false)
|
||||||
|
assert.equal(info.requiresSupport, false)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('只接受纯数字角色 ID 参与核对', () => {
|
||||||
|
assert.equal(isNumericBindingRoleId('1192083858'), true)
|
||||||
|
assert.equal(isNumericBindingRoleId(' 1192083858 '), true)
|
||||||
|
assert.equal(isNumericBindingRoleId('mock-role-abc'), false)
|
||||||
|
assert.equal(isNumericBindingRoleId(''), false)
|
||||||
|
assert.equal(isNumericBindingRoleId(null), false)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('区服解析', () => {
|
describe('区服解析', () => {
|
||||||
it('安卓 + 微信识别为安卓V区', () => {
|
it('安卓 + 微信识别为安卓V区', () => {
|
||||||
assert.equal(detectServerZone('安卓(android) · 微信'), '安卓V区')
|
assert.equal(detectServerZone('安卓(android) · 微信'), '安卓V区')
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ import {
|
|||||||
upsertSemiAutoCredentialWithClient,
|
upsertSemiAutoCredentialWithClient,
|
||||||
} from './semi-auto-credential-service.js'
|
} from './semi-auto-credential-service.js'
|
||||||
import { querySemiAutoTraces } from './semi-auto-trace.js'
|
import { querySemiAutoTraces } from './semi-auto-trace.js'
|
||||||
|
import { isNumericBindingRoleId } from './binding-role-id.js'
|
||||||
|
|
||||||
const SEMI_AUTO_PLATFORMS = new Set(['huya', 'weibo'])
|
const SEMI_AUTO_PLATFORMS = new Set(['huya', 'weibo'])
|
||||||
type SemiAutoPlatform = 'huya' | 'weibo'
|
type SemiAutoPlatform = 'huya' | 'weibo'
|
||||||
@@ -1102,6 +1103,9 @@ async function updateBindingTask(
|
|||||||
) {
|
) {
|
||||||
const mapped = mapBindingUpdate(session)
|
const mapped = mapBindingUpdate(session)
|
||||||
const comparison = compareBindingRole(task, mapped)
|
const comparison = compareBindingRole(task, mapped)
|
||||||
|
const roleIdVerified = isNumericBindingRoleId(mapped.bindGameRoleId)
|
||||||
|
const requiresSupport =
|
||||||
|
(Boolean(mapped.bindGameRole) || mapped.hasExistingBinding === true) && !roleIdVerified
|
||||||
const executionStatus: ExecutionStatus =
|
const executionStatus: ExecutionStatus =
|
||||||
mapped.status === 'confirmed'
|
mapped.status === 'confirmed'
|
||||||
? 'waiting_operator'
|
? 'waiting_operator'
|
||||||
@@ -1178,6 +1182,8 @@ async function updateBindingTask(
|
|||||||
bindGameRole: mapped.bindGameRole,
|
bindGameRole: mapped.bindGameRole,
|
||||||
bindGameRoleId: mapped.bindGameRoleId,
|
bindGameRoleId: mapped.bindGameRoleId,
|
||||||
bindGameChannel: mapped.bindGameChannel,
|
bindGameChannel: mapped.bindGameChannel,
|
||||||
|
roleIdVerified,
|
||||||
|
requiresSupport,
|
||||||
hasExistingBinding: mapped.hasExistingBinding,
|
hasExistingBinding: mapped.hasExistingBinding,
|
||||||
rebindRequested: mapped.rebindRequested,
|
rebindRequested: mapped.rebindRequested,
|
||||||
rebindUnchanged: mapped.rebindUnchanged,
|
rebindUnchanged: mapped.rebindUnchanged,
|
||||||
@@ -1405,6 +1411,19 @@ export async function confirmPublicBinding(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
// 已绑定角色但没有可核对的数字角色 ID:不能只按角色名放行,必须人工核实(客户页会提示联系客服)。
|
||||||
|
const boundRolePresent =
|
||||||
|
Boolean(String(session.bindGameRole || '').trim()) || session.hasExistingBinding === true
|
||||||
|
if (
|
||||||
|
task.platform === 'huya' &&
|
||||||
|
boundRolePresent &&
|
||||||
|
!isNumericBindingRoleId(session.bindGameRoleId)
|
||||||
|
) {
|
||||||
|
throw createHttpError('平台未返回可核对的角色ID,请联系客服人工核实后再确认绑定', {
|
||||||
|
statusCode: 409,
|
||||||
|
errorCode: 'semi_auto_binding_role_id_missing',
|
||||||
|
})
|
||||||
|
}
|
||||||
const comparison = compareBindingRole(task, session)
|
const comparison = compareBindingRole(task, session)
|
||||||
if (comparison.verdict === 'mismatch') {
|
if (comparison.verdict === 'mismatch') {
|
||||||
throw createHttpError(comparison.message, {
|
throw createHttpError(comparison.message, {
|
||||||
|
|||||||
@@ -770,6 +770,21 @@ export default function CustomerFulfillmentPage() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 缺角色 ID 时引导客户把订单号发给客服人工核实。 */
|
||||||
|
async function copyOrderNoForSupport() {
|
||||||
|
const text = String(orderNo || selectedTask?.orderNo || '').trim()
|
||||||
|
if (!text) {
|
||||||
|
message.warning('订单号为空,请直接联系客服')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await navigator.clipboard.writeText(text)
|
||||||
|
message.success('订单号已复制,请联系客服核实角色ID')
|
||||||
|
} catch {
|
||||||
|
message.error('复制失败,请手动记录订单号后联系客服')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const config = selectedTask?.semiAutoConfig || {}
|
const config = selectedTask?.semiAutoConfig || {}
|
||||||
const displayTitle = isWeibo ? '微博账号登录授权' : '绑定游戏角色'
|
const displayTitle = isWeibo ? '微博账号登录授权' : '绑定游戏角色'
|
||||||
const loginQrVisible =
|
const loginQrVisible =
|
||||||
@@ -801,12 +816,21 @@ export default function CustomerFulfillmentPage() {
|
|||||||
const bindConfirmState = bindingInfo?.bindConfirmState || 'idle'
|
const bindConfirmState = bindingInfo?.bindConfirmState || 'idle'
|
||||||
const bindConfirmRejected = bindConfirmState === 'rejected'
|
const bindConfirmRejected = bindConfirmState === 'rejected'
|
||||||
const bindConfirmPending = bindConfirmState === 'submitting' || bindConfirmState === 'accepted'
|
const bindConfirmPending = bindConfirmState === 'submitting' || bindConfirmState === 'accepted'
|
||||||
// 还没有绑定角色时,二维码区域已经说明了原因,不再重复提示「缺角色ID」。
|
const bindingRoleIdNumeric = /^\d+$/.test(String(bindingPendingUid || bindingRoleId || '').trim())
|
||||||
const showMissingRoleIdWarning =
|
// 平台返回了绑定角色但没有可核对的角色ID:提示联系客服,不能直接确认或重新扫码。
|
||||||
!bindingPendingUid && !rebindUnchanged && bindingInfo?.hasExistingBinding !== false
|
const bindingRequiresSupport =
|
||||||
|
Boolean(bindingInfo) &&
|
||||||
|
(bindingInfo?.requiresSupport ??
|
||||||
|
(Boolean(bindingInfo?.bindGameRole || bindingRoleName) && !bindingRoleIdNumeric))
|
||||||
// 绑定阶段顶部状态条:按 bindingStatus 显式映射,已确认/已过期/失败不再显示(各自有卡片)。
|
// 绑定阶段顶部状态条:按 bindingStatus 显式映射,已确认/已过期/失败不再显示(各自有卡片)。
|
||||||
const bindingBanner = (() => {
|
const bindingBanner = (() => {
|
||||||
if (bindingSessionExpired) return null
|
if (bindingSessionExpired) return null
|
||||||
|
if (bindingRequiresSupport && selectedTask?.bindingStatus !== 'confirmed') {
|
||||||
|
return {
|
||||||
|
tone: 'is-warning',
|
||||||
|
text: '已登录,但平台未返回可核对的角色ID,请联系客服人工核实',
|
||||||
|
}
|
||||||
|
}
|
||||||
if (rebindUnchanged) {
|
if (rebindUnchanged) {
|
||||||
return {
|
return {
|
||||||
tone: 'is-warning',
|
tone: 'is-warning',
|
||||||
@@ -829,9 +853,6 @@ export default function CustomerFulfillmentPage() {
|
|||||||
text: '登录成功,该虎牙账号还没有绑定游戏角色,请扫码完成绑定',
|
text: '登录成功,该虎牙账号还没有绑定游戏角色,请扫码完成绑定',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!bindingRoleId) {
|
|
||||||
return { tone: 'is-warning', text: '未获取到已绑定的角色ID,请重新扫码绑定' }
|
|
||||||
}
|
|
||||||
return null
|
return null
|
||||||
})()
|
})()
|
||||||
const nextRebindText = bindingInfo?.nextRebindAt
|
const nextRebindText = bindingInfo?.nextRebindAt
|
||||||
@@ -1355,7 +1376,16 @@ export default function CustomerFulfillmentPage() {
|
|||||||
|
|
||||||
{selectedTask?.bindingStatus === 'role_ready' && !bindingSessionExpired ? (
|
{selectedTask?.bindingStatus === 'role_ready' && !bindingSessionExpired ? (
|
||||||
<Space direction="vertical" size={12} style={{ width: '100%' }}>
|
<Space direction="vertical" size={12} style={{ width: '100%' }}>
|
||||||
{rebindUnchanged ? (
|
{bindingRequiresSupport ? (
|
||||||
|
<Alert
|
||||||
|
type="warning"
|
||||||
|
showIcon
|
||||||
|
message="请联系客服人工核实绑定角色"
|
||||||
|
description={`平台未返回可核对的角色ID,无法自动核对。请复制订单号 ${
|
||||||
|
orderNo || selectedTask?.orderNo || ''
|
||||||
|
} 联系客服,核实完成前请不要确认绑定。`}
|
||||||
|
/>
|
||||||
|
) : rebindUnchanged ? (
|
||||||
<Alert
|
<Alert
|
||||||
type={rebindRejected ? 'error' : 'warning'}
|
type={rebindRejected ? 'error' : 'warning'}
|
||||||
showIcon
|
showIcon
|
||||||
@@ -1391,7 +1421,7 @@ export default function CustomerFulfillmentPage() {
|
|||||||
.join(' · ')}
|
.join(' · ')}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{comparisonMismatch && bindingComparison ? (
|
{!bindingRequiresSupport && comparisonMismatch && bindingComparison ? (
|
||||||
<Alert
|
<Alert
|
||||||
type="warning"
|
type="warning"
|
||||||
showIcon
|
showIcon
|
||||||
@@ -1413,15 +1443,31 @@ export default function CustomerFulfillmentPage() {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
{showMissingRoleIdWarning ? (
|
{bindingRequiresSupport ? (
|
||||||
<Alert
|
<div className="customer-binding-role-actions">
|
||||||
type="warning"
|
<Button
|
||||||
showIcon
|
block
|
||||||
message="未获取到已绑定的角色ID,请重新扫码绑定"
|
size="large"
|
||||||
description="没有角色 ID 时无法自动核对,请联系客服人工核实后再确认。"
|
className="customer-binding-confirm"
|
||||||
/>
|
onClick={() => void copyOrderNoForSupport()}
|
||||||
) : null}
|
>
|
||||||
{rebindUnchanged ? (
|
复制订单号联系客服
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
block
|
||||||
|
size="large"
|
||||||
|
className="customer-binding-rebind"
|
||||||
|
icon={<ReloadOutlined />}
|
||||||
|
loading={bindingLoading}
|
||||||
|
onClick={() => {
|
||||||
|
setBindingLoading(true)
|
||||||
|
void load(true).finally(() => setBindingLoading(false))
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
刷新状态
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
) : rebindUnchanged ? (
|
||||||
<div className="customer-binding-role-actions">
|
<div className="customer-binding-role-actions">
|
||||||
<Button
|
<Button
|
||||||
block
|
block
|
||||||
@@ -1541,7 +1587,10 @@ export default function CustomerFulfillmentPage() {
|
|||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
open={
|
open={
|
||||||
bindingConfirmOpen && selectedTask?.bindingStatus === 'role_ready' && !rebindUnchanged
|
bindingConfirmOpen &&
|
||||||
|
selectedTask?.bindingStatus === 'role_ready' &&
|
||||||
|
!rebindUnchanged &&
|
||||||
|
!bindingRequiresSupport
|
||||||
}
|
}
|
||||||
title="确认绑定角色"
|
title="确认绑定角色"
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
|
|||||||
@@ -57,6 +57,10 @@ export type CustomerBindingInfo = {
|
|||||||
bindGameRole: string
|
bindGameRole: string
|
||||||
bindGameRoleId: string
|
bindGameRoleId: string
|
||||||
bindGameChannel: string
|
bindGameChannel: string
|
||||||
|
/** 平台角色 ID 是否可核对(纯数字);false 时客户页只提示联系客服。 */
|
||||||
|
roleIdVerified?: boolean
|
||||||
|
/** 已绑定角色但缺少可核对角色 ID,需要客服人工核实。 */
|
||||||
|
requiresSupport?: boolean
|
||||||
hasExistingBinding: boolean
|
hasExistingBinding: boolean
|
||||||
rebindRequested: boolean
|
rebindRequested: boolean
|
||||||
rebindUnchanged: boolean
|
rebindUnchanged: boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user