feat(web): 虎牙设备绑定页多选批量解绑 — rowSelection 跨页保留 + 全选全部 + 批量接口

- routers/huya.py: POST /api/huya/device-bindings/batch-delete (去重/跳过无记录/删画像+指纹目录)
- schemas.py: HuyaDeviceBindingsBatchDeleteRequest
- DeviceBindingsPage: 多选(rowSelection preserve) / 全选全部 / 解绑选中(N) + loading, 刷新后清理失效选中
- api/huya.ts + types.ts: deleteDeviceBindings 与响应类型

验证: 批量解绑逻辑单测 OK; 77 后端单测 OK; tsc + vite build OK
This commit is contained in:
yml2213
2026-08-30 09:55:53 +08:00
parent 22aa485536
commit 054af84144
5 changed files with 123 additions and 3 deletions
+4
View File
@@ -6,6 +6,7 @@ import type {
HuyaAccountItem,
HuyaAccountSummary,
HuyaDeviceBindingListResult,
HuyaDeviceBindingsBatchDeleteResult,
HuyaAutoRegisterBatch,
HuyaAutoRegisterRequest,
HuyaAutoRegisterRetryRequest,
@@ -49,6 +50,9 @@ export const huyaApi = {
/** 解绑: 删除设备画像与 hydevice 指纹状态, 下次登录自动生成全新环境 */
deleteDeviceBinding: (account: string) =>
api.delete<{ ok: boolean; message: string }, { ok: boolean; message: string }>(`/huya/device-bindings/${encodeURIComponent(account)}`),
/** 批量解绑: 一次删除多个账号的设备画像与指纹状态 */
deleteDeviceBindings: (accounts: string[]) =>
api.post<HuyaDeviceBindingsBatchDeleteResult, HuyaDeviceBindingsBatchDeleteResult>('/huya/device-bindings/batch-delete', { accounts }),
importCookies: (text: string, tag: string = '') =>
api.post<HuyaCookieImportResult, HuyaCookieImportResult>('/huya/accounts/import-cookies', { text, tag }),
importPasswordAccounts: (text: string, tag: string = '') =>
+7
View File
@@ -486,6 +486,13 @@ export interface HuyaDeviceBindingListResult {
total: number;
}
export interface HuyaDeviceBindingsBatchDeleteResult {
ok: boolean;
removed: string[];
missing: string[];
message: string;
}
export interface HuyaAccountSummary extends BasicSummary {
password_ready_count: number;
point_count: number;