feat(web): 新增『虎牙设备绑定』管理页 — 一号一环境可视化

后端 (/huya/device-bindings):
- GET: 三方合并列表 (设备画像 + hydevice 指纹状态 + 账号表登录渠道)
  标识脱敏展示 (fingerprint/guid32 只留前12位)
- DELETE: 解绑 = 删除画像 + hydevice 状态 → 下次登录自动生成全新环境重新注册
前端:
- HuyaDeviceBindingsPage: 汇总卡片(绑定数/指纹状态/入库账号) + 明细表
  (机型/屏幕/CDID40/GUID32/Hebe/hydevice状态/登录渠道/最后登录) + 解绑重绑
- 路由 /huya/device-bindings + 菜单『设备绑定』(账号管理之下)
This commit is contained in:
yml2213
2026-08-29 16:39:30 +08:00
parent bf6dee1850
commit fda3d5257b
6 changed files with 243 additions and 0 deletions
+7
View File
@@ -5,6 +5,7 @@ import type {
AccountBulkTagRequest,
HuyaAccountItem,
HuyaAccountSummary,
HuyaDeviceBindingListResult,
HuyaAutoRegisterBatch,
HuyaAutoRegisterRequest,
HuyaAutoRegisterRetryRequest,
@@ -42,6 +43,12 @@ export const huyaApi = {
listAccountsPaged: (params: PageParams & { assigned_only?: boolean; tag?: string; has_cookie?: boolean; include_cookie?: boolean }) =>
api.get<PaginatedResponse<HuyaAccountItem>, PaginatedResponse<HuyaAccountItem>>('/huya/accounts', { params }),
accountsSummary: () => api.get<HuyaAccountSummary, HuyaAccountSummary>('/huya/accounts/summary'),
/** 设备绑定: 账号 ↔ 环境列表 (画像+指纹状态+账号表合并) */
listDeviceBindings: () =>
api.get<HuyaDeviceBindingListResult, HuyaDeviceBindingListResult>('/huya/device-bindings'),
/** 解绑: 删除设备画像与 hydevice 指纹状态, 下次登录自动生成全新环境 */
deleteDeviceBinding: (account: string) =>
api.delete<{ ok: boolean; message: string }, { ok: boolean; message: string }>(`/huya/device-bindings/${encodeURIComponent(account)}`),
importCookies: (text: string, tag: string = '') =>
api.post<HuyaCookieImportResult, HuyaCookieImportResult>('/huya/accounts/import-cookies', { text, tag }),
importPasswordAccounts: (text: string, tag: string = '') =>
+23
View File
@@ -463,6 +463,29 @@ export interface HuyaAccountItem {
updated_at: string | null;
}
/** 账号 ↔ 设备环境绑定 (一号一环境, 后端 data/huya_device_profiles.json + huya_fp_states) */
export interface HuyaDeviceBindingItem {
account: string;
vendor: string;
model: string;
screen: string;
fingerprint_masked: string;
guid32_masked: string;
hebe_count: number;
hdid32: string;
has_hydevice_state: boolean;
login_channel: string;
account_status: string;
bound_at: number | null;
last_login_at: number | null;
last_login_ok: boolean | null;
}
export interface HuyaDeviceBindingListResult {
items: HuyaDeviceBindingItem[];
total: number;
}
export interface HuyaAccountSummary extends BasicSummary {
password_ready_count: number;
point_count: number;