feat(半自动履约): 补齐微博游戏角色绑定流程
This commit is contained in:
@@ -260,10 +260,8 @@ export default function SemiAutoTaskHistoryDrawer({
|
||||
label: '绑定状态',
|
||||
children: (
|
||||
<Tag color={bindingTagColor(history.task.bindingStatus)}>
|
||||
{history.task.platform === 'weibo'
|
||||
? '登录即授权'
|
||||
: BINDING_STATUS_LABELS[history.task.bindingStatus] ||
|
||||
history.task.bindingStatus}
|
||||
{BINDING_STATUS_LABELS[history.task.bindingStatus] ||
|
||||
history.task.bindingStatus}
|
||||
</Tag>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -939,11 +939,11 @@ function SemiAutoMockForm({
|
||||
<Select
|
||||
options={[
|
||||
{ value: 'huya', label: '虎牙(扫码登录 + 游戏角色绑定)' },
|
||||
{ value: 'weibo', label: '微博(短信 / 扫码登录,登录即授权)' },
|
||||
{ value: 'weibo', label: '微博(短信 / 扫码登录 + 游戏角色绑定)' },
|
||||
]}
|
||||
onChange={(value: 'huya' | 'weibo') => {
|
||||
form.setFieldsValue({
|
||||
pageTitle: value === 'weibo' ? '微博发帖授权测试' : '虎牙账号授权测试',
|
||||
pageTitle: value === 'weibo' ? '微博角色绑定测试' : '虎牙账号授权测试',
|
||||
browserTargetUrl: value === 'weibo' ? 'https://weibo.com/' : 'https://www.huya.com/',
|
||||
...(value === 'weibo' ? { connectorMode: 'embedded' } : {}),
|
||||
})
|
||||
@@ -1049,7 +1049,7 @@ function SemiAutoMockForm({
|
||||
style={{ marginBottom: 12 }}
|
||||
message={
|
||||
selectedPlatform === 'weibo'
|
||||
? '微博使用内置真实 Connector:短信验证码会真实发送到客户手机号,扫码需在微博 App 确认;登录成功即视为授权完成。'
|
||||
? '微博使用内置真实 Connector:短信验证码会真实发送到客户手机号,登录后还需客户通过微信或 QQ 扫码绑定游戏角色。'
|
||||
: selectedMode === 'mock'
|
||||
? integration
|
||||
? '订单和履约链路是正式的,只有登录与 CK 获取使用内置 Mock Connector。'
|
||||
|
||||
@@ -480,11 +480,9 @@ export default function AdminSemiAutoTasksPage() {
|
||||
<Text type="secondary">{task.displayStatus.nextAction}</Text>
|
||||
<Text type="secondary">{task.huyaUid ? `UID ${task.huyaUid}` : '未获取 UID'}</Text>
|
||||
<Text type="secondary">
|
||||
{task.platform === 'huya'
|
||||
? `绑定:${BINDING_STATUS_LABELS[task.bindingStatus] || task.bindingStatus}`
|
||||
: '微博登录即授权'}
|
||||
{`绑定:${BINDING_STATUS_LABELS[task.bindingStatus] || task.bindingStatus}`}
|
||||
</Text>
|
||||
{task.platform === 'huya' && (task.bindGameRole || task.bindGameRoleId) ? (
|
||||
{task.bindGameRole || task.bindGameRoleId ? (
|
||||
<Text type="secondary">
|
||||
{`角色:${task.bindGameRole || '-'}${task.bindGameRoleId ? `(${task.bindGameRoleId})` : '(无角色ID)'}`}
|
||||
</Text>
|
||||
@@ -769,9 +767,7 @@ export default function AdminSemiAutoTasksPage() {
|
||||
{detail.task.loginStatus === 'authenticated' ? 'CK 已获取' : '等待客户登录'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="绑定状态">
|
||||
{detail.task.platform === 'weibo'
|
||||
? '微博登录即授权'
|
||||
: BINDING_STATUS_LABELS[detail.task.bindingStatus] || detail.task.bindingStatus}
|
||||
{BINDING_STATUS_LABELS[detail.task.bindingStatus] || detail.task.bindingStatus}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="平台绑定角色">
|
||||
{detail.task.bindGameRole || '-'}
|
||||
@@ -995,7 +991,7 @@ function taskNeedsCustomerReauth(task: SemiAutoTask) {
|
||||
function taskCanUseCredential(task: SemiAutoTask) {
|
||||
return (
|
||||
task.loginStatus === 'authenticated' &&
|
||||
(task.platform === 'weibo' || task.bindingStatus === 'confirmed') &&
|
||||
(!task.bindingPolicy.bindingRequired || task.bindingStatus === 'confirmed') &&
|
||||
task.credentialReady &&
|
||||
task.credentialStatus !== 'invalid' &&
|
||||
task.credentialStatus !== 'error'
|
||||
|
||||
@@ -92,6 +92,7 @@ export default function CustomerFulfillmentPage({
|
||||
const hydratingBindingRef = useRef(false)
|
||||
const autoOpenedRoleRef = useRef('')
|
||||
const redirectingRef = useRef(false)
|
||||
const weiboBindingSyncRef = useRef(false)
|
||||
// Connector 重启或会话被回收后,绑定/确认接口会返回 huya_native_session_not_found。
|
||||
const [bindingSessionExpired, setBindingSessionExpired] = useState(false)
|
||||
const [bindingLoadError, setBindingLoadError] = useState('')
|
||||
@@ -177,6 +178,7 @@ export default function CustomerFulfillmentPage({
|
||||
startingBindingRef.current = false
|
||||
hydratingBindingRef.current = false
|
||||
autoOpenedRoleRef.current = ''
|
||||
weiboBindingSyncRef.current = false
|
||||
setBindingSessionExpired(false)
|
||||
setBindingLoadError('')
|
||||
}, [selectedTask?.id])
|
||||
@@ -302,7 +304,7 @@ export default function CustomerFulfillmentPage({
|
||||
setBindingLoadError('')
|
||||
})
|
||||
.catch((error) => {
|
||||
if (isHuyaSessionExpired(error)) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
return
|
||||
}
|
||||
@@ -325,9 +327,15 @@ export default function CustomerFulfillmentPage({
|
||||
])
|
||||
|
||||
useEffect(() => {
|
||||
if (!selectedTask || !orderNo || selectedTask.platform !== 'huya') return
|
||||
if (!selectedTask || !orderNo) return
|
||||
const huyaBinding =
|
||||
selectedTask.platform === 'huya' &&
|
||||
['qr_pending', 'scanned'].includes(selectedTask.bindingStatus)
|
||||
const weiboBinding =
|
||||
selectedTask.platform === 'weibo' &&
|
||||
['qr_pending', 'scanned'].includes(selectedTask.bindingStatus)
|
||||
if (!huyaBinding && !weiboBinding) return
|
||||
if (bindingSessionExpired) return
|
||||
if (!['qr_pending', 'scanned'].includes(selectedTask.bindingStatus)) return
|
||||
const tick = async () => {
|
||||
try {
|
||||
const response = await pollCustomerBinding(orderNo, selectedTask.id)
|
||||
@@ -337,7 +345,7 @@ export default function CustomerFulfillmentPage({
|
||||
if (response.data.binding) setBindingInfo(response.data.binding)
|
||||
setBindingLoadError('')
|
||||
} catch (error) {
|
||||
if (isHuyaSessionExpired(error)) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
setBindingConfirmOpen(false)
|
||||
return
|
||||
@@ -360,6 +368,34 @@ export default function CustomerFulfillmentPage({
|
||||
selectedTask?.platform,
|
||||
])
|
||||
|
||||
useEffect(() => {
|
||||
if (!selectedTask || !orderNo || selectedTask.platform !== 'weibo') return
|
||||
if (selectedTask.loginStatus !== 'authenticated') return
|
||||
if (selectedTask.bindingStatus !== 'not_started') return
|
||||
if (bindingInfo || weiboBindingSyncRef.current) return
|
||||
weiboBindingSyncRef.current = true
|
||||
void pollCustomerBinding(orderNo, selectedTask.id)
|
||||
.then((response) => {
|
||||
setTasks((current) =>
|
||||
current.map((task) => (task.id === response.data.task.id ? response.data.task : task)),
|
||||
)
|
||||
if (response.data.binding) setBindingInfo(response.data.binding)
|
||||
})
|
||||
.catch((error) => {
|
||||
setBindingLoadError(error instanceof Error ? error.message : '读取微博角色绑定状态失败')
|
||||
})
|
||||
.finally(() => {
|
||||
weiboBindingSyncRef.current = false
|
||||
})
|
||||
}, [
|
||||
bindingInfo,
|
||||
orderNo,
|
||||
selectedTask?.bindingStatus,
|
||||
selectedTask?.id,
|
||||
selectedTask?.loginStatus,
|
||||
selectedTask?.platform,
|
||||
])
|
||||
|
||||
// 进入 role_ready 时补一次绑定详情,保证确认弹窗能拿到两侧角色 ID。
|
||||
useEffect(() => {
|
||||
if (!selectedTask || !orderNo || selectedTask.platform !== 'huya') return
|
||||
@@ -376,7 +412,7 @@ export default function CustomerFulfillmentPage({
|
||||
setBindingLoadError('')
|
||||
})
|
||||
.catch((error) => {
|
||||
if (isHuyaSessionExpired(error)) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
return
|
||||
}
|
||||
@@ -536,7 +572,7 @@ export default function CustomerFulfillmentPage({
|
||||
)
|
||||
setLoginInfo(response.data.login)
|
||||
setHuyaChallenge(null)
|
||||
message.success(isWeibo ? '微博登录成功,等待客服处理' : '登录成功,请填写游戏角色资料')
|
||||
message.success(isWeibo ? '微博登录成功,请绑定游戏角色' : '登录成功,请填写游戏角色资料')
|
||||
} catch (error) {
|
||||
const errorCode = (error as { errorCode?: string } | null)?.errorCode || ''
|
||||
if (errorCode === 'weibo_sms_mfa_required') {
|
||||
@@ -582,10 +618,14 @@ export default function CustomerFulfillmentPage({
|
||||
setBindingLoadError('')
|
||||
setBindingConfirmOpen(false)
|
||||
} catch (error) {
|
||||
if (isHuyaSessionExpired(error)) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
setBindingConfirmOpen(false)
|
||||
message.warning('虎牙登录会话已过期,请重新登录')
|
||||
message.warning(
|
||||
selectedTask.platform === 'weibo'
|
||||
? '微博登录已失效,请重新登录'
|
||||
: '虎牙登录会话已过期,请重新登录',
|
||||
)
|
||||
return
|
||||
}
|
||||
const detail = error instanceof Error ? error.message : '创建绑定二维码失败'
|
||||
@@ -596,6 +636,32 @@ export default function CustomerFulfillmentPage({
|
||||
}
|
||||
}
|
||||
|
||||
async function handleStartWeiboBinding(channel: 'wx' | 'qq') {
|
||||
if (!selectedTask) return
|
||||
setBindingLoading(true)
|
||||
try {
|
||||
const response = await startCustomerBinding(orderNo, selectedTask.id, { channel })
|
||||
setTasks((current) =>
|
||||
current.map((task) => (task.id === response.data.task.id ? response.data.task : task)),
|
||||
)
|
||||
setBindingInfo(response.data.binding)
|
||||
setBindingLoadError('')
|
||||
setBindingConfirmOpen(false)
|
||||
} catch (error) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
setBindingConfirmOpen(false)
|
||||
message.warning('微博登录已失效,请重新登录')
|
||||
return
|
||||
}
|
||||
const detail = error instanceof Error ? error.message : '生成微博角色绑定二维码失败'
|
||||
setBindingLoadError(detail)
|
||||
message.error(detail)
|
||||
} finally {
|
||||
setBindingLoading(false)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 二维码区的刷新/重新获取:换绑流程必须 forceRebind。
|
||||
* 否则后端发现账号已有绑定角色会直接返回已有角色(role_ready),页面看起来像「返回上一步」。
|
||||
@@ -638,7 +704,11 @@ export default function CustomerFulfillmentPage({
|
||||
}
|
||||
if (nextTask.bindingStatus === 'confirmed') {
|
||||
setBindingConfirmOpen(false)
|
||||
message.success('已提交平台绑定,等待客服处理')
|
||||
message.success(
|
||||
selectedTask.platform === 'weibo'
|
||||
? '微博角色已绑定,等待客服处理'
|
||||
: '已提交平台绑定,等待客服处理',
|
||||
)
|
||||
return
|
||||
}
|
||||
// 弹窗内点「刷新」:角色不再是待确认状态时收起弹窗,避免展示过期比对。
|
||||
@@ -653,7 +723,11 @@ export default function CustomerFulfillmentPage({
|
||||
return
|
||||
}
|
||||
if (nextTask.bindingStatus === 'qr_pending') {
|
||||
message.warning('还没有检测到扫码记录,请使用微信扫码完成绑定后再点击')
|
||||
message.warning(
|
||||
`还没有检测到扫码记录,请使用${
|
||||
nextBinding?.bindGameChannel === 'QQ' ? 'QQ' : '微信'
|
||||
}扫码完成绑定后再点击`,
|
||||
)
|
||||
return
|
||||
}
|
||||
if (nextTask.bindingStatus === 'expired') {
|
||||
@@ -666,10 +740,14 @@ export default function CustomerFulfillmentPage({
|
||||
}
|
||||
message.info(detail || '绑定状态还没有更新,请稍后再试')
|
||||
} catch (error) {
|
||||
if (isHuyaSessionExpired(error)) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
setBindingConfirmOpen(false)
|
||||
message.warning('虎牙登录会话已过期,请重新登录')
|
||||
message.warning(
|
||||
selectedTask.platform === 'weibo'
|
||||
? '微博登录已失效,请重新登录'
|
||||
: '虎牙登录会话已过期,请重新登录',
|
||||
)
|
||||
return
|
||||
}
|
||||
const detail = error instanceof Error ? error.message : '刷新绑定状态失败'
|
||||
@@ -701,7 +779,7 @@ export default function CustomerFulfillmentPage({
|
||||
}
|
||||
message.info('已向虎牙提交换绑,正在等待角色生效')
|
||||
} catch (error) {
|
||||
if (isHuyaSessionExpired(error)) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
setBindingConfirmOpen(false)
|
||||
message.warning('虎牙登录会话已过期,请重新登录')
|
||||
@@ -727,7 +805,7 @@ export default function CustomerFulfillmentPage({
|
||||
setBindingConfirmOpen(false)
|
||||
message.success('已提交平台绑定,等待客服处理')
|
||||
} catch (error) {
|
||||
if (isHuyaSessionExpired(error)) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
setBindingConfirmOpen(false)
|
||||
message.warning('虎牙登录会话已过期,请重新登录')
|
||||
@@ -767,7 +845,7 @@ export default function CustomerFulfillmentPage({
|
||||
setBindingLoadError('')
|
||||
message.success('已返回上一步,请修改资料后重新提交')
|
||||
} catch (error) {
|
||||
if (isHuyaSessionExpired(error)) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
} else {
|
||||
// 重置失败不阻断客户改资料,保存后会重新识别平台角色。
|
||||
@@ -840,7 +918,7 @@ export default function CustomerFulfillmentPage({
|
||||
}
|
||||
}
|
||||
|
||||
const displayTitle = isWeibo ? '微博账号登录授权' : '绑定游戏角色'
|
||||
const displayTitle = isWeibo ? '登录并绑定微博游戏角色' : '绑定游戏角色'
|
||||
const loginQrVisible =
|
||||
Boolean(selectedTask) && ['qr_pending', 'scanned'].includes(selectedTask.loginStatus)
|
||||
const showBindingStage = Boolean(
|
||||
@@ -850,6 +928,14 @@ export default function CustomerFulfillmentPage({
|
||||
selectedTask.executionStatus !== 'completed' &&
|
||||
selectedTask.executionStatus !== 'cancelled',
|
||||
)
|
||||
const showWeiboBindingStage = Boolean(
|
||||
selectedTask &&
|
||||
selectedTask.platform === 'weibo' &&
|
||||
selectedTask.loginStatus === 'authenticated' &&
|
||||
selectedTask.bindingStatus !== 'confirmed' &&
|
||||
selectedTask.executionStatus !== 'completed' &&
|
||||
selectedTask.executionStatus !== 'cancelled',
|
||||
)
|
||||
const bindingQrVisible =
|
||||
profileComplete &&
|
||||
['not_started', 'qr_pending', 'scanned'].includes(selectedTask?.bindingStatus || '')
|
||||
@@ -1163,6 +1249,124 @@ export default function CustomerFulfillmentPage({
|
||||
</section>
|
||||
) : null}
|
||||
|
||||
{showWeiboBindingStage ? (
|
||||
<section className="customer-binding-stage">
|
||||
<div className="customer-auth-section-heading">
|
||||
<span className="customer-auth-section-icon">
|
||||
<QrcodeOutlined />
|
||||
</span>
|
||||
<div>
|
||||
<h2>绑定微博游戏角色</h2>
|
||||
<p>请选择微信或 QQ,使用对应 App 扫码完成角色绑定。</p>
|
||||
</div>
|
||||
</div>
|
||||
{bindingSessionExpired ? (
|
||||
<Alert
|
||||
type="error"
|
||||
showIcon
|
||||
message="微博登录已失效"
|
||||
description="请重新登录微博后再绑定游戏角色。"
|
||||
action={
|
||||
<Button size="small" onClick={() => void handleStartLogin()}>
|
||||
重新登录
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
) : null}
|
||||
{bindingInfo?.bindGameRole ? (
|
||||
<div className="customer-binding-info">
|
||||
<h3>当前绑定角色</h3>
|
||||
<div>
|
||||
<span>角色名</span>
|
||||
<strong>{bindingInfo.bindGameRole}</strong>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
{bindingInfo?.qrImage ? (
|
||||
<div className="customer-binding-qr-card">
|
||||
<Image
|
||||
src={bindingInfo.qrImage}
|
||||
alt={`${bindingInfo.bindGameChannel || '微博'}角色绑定二维码`}
|
||||
width={260}
|
||||
preview={false}
|
||||
/>
|
||||
<p className="customer-binding-qr-hint">{bindingInfo.message}</p>
|
||||
<p className="customer-binding-qr-countdown">
|
||||
建议 {formatCountdown(bindingSecondsLeft)} 内完成扫码
|
||||
</p>
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-next"
|
||||
loading={bindingLoading}
|
||||
onClick={() => void handlePollBindingNow()}
|
||||
>
|
||||
已扫码,刷新绑定状态
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
<div className="customer-binding-qr-card">
|
||||
{selectedTask.bindingStatus === 'expired' ? (
|
||||
<Alert
|
||||
type="warning"
|
||||
showIcon
|
||||
message="微博绑定二维码已过期"
|
||||
description="请重新选择微信或 QQ 获取新的绑定二维码。"
|
||||
/>
|
||||
) : null}
|
||||
{bindingLoadError ? (
|
||||
<Alert
|
||||
type="error"
|
||||
showIcon
|
||||
message={bindingLoadError}
|
||||
description={bindingInfo?.message}
|
||||
/>
|
||||
) : selectedTask.bindingStatus === 'failed' && bindingInfo?.message ? (
|
||||
<Alert type="error" showIcon message={bindingInfo.message} />
|
||||
) : null}
|
||||
<Space direction="vertical" size={10} style={{ width: '100%' }}>
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
type="primary"
|
||||
loading={bindingLoading}
|
||||
disabled={bindingSessionExpired}
|
||||
onClick={() => void handleStartWeiboBinding('wx')}
|
||||
>
|
||||
微信绑定
|
||||
</Button>
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
loading={bindingLoading}
|
||||
disabled={bindingSessionExpired}
|
||||
onClick={() => void handleStartWeiboBinding('qq')}
|
||||
>
|
||||
QQ 绑定
|
||||
</Button>
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-rebind"
|
||||
loading={bindingLoading}
|
||||
disabled={bindingSessionExpired}
|
||||
onClick={() => void handlePollBindingNow()}
|
||||
>
|
||||
刷新角色状态
|
||||
</Button>
|
||||
</Space>
|
||||
</div>
|
||||
)}
|
||||
{Number(bindingInfo?.rebindCooldownDays || 0) > 0 ? (
|
||||
<Alert
|
||||
type="info"
|
||||
showIcon
|
||||
message={`当前角色仍在换绑冷却期,剩余约 ${bindingInfo?.rebindCooldownDays || 0} 天`}
|
||||
/>
|
||||
) : null}
|
||||
</section>
|
||||
) : null}
|
||||
|
||||
{showBindingStage ? (
|
||||
<section id="customer-binding-stage" className="customer-binding-stage">
|
||||
{profileComplete && !profileEditing ? (
|
||||
@@ -1185,7 +1389,9 @@ export default function CustomerFulfillmentPage({
|
||||
|
||||
{bindingSessionExpired ? (
|
||||
<div className="customer-binding-session-card">
|
||||
<p className="customer-binding-session-title">虎牙登录会话已过期</p>
|
||||
<p className="customer-binding-session-title">
|
||||
{isWeibo ? '微博登录已失效' : '虎牙登录会话已过期'}
|
||||
</p>
|
||||
<p className="customer-binding-session-desc">
|
||||
请返回登录重新扫码,已填写的订单资料和绑定状态不会丢失。
|
||||
</p>
|
||||
@@ -1586,6 +1792,7 @@ export default function CustomerFulfillmentPage({
|
||||
|
||||
{isWeibo &&
|
||||
selectedTask?.loginStatus === 'authenticated' &&
|
||||
selectedTask.bindingStatus === 'confirmed' &&
|
||||
selectedTask.executionStatus !== 'completed' ? (
|
||||
<div className="customer-auth-state is-waiting">
|
||||
<div className="customer-auth-state-icon">
|
||||
@@ -1810,8 +2017,13 @@ function CustomerPrivacyNote() {
|
||||
}
|
||||
|
||||
/** Connector 重启或会话被回收时后端返回该错误码,需要引导客户重新登录。 */
|
||||
function isHuyaSessionExpired(error: unknown) {
|
||||
return (error as { errorCode?: string } | null)?.errorCode === 'huya_native_session_not_found'
|
||||
function isConnectorSessionExpired(error: unknown) {
|
||||
return [
|
||||
'huya_native_session_not_found',
|
||||
'weibo_session_not_found',
|
||||
'weibo_login_required',
|
||||
'weibo_credential_invalid',
|
||||
].includes((error as { errorCode?: string } | null)?.errorCode || '')
|
||||
}
|
||||
|
||||
function isValidMainlandMobile(value: string) {
|
||||
|
||||
@@ -45,11 +45,14 @@ export function pollCustomerLogin(orderNo: string, taskId: number) {
|
||||
export function startCustomerBinding(
|
||||
orderNo: string,
|
||||
taskId: number,
|
||||
options: { forceRebind?: boolean } = {},
|
||||
options: { forceRebind?: boolean; channel?: 'wx' | 'qq' } = {},
|
||||
) {
|
||||
return apiPost<{ task: CustomerSemiAutoTask; binding: CustomerBindingInfo }>(
|
||||
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}/tasks/${taskId}/binding/start`,
|
||||
options.forceRebind ? { forceRebind: true } : {},
|
||||
{
|
||||
...(options.forceRebind ? { forceRebind: true } : {}),
|
||||
...(options.channel ? { channel: options.channel } : {}),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
export type SemiAutoPlatform = 'huya' | 'weibo'
|
||||
|
||||
export type SemiAutoBindingPolicy = {
|
||||
bindingKind: 'game_role' | 'account_authorization'
|
||||
bindingRequired: boolean
|
||||
requiresCustomerProfile: boolean
|
||||
supportsRebind: boolean
|
||||
queryOwner: 'order_site' | 'live_hub'
|
||||
requiredFields: Array<'roleName' | 'roleId' | 'serverZone' | 'loginChannel'>
|
||||
confirmationMode: 'customer_match' | 'platform_verified'
|
||||
rebindMode: 'platform_confirm' | 'rescan_qr'
|
||||
}
|
||||
|
||||
export type SemiAutoDisplayStatus = {
|
||||
key: string
|
||||
label: string
|
||||
@@ -14,6 +25,7 @@ export type SemiAutoTask = {
|
||||
fulfillmentId: number | null
|
||||
platform: SemiAutoPlatform
|
||||
platformLabel: string
|
||||
bindingPolicy: SemiAutoBindingPolicy
|
||||
loginStatus: string
|
||||
bindingStatus: string
|
||||
executionStatus: string
|
||||
|
||||
@@ -13,6 +13,16 @@ export type CustomerSemiAutoTask = {
|
||||
id: number
|
||||
platform: 'huya' | 'weibo'
|
||||
platformLabel: string
|
||||
bindingPolicy: {
|
||||
bindingKind: 'game_role' | 'account_authorization'
|
||||
bindingRequired: boolean
|
||||
requiresCustomerProfile: boolean
|
||||
supportsRebind: boolean
|
||||
queryOwner: 'order_site' | 'live_hub'
|
||||
requiredFields: Array<'roleName' | 'roleId' | 'serverZone' | 'loginChannel'>
|
||||
confirmationMode: 'customer_match' | 'platform_verified'
|
||||
rebindMode: 'platform_confirm' | 'rescan_qr'
|
||||
}
|
||||
orderNo: string
|
||||
productName: string
|
||||
skuName: string
|
||||
|
||||
Reference in New Issue
Block a user