修复 lewan 换绑:旧号被 CT 回收时自动新取号出链

退号失败(含权限不足)不再卡住换绑,默认跳过并重新取号生成绑链;
CT 错误返回补充账号/vn 诊断信息,避免误判为后台角色权限问题。
This commit is contained in:
yml2213
2026-07-11 12:13:07 +08:00
parent 792680bd19
commit b0c77e5842
10 changed files with 750 additions and 61 deletions
@@ -94,16 +94,21 @@ async function prepareBinding(
task: TaskRow,
options: FulfillmentActionOptions = {},
): Promise<FulfillmentActionResult> {
// 后台/显式 force:旧号可被 CT 回收,忽略退号失败并取新号+新绑链
const force =
options.force === true ||
String(options.source || '').includes('admin_')
const result = await prepareKuaishouCloudFulfillmentTask(task, {
source: options.source || 'executor_prepare_binding',
actor: options.actor,
force: options.force === true,
force,
})
return {
task: result.task || task,
claimUrl: result.claimUrl,
token: result.token,
flow: result.flow,
previousVnRelease: (result as { previousVnRelease?: string }).previousVnRelease,
}
}