优化(半自动履约): 精简虎牙扫码与绑定确认流程
This commit is contained in:
@@ -90,6 +90,16 @@ describe('虎牙角色比对', () => {
|
||||
assert.match(result.message, /区服/)
|
||||
})
|
||||
|
||||
it('平台系统不一致时禁止确认', () => {
|
||||
const result = compareBindingRole(task('落地盒子怪cc', '4212063544', '苹果Q区'), {
|
||||
bindGameRole: '落地盒子怪cc',
|
||||
bindGameRoleToken: HUYA_ROLE_TOKEN,
|
||||
bindGameChannel: '安卓(android) · QQ',
|
||||
})
|
||||
assert.equal(result.verdict, 'mismatch')
|
||||
assert.match(result.message, /区服/)
|
||||
})
|
||||
|
||||
it('平台区服无法解析时判 unknown', () => {
|
||||
const result = compareBindingRole(task('落地盒子怪cc', '4212063544', '安卓Q区'), {
|
||||
bindGameRole: '落地盒子怪cc',
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import {
|
||||
CheckCircleFilled,
|
||||
CopyOutlined,
|
||||
ExclamationCircleOutlined,
|
||||
LoadingOutlined,
|
||||
QrcodeOutlined,
|
||||
ReloadOutlined,
|
||||
} from '@ant-design/icons'
|
||||
import { App, Alert, Button, Image, Input, Modal, Select, Space, Spin } from 'antd'
|
||||
import { App, Alert, Button, Image, Input, Select, Space, Spin } from 'antd'
|
||||
import QRCode from 'qrcode'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from 'react'
|
||||
import { useLocation, useNavigate, useParams } from 'react-router'
|
||||
@@ -82,7 +83,6 @@ export default function CustomerFulfillmentPage({
|
||||
const [huyaChallengeLoading, setHuyaChallengeLoading] = useState(false)
|
||||
const [bindingInfo, setBindingInfo] = useState<CustomerBindingInfo | null>(null)
|
||||
const [bindingLoading, setBindingLoading] = useState(false)
|
||||
const [bindingConfirmOpen, setBindingConfirmOpen] = useState(false)
|
||||
const [bindingSecondsLeft, setBindingSecondsLeft] = useState(0)
|
||||
const [bindingQrImage, setBindingQrImage] = useState('')
|
||||
const [profileRoleName, setProfileRoleName] = useState('')
|
||||
@@ -94,7 +94,6 @@ export default function CustomerFulfillmentPage({
|
||||
const lastBindingRefreshAtRef = useRef(0)
|
||||
const resettingBindingRef = useRef(false)
|
||||
const hydratingBindingRef = useRef(false)
|
||||
const autoOpenedRoleRef = useRef('')
|
||||
const redirectingRef = useRef(false)
|
||||
const weiboBindingSyncRef = useRef(false)
|
||||
// Connector 重启或会话被回收后,绑定/确认接口会返回 huya_native_session_not_found。
|
||||
@@ -188,11 +187,9 @@ export default function CustomerFulfillmentPage({
|
||||
setSmsCountdown(0)
|
||||
setHuyaChallenge(null)
|
||||
setBindingInfo(null)
|
||||
setBindingConfirmOpen(false)
|
||||
startingBindingRef.current = false
|
||||
lastBindingRefreshAtRef.current = 0
|
||||
hydratingBindingRef.current = false
|
||||
autoOpenedRoleRef.current = ''
|
||||
weiboBindingSyncRef.current = false
|
||||
setBindingSessionExpired(false)
|
||||
setBindingLoadError('')
|
||||
@@ -365,7 +362,6 @@ export default function CustomerFulfillmentPage({
|
||||
} catch (error) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
setBindingConfirmOpen(false)
|
||||
return
|
||||
}
|
||||
// 非会话错误不要静默:二维码区域会展示可重试的错误,避免一直转圈。
|
||||
@@ -441,20 +437,6 @@ export default function CustomerFulfillmentPage({
|
||||
selectedTask?.platform,
|
||||
])
|
||||
|
||||
useEffect(() => {
|
||||
if (!bindingDecision?.canConfirmBinding) return
|
||||
const key = `${selectedTask.id}:${
|
||||
bindingInfo?.pendingBindGameRoleToken ||
|
||||
bindingInfo?.bindGameRoleToken ||
|
||||
selectedTask.pendingBindGameRoleToken ||
|
||||
selectedTask.bindGameRoleToken ||
|
||||
''
|
||||
}`
|
||||
if (autoOpenedRoleRef.current === key) return
|
||||
autoOpenedRoleRef.current = key
|
||||
setBindingConfirmOpen(true)
|
||||
}, [bindingDecision, bindingInfo, selectedTask?.id])
|
||||
|
||||
useEffect(() => {
|
||||
const url = bindingInfo?.qrUrl
|
||||
if (!url) {
|
||||
@@ -497,7 +479,6 @@ export default function CustomerFulfillmentPage({
|
||||
setBindingSessionExpired(false)
|
||||
setBindingLoadError('')
|
||||
setBindingInfo(null)
|
||||
setBindingConfirmOpen(false)
|
||||
setBindingSecondsLeft(0)
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||
} catch (error) {
|
||||
@@ -636,7 +617,6 @@ export default function CustomerFulfillmentPage({
|
||||
)
|
||||
setBindingInfo(response.data.binding)
|
||||
setBindingLoadError('')
|
||||
setBindingConfirmOpen(false)
|
||||
const nextDecision =
|
||||
response.data.binding?.bindingDecision || response.data.task.bindingDecision
|
||||
if (
|
||||
@@ -646,13 +626,10 @@ export default function CustomerFulfillmentPage({
|
||||
nextDecision?.flowState === 'manual_review'
|
||||
) {
|
||||
message.warning(nextDecision.message)
|
||||
} else if (nextDecision?.canConfirmBinding) {
|
||||
setBindingConfirmOpen(true)
|
||||
}
|
||||
} catch (error) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
setBindingConfirmOpen(false)
|
||||
message.warning(
|
||||
selectedTask.platform === 'weibo'
|
||||
? '微博登录已失效,请重新登录'
|
||||
@@ -678,11 +655,9 @@ export default function CustomerFulfillmentPage({
|
||||
)
|
||||
setBindingInfo(response.data.binding)
|
||||
setBindingLoadError('')
|
||||
setBindingConfirmOpen(false)
|
||||
} catch (error) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
setBindingConfirmOpen(false)
|
||||
message.warning('微博登录已失效,请重新登录')
|
||||
return
|
||||
}
|
||||
@@ -706,7 +681,7 @@ export default function CustomerFulfillmentPage({
|
||||
)
|
||||
}
|
||||
|
||||
async function handlePollBindingNow(openConfirm = false) {
|
||||
async function handlePollBindingNow() {
|
||||
if (!selectedTask) return
|
||||
setBindingLoading(true)
|
||||
try {
|
||||
@@ -719,10 +694,8 @@ export default function CustomerFulfillmentPage({
|
||||
setBindingLoadError('')
|
||||
if (selectedTask.platform === 'huya' && nextDecision) {
|
||||
if (nextDecision.canConfirmBinding) {
|
||||
setBindingConfirmOpen(true)
|
||||
return
|
||||
}
|
||||
setBindingConfirmOpen(false)
|
||||
if (nextDecision.flowState === 'confirmed') {
|
||||
message.success('平台绑定已确认,等待客服处理')
|
||||
return
|
||||
@@ -760,7 +733,6 @@ export default function CustomerFulfillmentPage({
|
||||
return
|
||||
}
|
||||
// 微博仍以平台事实状态展示。
|
||||
if (openConfirm) setBindingConfirmOpen(false)
|
||||
const detail = nextBinding?.message || ''
|
||||
if (nextTask.bindingStatus === 'confirmed') {
|
||||
message.success('微博角色已绑定,等待客服处理')
|
||||
@@ -774,7 +746,6 @@ export default function CustomerFulfillmentPage({
|
||||
} catch (error) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
setBindingConfirmOpen(false)
|
||||
message.warning(
|
||||
selectedTask.platform === 'weibo'
|
||||
? '微博登录已失效,请重新登录'
|
||||
@@ -801,7 +772,6 @@ export default function CustomerFulfillmentPage({
|
||||
setTasks((current) => current.map((task) => (task.id === nextTask.id ? nextTask : task)))
|
||||
if (nextBinding) setBindingInfo(nextBinding)
|
||||
setBindingLoadError('')
|
||||
setBindingConfirmOpen(false)
|
||||
if (
|
||||
nextDecision?.flowState === 'rebind_blocked_account' ||
|
||||
nextDecision?.flowState === 'rebind_blocked_target_role' ||
|
||||
@@ -811,14 +781,12 @@ export default function CustomerFulfillmentPage({
|
||||
return
|
||||
}
|
||||
if (nextDecision?.canConfirmBinding) {
|
||||
message.success('已识别本次待确认角色,请核对后再确认绑定')
|
||||
return
|
||||
}
|
||||
message.info('尚未识别到新的待确认角色,请重新选择并刷新')
|
||||
} catch (error) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
setBindingConfirmOpen(false)
|
||||
message.warning('虎牙登录会话已过期,请重新登录')
|
||||
return
|
||||
}
|
||||
@@ -858,7 +826,6 @@ export default function CustomerFulfillmentPage({
|
||||
current.map((task) => (task.id === response.data.task.id ? response.data.task : task)),
|
||||
)
|
||||
setBindingInfo(response.data.binding)
|
||||
setBindingConfirmOpen(false)
|
||||
const nextDecision =
|
||||
response.data.binding?.bindingDecision || response.data.task.bindingDecision
|
||||
if (nextDecision?.flowState === 'confirmed') {
|
||||
@@ -874,11 +841,10 @@ export default function CustomerFulfillmentPage({
|
||||
} catch (error) {
|
||||
if (isConnectorSessionExpired(error)) {
|
||||
setBindingSessionExpired(true)
|
||||
setBindingConfirmOpen(false)
|
||||
message.warning('虎牙登录会话已过期,请重新登录')
|
||||
return
|
||||
}
|
||||
message.error(error instanceof Error ? error.message : '提交平台绑定失败')
|
||||
message.error(error instanceof Error ? error.message : '确认绑定失败')
|
||||
} finally {
|
||||
setBindingLoading(false)
|
||||
}
|
||||
@@ -892,9 +858,8 @@ export default function CustomerFulfillmentPage({
|
||||
async function openProfileEditor() {
|
||||
if (!selectedTask) return
|
||||
if (resettingBindingRef.current) return
|
||||
setBindingConfirmOpen(false)
|
||||
setProfileEditing(true)
|
||||
// 资料步骤会隐藏绑定二维码与比对区,等 React 完成切换后再回到第一步顶部。
|
||||
// 资料步骤会隐藏绑定二维码与操作区,等 React 完成切换后再回到第一步顶部。
|
||||
window.setTimeout(() => {
|
||||
document
|
||||
.getElementById('customer-binding-stage')
|
||||
@@ -1046,10 +1011,15 @@ export default function CustomerFulfillmentPage({
|
||||
].includes(bindingDecision.flowState),
|
||||
)
|
||||
const bindingComparison = bindingDecision?.comparison || bindingInfo?.comparison || null
|
||||
const bindingAccountName = String(
|
||||
bindingInfo?.bindGameAccount || selectedTask?.bindGameAccount || '',
|
||||
).trim()
|
||||
const currentRoleName = bindingInfo?.bindGameRole || selectedTask?.bindGameRole || ''
|
||||
const pendingRoleName =
|
||||
bindingInfo?.pendingBindGameRole || selectedTask?.pendingBindGameRole || ''
|
||||
const bindingRoleName = pendingRoleName || currentRoleName
|
||||
const bindingQrSource = bindingInfo?.qrImage || bindingQrImage || ''
|
||||
const bindingQrReady = Boolean(bindingQrSource)
|
||||
const rebindUnchanged = bindingInfo?.rebindUnchanged === true
|
||||
// 换绑被虎牙拒绝或未生效时展示失败原因;若客户已把资料改成与平台当前角色一致,
|
||||
// 比对为 match,则回到正常提交流程,不再显示换绑失败。
|
||||
@@ -1110,7 +1080,7 @@ export default function CustomerFulfillmentPage({
|
||||
}
|
||||
if (!bindingDecision && selectedTask?.bindingStatus === 'role_ready') {
|
||||
if (!bindingComparison) return { tone: 'is-info', text: '正在核对平台角色,请稍候' }
|
||||
return { tone: 'is-info', text: '平台角色与已填资料一致,请提交平台绑定' }
|
||||
return { tone: 'is-info', text: '角色名与区服验证通过,可确认绑定' }
|
||||
}
|
||||
if (
|
||||
!bindingDecision &&
|
||||
@@ -1203,7 +1173,7 @@ export default function CustomerFulfillmentPage({
|
||||
<div className="customer-auth-profile" id="customer-profile-form">
|
||||
<p>
|
||||
{profileComplete
|
||||
? '修改目标角色资料后会重新核对虎牙账号当前绑定角色;角色名与区服一致后才能确认绑定。'
|
||||
? '修改资料后会重新核对平台角色;角色名、区服和平台信息一致后才能确认绑定。'
|
||||
: '第一步:请填写区服、游戏角色 UID 和角色名。UID 只做资料留档,不参与绑定核验。'}
|
||||
</p>
|
||||
<div className="customer-profile-form">
|
||||
@@ -1553,16 +1523,16 @@ export default function CustomerFulfillmentPage({
|
||||
|
||||
{showBindingStage ? (
|
||||
<section id="customer-binding-stage" className="customer-binding-stage">
|
||||
{profileComplete && !profileEditing ? (
|
||||
{profileComplete &&
|
||||
!profileEditing &&
|
||||
(bindingAccountName || currentRoleName || pendingRoleName) ? (
|
||||
<div className="customer-binding-info">
|
||||
<h3>
|
||||
绑定信息 <small>(已登录虎牙账号)</small>
|
||||
</h3>
|
||||
<div>
|
||||
<span>登录账号</span>
|
||||
<strong>
|
||||
{bindingInfo?.bindGameAccount || selectedTask.bindGameAccount || '未获取'}
|
||||
</strong>
|
||||
<strong>{bindingAccountName || '未获取'}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>当前绑定角色</span>
|
||||
@@ -1597,101 +1567,113 @@ export default function CustomerFulfillmentPage({
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{bindingBanner && !profileEditing ? (
|
||||
{bindingBanner && !profileEditing && !bindingQrVisible ? (
|
||||
<div className={`customer-binding-alert ${bindingBanner.tone}`}>
|
||||
{bindingBanner.text}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{bindingQrVisible && !bindingSessionExpired && !profileEditing ? (
|
||||
<div className="customer-binding-qr-card">
|
||||
<h3>游戏角色绑定二维码</h3>
|
||||
{bindingInfo?.qrImage || bindingQrImage ? (
|
||||
<Image
|
||||
src={bindingInfo?.qrImage || bindingQrImage || ''}
|
||||
alt="游戏角色绑定二维码"
|
||||
width={260}
|
||||
preview={false}
|
||||
/>
|
||||
<div className="customer-binding-qr-card customer-huya-qr-card">
|
||||
<div className="customer-huya-qr-heading">
|
||||
<QrcodeOutlined />
|
||||
<h3>微信扫码绑定</h3>
|
||||
</div>
|
||||
{bindingQrReady ? (
|
||||
<div className="customer-huya-qr-code">
|
||||
<Image
|
||||
src={bindingQrSource}
|
||||
alt="微信扫码绑定游戏角色"
|
||||
width={228}
|
||||
preview={false}
|
||||
/>
|
||||
</div>
|
||||
) : bindingLoadError ? (
|
||||
<div className="customer-binding-qr-error">
|
||||
<p>绑定二维码加载失败</p>
|
||||
<span>{bindingLoadError}</span>
|
||||
<div className="customer-binding-qr-actions">
|
||||
<Button type="primary" onClick={() => void handlePollBindingNow()}>
|
||||
重试
|
||||
</Button>
|
||||
<Button loading={loading} onClick={() => void handleStartLogin()}>
|
||||
返回登录
|
||||
</Button>
|
||||
<div className="customer-huya-qr-code">
|
||||
<div className="customer-binding-qr-error">
|
||||
<p>二维码加载失败</p>
|
||||
<span>{bindingLoadError}</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="customer-auth-qr-placeholder">
|
||||
<Spin />
|
||||
<span>正在生成绑定二维码...</span>
|
||||
<div className="customer-huya-qr-code">
|
||||
<div className="customer-auth-qr-placeholder">
|
||||
<Spin />
|
||||
<span>正在生成二维码</span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<p className="customer-binding-qr-hint">
|
||||
{bindingInfo?.hasExistingBinding === false
|
||||
? '该虎牙账号还没有绑定游戏角色,请用微信扫码完成绑定'
|
||||
: '请使用微信APP扫码进行游戏角色绑定'}
|
||||
? '使用微信扫码选择目标游戏角色'
|
||||
: '使用微信扫码选择要换绑的角色'}
|
||||
</p>
|
||||
<p className="customer-binding-qr-hint">
|
||||
扫码后系统只核对角色名称与区服,UID 不参与绑定判定。
|
||||
</p>
|
||||
<p className="customer-binding-qr-tip">
|
||||
{selectedTask?.bindingStatus === 'scanned'
|
||||
? rebindAccepted
|
||||
? '已向虎牙提交换绑,正在等待角色生效,请稍候刷新。'
|
||||
: bindConfirmPending
|
||||
? '已向虎牙提交绑定,正在等待角色生效,请稍候刷新。'
|
||||
: bindingInfo?.rebindRequested
|
||||
? '扫码后请在虎牙弹窗中选中目标角色;选好后点下方「核对平台角色」。'
|
||||
: '请在微信中完成角色绑定确认,再点击下方按钮核对平台角色。'
|
||||
: '扫码后请在微信确认框中核对目标角色。'}
|
||||
</p>
|
||||
{nextRebindText ? (
|
||||
{selectedTask?.bindingStatus === 'scanned' ? (
|
||||
<p className="customer-binding-qr-tip">
|
||||
本次换绑成功后,下次可换绑:{nextRebindText}。
|
||||
{rebindAccepted || bindConfirmPending
|
||||
? '平台处理中,请刷新绑定状态'
|
||||
: '已扫码,请核对平台角色'}
|
||||
</p>
|
||||
) : null}
|
||||
<p className="customer-binding-qr-countdown">
|
||||
{selectedTask?.bindingStatus === 'scanned'
|
||||
? bindingInfo?.message || '已扫码,等待角色生效'
|
||||
: `建议 ${formatCountdown(bindingSecondsLeft)} 内完成扫码`}
|
||||
</p>
|
||||
<div className="customer-huya-qr-meta">
|
||||
<span>
|
||||
{bindingSecondsLeft > 0
|
||||
? `剩余 ${formatCountdown(bindingSecondsLeft)}`
|
||||
: '有效期待更新'}
|
||||
</span>
|
||||
<span>{selectedTask?.bindingStatus === 'scanned' ? '等待核对' : '微信扫码'}</span>
|
||||
</div>
|
||||
<div className="customer-binding-qr-actions">
|
||||
<Button type="primary" onClick={() => void handleCopyBindingLink()}>
|
||||
复制二维码链接
|
||||
<Button
|
||||
icon={<CopyOutlined />}
|
||||
disabled={!bindingQrReady}
|
||||
onClick={() => void handleCopyBindingLink()}
|
||||
>
|
||||
复制链接
|
||||
</Button>
|
||||
<Button onClick={handleRefreshBindingQr} loading={bindingLoading}>
|
||||
刷新二维码
|
||||
<Button
|
||||
icon={<ReloadOutlined />}
|
||||
onClick={
|
||||
bindingLoadError ? () => void handlePollBindingNow() : handleRefreshBindingQr
|
||||
}
|
||||
loading={bindingLoading}
|
||||
>
|
||||
{bindingLoadError ? '重试' : '刷新'}
|
||||
</Button>
|
||||
</div>
|
||||
{selectedTask?.bindingStatus === 'scanned' &&
|
||||
bindingInfo?.rebindRequested &&
|
||||
!rebindAccepted ? (
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-next"
|
||||
loading={bindingLoading}
|
||||
onClick={() => void handleSubmitRebind()}
|
||||
>
|
||||
核对平台角色
|
||||
</Button>
|
||||
{bindingQrReady ? (
|
||||
selectedTask?.bindingStatus === 'scanned' &&
|
||||
bindingInfo?.rebindRequested &&
|
||||
!rebindAccepted ? (
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-next"
|
||||
loading={bindingLoading}
|
||||
onClick={() => void handleSubmitRebind()}
|
||||
>
|
||||
核对平台角色
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-next"
|
||||
loading={bindingLoading}
|
||||
onClick={() => void handlePollBindingNow()}
|
||||
>
|
||||
{rebindAccepted || bindConfirmPending ? '刷新绑定状态' : '已扫码,核对角色'}
|
||||
</Button>
|
||||
)
|
||||
) : (
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-next"
|
||||
loading={bindingLoading}
|
||||
onClick={() => void handlePollBindingNow()}
|
||||
loading={loading}
|
||||
onClick={() => void handleStartLogin()}
|
||||
>
|
||||
{rebindAccepted || bindConfirmPending
|
||||
? '刷新绑定状态'
|
||||
: '已扫码绑定,点击核对平台角色'}
|
||||
返回登录
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
@@ -1745,7 +1727,7 @@ export default function CustomerFulfillmentPage({
|
||||
message="请联系客服人工核实绑定角色"
|
||||
description={`两侧角色信息不完整,无法自动核对。请复制订单号 ${
|
||||
orderNo || selectedTask?.orderNo || ''
|
||||
} 联系客服,核实完成前请不要提交平台绑定。`}
|
||||
} 联系客服,核实完成前无法确认绑定。`}
|
||||
/>
|
||||
) : showRebindFailure ? (
|
||||
<Alert
|
||||
@@ -1789,7 +1771,7 @@ export default function CustomerFulfillmentPage({
|
||||
{bindingComparison.customerRoleName || '角色未填'}
|
||||
</span>
|
||||
<span>
|
||||
角色名称与区服一致后才能确认绑定;请重新扫码换绑,或上一步修改资料。
|
||||
角色名称、区服和平台信息一致后才能确认绑定;请重新扫码换绑,或上一步修改资料。
|
||||
</span>
|
||||
{nextRebindText ? (
|
||||
<span>平台预计下次允许换绑:{nextRebindText}</span>
|
||||
@@ -1820,58 +1802,61 @@ export default function CustomerFulfillmentPage({
|
||||
size="large"
|
||||
className="customer-binding-confirm"
|
||||
loading={bindingLoading}
|
||||
onClick={() => setBindingConfirmOpen(true)}
|
||||
onClick={() => void handleConfirmBinding()}
|
||||
>
|
||||
提交平台绑定
|
||||
确认绑定这个角色到虎牙
|
||||
</Button>
|
||||
) : null}
|
||||
{decisionRequiresRebind || decisionCanRefreshQr ? (
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-rebind"
|
||||
icon={<ReloadOutlined />}
|
||||
loading={bindingLoading}
|
||||
onClick={() => void handleRefreshBinding(true)}
|
||||
>
|
||||
{bindingDecision?.flowState === 'rebind_required'
|
||||
? '重新扫码换绑'
|
||||
: '刷新绑定二维码'}
|
||||
</Button>
|
||||
) : null}
|
||||
{decisionCanEditProfile ? (
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-rebind"
|
||||
icon={<ExclamationCircleOutlined />}
|
||||
onClick={() => void openProfileEditor()}
|
||||
>
|
||||
上一步修改资料
|
||||
</Button>
|
||||
) : null}
|
||||
{bindingNeedsSupport ? (
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-confirm"
|
||||
onClick={() => void copyOrderNoForSupport()}
|
||||
>
|
||||
复制订单号联系客服
|
||||
</Button>
|
||||
) : null}
|
||||
{decisionCanRefreshBinding ? (
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-rebind"
|
||||
icon={<ReloadOutlined />}
|
||||
loading={bindingLoading}
|
||||
onClick={() => void handlePollBindingNow()}
|
||||
>
|
||||
刷新绑定状态
|
||||
</Button>
|
||||
) : null}
|
||||
) : (
|
||||
<>
|
||||
{decisionRequiresRebind || decisionCanRefreshQr ? (
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-rebind"
|
||||
icon={<ReloadOutlined />}
|
||||
loading={bindingLoading}
|
||||
onClick={() => void handleRefreshBinding(true)}
|
||||
>
|
||||
{bindingDecision?.flowState === 'rebind_required'
|
||||
? '重新扫码换绑'
|
||||
: '刷新绑定二维码'}
|
||||
</Button>
|
||||
) : null}
|
||||
{decisionCanEditProfile ? (
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-rebind"
|
||||
icon={<ExclamationCircleOutlined />}
|
||||
onClick={() => void openProfileEditor()}
|
||||
>
|
||||
上一步修改资料
|
||||
</Button>
|
||||
) : null}
|
||||
{bindingNeedsSupport ? (
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-confirm"
|
||||
onClick={() => void copyOrderNoForSupport()}
|
||||
>
|
||||
复制订单号联系客服
|
||||
</Button>
|
||||
) : null}
|
||||
{decisionCanRefreshBinding ? (
|
||||
<Button
|
||||
block
|
||||
size="large"
|
||||
className="customer-binding-rebind"
|
||||
icon={<ReloadOutlined />}
|
||||
loading={bindingLoading}
|
||||
onClick={() => void handlePollBindingNow()}
|
||||
>
|
||||
刷新绑定状态
|
||||
</Button>
|
||||
) : null}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</Space>
|
||||
) : null}
|
||||
@@ -1916,90 +1901,6 @@ export default function CustomerFulfillmentPage({
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<Modal
|
||||
open={
|
||||
bindingConfirmOpen &&
|
||||
canConfirmDecision &&
|
||||
!bindingDecision?.requiresSupport &&
|
||||
!profileEditing
|
||||
}
|
||||
className="customer-binding-modal"
|
||||
title="核对绑定角色"
|
||||
onCancel={() => {
|
||||
if (!bindingLoading) setBindingConfirmOpen(false)
|
||||
}}
|
||||
footer={
|
||||
<div className="customer-binding-modal-footer">
|
||||
{canConfirmDecision ? (
|
||||
<div className="customer-binding-modal-actions">
|
||||
<Button
|
||||
onClick={() => {
|
||||
if (!bindingLoading) setBindingConfirmOpen(false)
|
||||
}}
|
||||
>
|
||||
取消
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
loading={bindingLoading}
|
||||
onClick={() => void handleConfirmBinding()}
|
||||
>
|
||||
确认绑定此角色
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
<div className="customer-binding-modal-actions is-mismatch">
|
||||
<Button onClick={() => void openProfileEditor()}>上一步修改资料</Button>
|
||||
<Button loading={bindingLoading} onClick={() => void handleRefreshBinding(true)}>
|
||||
重新扫码换绑
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
{bindingComparison?.verdict === 'mismatch' ? (
|
||||
<p className="customer-binding-modal-error">
|
||||
{bindingComparison?.message || '两侧角色信息不一致,无法提交平台绑定'}
|
||||
</p>
|
||||
) : bindingComparison?.verdict === 'unknown' ? (
|
||||
<p className="customer-binding-modal-warning">两侧角色信息不完整,请联系客服核实</p>
|
||||
) : null}
|
||||
</div>
|
||||
}
|
||||
destroyOnClose
|
||||
>
|
||||
<Space direction="vertical" size={14} style={{ width: '100%' }}>
|
||||
<p style={{ margin: 0 }}>
|
||||
请核对角色名称与区服。游戏角色 UID 为必填留档,不参与绑定判定。
|
||||
</p>
|
||||
<div className="customer-binding-compare">
|
||||
<div className="customer-binding-compare-side">
|
||||
<div className="customer-binding-compare-head">
|
||||
<span>您填写的角色</span>
|
||||
<Button type="link" size="small" onClick={() => void openProfileEditor()}>
|
||||
编辑
|
||||
</Button>
|
||||
</div>
|
||||
<strong>{bindingComparison?.customerRoleName || '未填写'}</strong>
|
||||
<em>{bindingComparison?.customerZone || '区服未填写'}</em>
|
||||
</div>
|
||||
<div className="customer-binding-compare-side">
|
||||
<div className="customer-binding-compare-head">
|
||||
<span>{pendingRoleName ? '本次待确认角色' : '平台当前角色'}</span>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
loading={bindingLoading}
|
||||
onClick={() => void handlePollBindingNow(true)}
|
||||
>
|
||||
刷新
|
||||
</Button>
|
||||
</div>
|
||||
<strong>{bindingComparison?.boundRoleName || '未识别到角色'}</strong>
|
||||
<em>{bindingComparison?.boundZone || '区服未识别'}</em>
|
||||
</div>
|
||||
</div>
|
||||
</Space>
|
||||
</Modal>
|
||||
|
||||
<HuyaChallengeModal
|
||||
open={Boolean(huyaChallenge)}
|
||||
challenge={huyaChallenge}
|
||||
|
||||
@@ -373,81 +373,3 @@
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.customer-binding-modal-footer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.customer-binding-modal-actions {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.customer-binding-modal-actions .ant-btn {
|
||||
height: 42px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.customer-binding-modal-actions.is-mismatch {
|
||||
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
||||
}
|
||||
|
||||
.customer-binding-modal-error {
|
||||
margin: 0;
|
||||
color: #dc2626;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.customer-binding-modal-warning {
|
||||
margin: 0;
|
||||
color: #d97706;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.customer-binding-compare {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.customer-binding-compare-side {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
padding: 14px;
|
||||
border: 1px solid rgba(15, 23, 42, 0.12);
|
||||
border-radius: 6px;
|
||||
background: rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.customer-binding-compare-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
color: #64748b;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.customer-binding-compare-side strong {
|
||||
color: #0f172a;
|
||||
font-size: 16px;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.customer-binding-compare-side em {
|
||||
color: #64748b;
|
||||
font-style: normal;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.customer-binding-compare {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,16 +142,14 @@ body.customer-mobile-body .customer-binding-qr-card img {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* 固定宽度弹窗(绑定确认 520 / 虎牙验证 430)在窄屏必须收到视口内 */
|
||||
/* 虎牙验证弹窗在窄屏必须收进视口。 */
|
||||
@media (max-width: 640px) {
|
||||
.customer-binding-modal,
|
||||
.customer-huya-challenge-modal {
|
||||
width: calc(100vw - 24px) !important;
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.customer-binding-modal .ant-modal-content,
|
||||
.customer-huya-challenge-modal .ant-modal-content {
|
||||
max-height: calc(100vh - 32px);
|
||||
overflow-y: auto;
|
||||
@@ -159,8 +157,7 @@ body.customer-mobile-body .customer-binding-qr-card img {
|
||||
}
|
||||
|
||||
@media (max-width: 380px) {
|
||||
body.customer-mobile-body .customer-binding-qr-actions,
|
||||
body.customer-mobile-body .customer-binding-modal-actions {
|
||||
body.customer-mobile-body .customer-binding-qr-actions {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,145 @@
|
||||
/** 虎牙客户安全验证样式。 */
|
||||
|
||||
.customer-auth-page.is-huya .customer-binding-stage {
|
||||
gap: 10px;
|
||||
padding: 12px 16px 16px;
|
||||
}
|
||||
|
||||
.customer-auth-page.is-huya .customer-binding-info {
|
||||
gap: 8px;
|
||||
padding: 12px 14px;
|
||||
}
|
||||
|
||||
.customer-auth-page.is-huya .customer-binding-alert {
|
||||
padding: 10px 12px;
|
||||
font-size: 13px;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.customer-auth-page.is-huya .customer-binding-qr-card {
|
||||
gap: 8px;
|
||||
padding: 14px;
|
||||
color: #cbd5e1;
|
||||
border: 1px solid #3a4150;
|
||||
border-radius: 14px;
|
||||
background: #202631;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
|
||||
}
|
||||
|
||||
.customer-huya-qr-heading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 7px;
|
||||
color: #93c5fd;
|
||||
}
|
||||
|
||||
.customer-huya-qr-heading h3 {
|
||||
margin: 0;
|
||||
color: #e2e8f0;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.customer-huya-qr-code {
|
||||
width: min(100%, 228px);
|
||||
aspect-ratio: 1;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 8px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #4a5262;
|
||||
border-radius: 12px;
|
||||
background: #e5e9ee;
|
||||
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.customer-huya-qr-code .ant-image,
|
||||
.customer-huya-qr-code img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.customer-huya-qr-code .customer-auth-qr-placeholder {
|
||||
width: 100%;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
color: #94a3b8;
|
||||
border: 1px dashed #485162;
|
||||
border-radius: 8px;
|
||||
background: #171c24;
|
||||
}
|
||||
|
||||
.customer-huya-qr-code .customer-binding-qr-error {
|
||||
gap: 6px;
|
||||
padding: 16px 10px;
|
||||
}
|
||||
|
||||
.customer-auth-page.is-huya .customer-binding-qr-hint {
|
||||
max-width: 300px;
|
||||
color: #b8c1cf;
|
||||
font-size: 13px;
|
||||
line-height: 1.55;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.customer-auth-page.is-huya .customer-binding-qr-tip {
|
||||
color: #f6c66f;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.customer-huya-qr-meta {
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
color: #8f9aaa;
|
||||
font-size: 12px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.customer-auth-page.is-huya .customer-binding-qr-actions {
|
||||
max-width: 300px;
|
||||
margin-top: 2px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.customer-auth-page.is-huya .customer-binding-qr-actions .ant-btn {
|
||||
height: 38px;
|
||||
color: #e2e8f0;
|
||||
border-color: #465063;
|
||||
border-radius: 9px;
|
||||
background: #2a313d;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.customer-auth-page.is-huya .customer-binding-qr-actions .ant-btn:hover,
|
||||
.customer-auth-page.is-huya .customer-binding-qr-actions .ant-btn:focus-visible {
|
||||
color: #fff;
|
||||
border-color: #657186;
|
||||
background: #343c4a;
|
||||
}
|
||||
|
||||
.customer-auth-page.is-huya .customer-binding-qr-actions .ant-btn:disabled {
|
||||
color: #6f7a8b;
|
||||
border-color: #394353;
|
||||
background: #252c37;
|
||||
}
|
||||
|
||||
.customer-auth-page.is-huya .customer-binding-next.ant-btn {
|
||||
max-width: 300px;
|
||||
height: 46px;
|
||||
margin-top: 0;
|
||||
border-radius: 10px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.customer-huya-steps {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
@@ -67,6 +207,19 @@
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.customer-auth-page.is-huya .customer-binding-stage {
|
||||
gap: 8px;
|
||||
padding: 10px 14px 14px;
|
||||
}
|
||||
|
||||
.customer-auth-page.is-huya .customer-binding-qr-card {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.customer-huya-qr-code {
|
||||
width: min(100%, 214px);
|
||||
}
|
||||
|
||||
.customer-huya-steps {
|
||||
gap: 6px;
|
||||
margin: 10px 16px 0;
|
||||
|
||||
@@ -10,10 +10,13 @@ const source = readFileSync(
|
||||
'utf8',
|
||||
)
|
||||
const styles = readFileSync(join(root, '../src/styles/customer/binding.css'), 'utf8')
|
||||
const huyaStyles = readFileSync(join(root, '../src/styles/customer/platform/huya.css'), 'utf8')
|
||||
|
||||
test('只有唯一绑定决策允许时才自动弹核对框', () => {
|
||||
assert.ok(source.includes('if (!bindingDecision?.canConfirmBinding) return'))
|
||||
assert.ok(source.includes('if (nextDecision?.canConfirmBinding) {'))
|
||||
test('绑定确认只保留页内按钮,不再自动弹窗', () => {
|
||||
assert.ok(!source.includes('customer-binding-modal'))
|
||||
assert.ok(!source.includes('bindingConfirmOpen'))
|
||||
assert.ok(!source.includes('setBindingConfirmOpen'))
|
||||
assert.ok(!source.includes('handlePollBindingNow(true)'))
|
||||
assert.ok(!source.includes("bindingInfo.comparison.verdict === 'match'"))
|
||||
})
|
||||
|
||||
@@ -81,19 +84,39 @@ test('虎牙绑定只在二维码或平台生效等待态轮询,过期二维
|
||||
assert.ok(!pollingSource.includes('bindingActions.has('))
|
||||
})
|
||||
|
||||
test('角色名和区服一致才出现确认绑定,不一致时展示原因', () => {
|
||||
assert.ok(source.includes('确认绑定此角色'))
|
||||
test('角色名和区服一致才显示页内确认按钮,不一致时展示原因', () => {
|
||||
assert.ok(source.includes('确认绑定这个角色到虎牙'))
|
||||
assert.ok(source.includes('canConfirmDecision'))
|
||||
assert.ok(source.includes('两侧角色信息不一致,无法提交平台绑定'))
|
||||
assert.ok(source.includes('customer-binding-modal-error'))
|
||||
assert.ok(source.includes('onClick={() => void handleConfirmBinding()}'))
|
||||
assert.ok(source.includes('{canConfirmDecision ? ('))
|
||||
const confirmBranchStart = source.indexOf('{canConfirmDecision ? (')
|
||||
const confirmBranchEnd = source.indexOf(') : (', confirmBranchStart)
|
||||
const confirmBranch = source.slice(confirmBranchStart, confirmBranchEnd)
|
||||
assert.ok(confirmBranch.includes('确认绑定这个角色到虎牙'))
|
||||
assert.ok(!confirmBranch.includes('刷新绑定二维码'))
|
||||
assert.ok(!confirmBranch.includes('上一步修改资料'))
|
||||
assert.ok(source.includes('平台角色与已填资料不一致'))
|
||||
assert.ok(source.includes('角色名称、区服和平台信息一致后才能确认绑定'))
|
||||
assert.ok(!styles.includes('.customer-binding-modal'))
|
||||
assert.ok(!styles.includes('.customer-binding-compare'))
|
||||
})
|
||||
|
||||
test('二维码区明确只核验角色名与区服,UID 不参与绑定', () => {
|
||||
assert.ok(source.includes('扫码后系统只核对角色名称与区服,UID 不参与绑定判定'))
|
||||
assert.ok(source.includes('游戏角色 UID 为必填留档,不参与绑定判定'))
|
||||
test('虎牙二维码使用深色紧凑卡片并删除重复说明', () => {
|
||||
assert.ok(source.includes('微信扫码绑定'))
|
||||
assert.ok(source.includes('使用微信扫码选择目标游戏角色'))
|
||||
assert.ok(source.includes('已扫码,核对角色'))
|
||||
assert.ok(source.includes('customer-huya-qr-code'))
|
||||
assert.ok(!source.includes('扫码后系统只核对角色名称与区服,UID 不参与绑定判定'))
|
||||
assert.ok(!source.includes('游戏角色 UID 为必填留档,不参与绑定判定'))
|
||||
assert.ok(!source.includes('本次换绑成功后,下次可换绑'))
|
||||
assert.ok(huyaStyles.includes('.customer-auth-page.is-huya .customer-binding-qr-card'))
|
||||
assert.ok(huyaStyles.includes('.customer-huya-qr-code'))
|
||||
assert.ok(huyaStyles.includes('background: #202631'))
|
||||
assert.ok(source.includes('本次待确认角色'))
|
||||
assert.ok(source.includes('登录账号'))
|
||||
assert.ok(source.includes('当前绑定角色'))
|
||||
assert.ok(source.includes('(bindingAccountName || currentRoleName || pendingRoleName)'))
|
||||
assert.ok(source.includes('!bindingQrVisible'))
|
||||
assert.ok(!source.includes('虎牙账号 UID'))
|
||||
assert.ok(!source.includes('目标角色 UID'))
|
||||
assert.ok(!source.includes('待确认角色 UID'))
|
||||
|
||||
@@ -34,17 +34,17 @@ test('客户履约页必须覆盖 body 320px 最小宽度并使用 480px 移动
|
||||
)
|
||||
})
|
||||
|
||||
test('客户履约页固定宽度弹窗必须收进手机视口', async () => {
|
||||
test('虎牙验证弹窗必须收进手机视口', async () => {
|
||||
const [page, huya, css] = await Promise.all([
|
||||
readFile(source('pages/customer-fulfillment/CustomerFulfillmentPage.tsx'), 'utf8'),
|
||||
readFile(source('pages/customer-fulfillment/HuyaChallengeModal.tsx'), 'utf8'),
|
||||
readFile(source('styles/customer/mobile.css'), 'utf8'),
|
||||
])
|
||||
|
||||
assert.match(page, /className="customer-binding-modal"/)
|
||||
assert.ok(!page.includes('customer-binding-modal'))
|
||||
assert.match(huya, /className="customer-huya-challenge-modal"/)
|
||||
assert.match(
|
||||
css,
|
||||
/\.customer-binding-modal,\s*\.customer-huya-challenge-modal\s*\{[^}]*width:\s*calc\(100vw - 24px\)\s*!important/s,
|
||||
/\.customer-huya-challenge-modal\s*\{[^}]*width:\s*calc\(100vw - 24px\)\s*!important/s,
|
||||
)
|
||||
})
|
||||
|
||||
@@ -335,6 +335,8 @@ gameOpenId
|
||||
6. 没有真实平台 UID 时不得伪造,也不得声称已经拿到平台角色 UID。
|
||||
7. 平台数值 UID 可以在后台展示和留档,但不得改变角色名、区服决定的绑定结果。
|
||||
8. 客户绑定页只展示登录账号名称、当前角色名和必要的待确认角色名,不展示任何账号或角色 UID 值。
|
||||
9. 第一步提交的角色名、区服和平台是唯一目标;验证一致时只显示页内
|
||||
「确认绑定这个角色到虎牙」,不再弹核对弹窗,任一不一致时不显示确认按钮。
|
||||
|
||||
只读审计命令:
|
||||
|
||||
@@ -431,7 +433,7 @@ gameRoleStr
|
||||
|
||||
| 版本 | 日期 | 变更 |
|
||||
| --- | --- | --- |
|
||||
| 1.3 | 2026-11-20 | 客户绑定页移除虎牙账号 UID、目标角色 UID、平台角色 UID 和待确认角色 UID 展示,仅保留账号名称、角色名与区服 |
|
||||
| 1.3 | 2026-11-20 | 客户绑定页改用深色紧凑二维码卡片并移除全部 UID 展示;取消确认弹窗,仅在第一资料与平台角色名、区服、平台一致时显示页内确认按钮 |
|
||||
| 1.2 | 2026-11-20 | 客户游戏角色 UID 恢复为必填资料,但只校验非空;UID 格式、真实值和平台数值 UID 均不参与绑定核验 |
|
||||
| 1.1 | 2026-11-20 | 业务核验规则收口为角色名和平台区服;客户游戏角色 UID 改为可选留档,平台数值角色 UID 只作可选观测,均不参与绑定门禁 |
|
||||
| 1.0 | 2026-11-20 | 建立文档;完整解析虎牙绑定 WUP/TAF;确认 `roleId` 为不透明 token、`gameSerial` 和 `extendInfo` 为空;修正 `changeBindTime` 为下一次可换绑时间;确认腾讯侧存在 `gameRoleStr` 角色接口但本 HAR 未调用 |
|
||||
|
||||
+10
-7
@@ -3,7 +3,7 @@ type: 权威架构与实施计划
|
||||
description: 订单、内部 SKU、履约路由、履约执行、商品、成本与财务的唯一权威口径及重构计划。
|
||||
tags: [订单, 内部SKU, 履约, 商品, 成本, 财务, 迁移]
|
||||
status: authoritative
|
||||
version: 2.35
|
||||
version: 2.36
|
||||
updated_at: 2026-11-20
|
||||
---
|
||||
|
||||
@@ -328,11 +328,13 @@ manual fulfillment
|
||||
`gameRole.extendInfo` 中明确的数值角色 UID 时,可分别保存到 `platform_game_role_uid` /
|
||||
`pending_platform_game_role_uid` 供展示和排障,同样不参与绑定门禁。当前实际响应可能不返回独立
|
||||
数值 UID,页面不得由加密 token、账号 UID 或客户 UID 互相回填;
|
||||
⑤ 客户确认前必须通过 outer/inner 双路查询得到本次 pending 角色;确认绑定必须先呈现 pending 角色,
|
||||
自动判定固定只比较角色名与平台区服,客户明确提交后才调用 `confirmBindActAccount`,写后回查
|
||||
current 角色与 pending 的角色名、区服和 role token 一致才能进入 `binding_status = confirmed`。
|
||||
确认请求必须携带页面已核对的角色名、role token 与渠道快照,Connector 发现 pending 已变化时
|
||||
拒绝写入;轮询和二维码刷新不得自动提交平台写操作。
|
||||
⑤ 客户确认前必须通过 outer/inner 双路查询得到本次 pending 角色;第一步提交的角色名、区服和平台
|
||||
是唯一目标资料,自动判定只比较这三项对应的角色名与平台区服。三项一致时,页面直接展示唯一主操作
|
||||
「确认绑定这个角色到虎牙」,不得再弹出二次核对弹窗;任一项不一致时不得展示确认绑定按钮,只能
|
||||
重新扫码换绑或修改资料。客户明确点击后才调用 `confirmBindActAccount`,写后回查 current 角色与
|
||||
pending 的角色名、区服和 role token 一致才能进入 `binding_status = confirmed`。确认请求必须携带
|
||||
页面已核对的角色名、role token 与渠道快照,Connector 发现 pending 已变化时拒绝写入;轮询和二维码
|
||||
刷新不得自动提交平台写操作。
|
||||
- 角色不一致时客户页固定提供两个动作:「重新扫码换绑」和「上一步修改资料」。
|
||||
平台已有旧角色导致首次不一致、扫码绑定后不一致、换绑被虎牙拒绝或未生效时,以重新扫码换绑为主;
|
||||
换绑后仍不一致时以「上一步修改资料」为主。取消「直接使用原角色」的快捷确认:
|
||||
@@ -758,7 +760,8 @@ has_active_cost
|
||||
不校验格式或真实值。
|
||||
- 绑定信息区只展示登录虎牙账号名称、当前平台角色名,以及存在时的待确认角色名;客户页面不得展示
|
||||
虎牙账号 UID、客户填写 UID、平台角色 UID 或待确认角色 UID。自动判定固定只比较角色名与平台区服,
|
||||
角色名和区服一致才允许确认绑定。客户游戏角色 UID、平台可能返回的数值角色 UID 都不参与绑定 verdict,
|
||||
角色名、区服和平台信息一致时,页面只显示「确认绑定这个角色到虎牙」一个主操作,不再使用确认弹窗;
|
||||
任一项不一致时不显示确认按钮。客户游戏角色 UID、平台可能返回的数值角色 UID 都不参与绑定 verdict,
|
||||
也不与虎牙账号 UID 或加密 role token 比较;这些 UID 可在后台留档和排障,不得把加密 role token
|
||||
显示成 UID;
|
||||
不一致时固定显示「重新扫码换绑」「上一步修改资料」,换绑后仍不一致时以修改资料为主。
|
||||
|
||||
Reference in New Issue
Block a user