修复(半自动履约): 虎牙UID改为必填不校验

This commit is contained in:
yml
2026-11-20 17:08:07 +08:00
parent f4806fb758
commit 132a281a3e
9 changed files with 103 additions and 73 deletions
@@ -116,10 +116,11 @@ export default function CustomerFulfillmentPage({
),
)
const isWeibo = selectedTask?.platform === 'weibo'
// 虎牙流程:填写资料(区服/角色名,UID 可选)→ 登录 → 绑定角色。
// 虎牙流程:填写资料(区服/UID/角色名)→ 登录 → 绑定角色。
// 资料齐全前不生成绑定二维码,避免客户在资料缺失时先绑错角色。
const profileComplete = Boolean(
String(selectedTask?.customerServerZone || '').trim() &&
String(selectedTask?.customerGameRoleId || '').trim() &&
String(selectedTask?.customerGameRoleName || '').trim(),
)
@@ -930,18 +931,14 @@ export default function CustomerFulfillmentPage({
async function handleSaveProfile() {
if (!selectedTask) return
if (!profileServerZone.trim() || !profileRoleName.trim()) {
message.warning('请完整填写区服和角色名')
if (!profileServerZone.trim() || !profileRoleId.trim() || !profileRoleName.trim()) {
message.warning('请完整填写区服、游戏角色 UID 和角色名')
return
}
if (!SERVER_ZONE_OPTIONS.includes(profileServerZone.trim())) {
message.warning('请选择区服')
return
}
if (profileRoleId.trim() && !/^\d+$/.test(profileRoleId.trim())) {
message.warning('游戏角色 UID 只能是数字')
return
}
setProfileSaving(true)
try {
const response = await saveCustomerTaskProfile(orderNo, selectedTask.id, {
@@ -1220,7 +1217,7 @@ export default function CustomerFulfillmentPage({
<p>
{profileComplete
? '修改目标角色资料后会重新核对虎牙账号当前绑定角色;角色名与区服一致后才能确认绑定。'
: '第一步:请填写区服和角色名。游戏角色 UID 为选填资料,不参与绑定核验。'}
: '第一步:请填写区服、游戏角色 UID 和角色名。UID 只做资料留档,不参与绑定核验。'}
</p>
<div className="customer-profile-form">
<label className="customer-collect-label">
@@ -1234,12 +1231,14 @@ export default function CustomerFulfillmentPage({
placeholder="请选择区服"
options={SERVER_ZONE_OPTIONS.map((value) => ({ value, label: value }))}
/>
<label className="customer-collect-label">游戏角色 UID(选填)</label>
<label className="customer-collect-label">
游戏角色 UID <span>*</span>
</label>
<Input
className="customer-collect-input"
value={profileRoleId}
onChange={(event) => setProfileRoleId(event.target.value)}
placeholder="选填,仅用于订单资料留档"
placeholder="请输入游戏角色 UID,仅作资料留档"
maxLength={64}
inputMode="numeric"
/>
@@ -1587,7 +1586,7 @@ export default function CustomerFulfillmentPage({
<strong>{currentRoleName || '未识别到角色'}</strong>
</div>
<div>
<span>目标角色 UID(选填)</span>
<span>目标角色 UID</span>
<strong>{targetRoleUid || '未填写'}</strong>
</div>
{pendingRoleName ? (
@@ -2005,7 +2004,7 @@ export default function CustomerFulfillmentPage({
>
<Space direction="vertical" size={14} style={{ width: '100%' }}>
<p style={{ margin: 0 }}>
请核对角色名称与区服。游戏角色 UID 为选填留档,不参与绑定判定。
请核对角色名称与区服。游戏角色 UID 为必填留档,不参与绑定判定。
</p>
<div className="customer-binding-compare">
<div className="customer-binding-compare-side">
@@ -2016,7 +2015,7 @@ export default function CustomerFulfillmentPage({
</Button>
</div>
<strong>{bindingComparison?.customerRoleName || '未填写'}</strong>
<em>{bindingComparison?.customerRoleId || '未填写游戏角色 UID(不影响绑定)'}</em>
<em>{bindingComparison?.customerRoleId || '未填写游戏角色 UID'}</em>
</div>
<div className="customer-binding-compare-side">
<div className="customer-binding-compare-head">