重构(斗鱼绑定): 统一角色候选判定与精英宝典查询

This commit is contained in:
yml
2026-11-26 09:14:38 +08:00
parent 244b556800
commit 91e4f5d33a
7 changed files with 470 additions and 175 deletions
@@ -1744,8 +1744,18 @@ export default function DouyuTasksPage({ handbook }: { handbook: HandbookKind })
}
const accountId = qrTask.account_id;
const taskId = qrTask.id;
const expectedRole = qrRoleName.trim();
closeQrTask(taskId);
void startTask(isXpdBindTask ? 'confirm_xpd_bind' : 'confirm_bind', [accountId]);
void startTask(
isXpdBindTask ? 'confirm_xpd_bind' : 'confirm_bind',
[accountId],
expectedRole
? {
expected_role_name: expectedRole,
expected_role_required: true,
}
: {},
);
};
const queryQrRole = () => {
@@ -3400,6 +3410,14 @@ export default function DouyuTasksPage({ handbook }: { handbook: HandbookKind })
{qrRoleName}
</Tag>
{qrRoleLine && <Text type="secondary">{qrRoleLine}</Text>}
{qrCurrentRoleName && qrCurrentRoleName !== qrRoleName ? (
<Text type="secondary">
当前绑定:{qrCurrentRoleName}
{qrCurrentPlatName || qrCurrentAreaName
? `(${[qrCurrentPlatName, qrCurrentAreaName].filter(Boolean).join(' - ')})`
: ''}
</Text>
) : null}
</>
) : qrCurrentRoleName ? (
<>