实现虎牙充值商品列表与支付二维码

This commit is contained in:
yml2213
2026-07-04 23:48:53 +08:00
parent fa0d49ff8c
commit 5513b5a313
12 changed files with 1209 additions and 61 deletions
+2
View File
@@ -4,6 +4,7 @@ import type {
HuyaConfig,
HuyaCookieImportResult,
HuyaGoodsItem,
HuyaRechargeGoodsItem,
HuyaTaskBatchRequest,
HuyaTaskBatchResult,
HuyaTaskItem,
@@ -23,6 +24,7 @@ export const huyaApi = {
getConfig: () => api.get<HuyaConfig, HuyaConfig>('/huya/config'),
updateConfig: (data: Partial<HuyaConfig>) => api.put<HuyaConfig, HuyaConfig>('/huya/config', data),
listGoods: () => api.get<HuyaGoodsItem[], HuyaGoodsItem[]>('/huya/goods'),
listRechargeGoods: () => api.get<HuyaRechargeGoodsItem[], HuyaRechargeGoodsItem[]>('/huya/recharge-goods'),
createTasks: (data: HuyaTaskBatchRequest) =>
api.post<HuyaTaskBatchResult, HuyaTaskBatchResult>('/huya/tasks/batch', data),
listTasks: (batchId?: string) =>
+16
View File
@@ -183,6 +183,22 @@ export interface HuyaGoodsItem {
updated_at: string | null;
}
export interface HuyaRechargeGoodsItem {
id: number;
spu_id: string;
sku_id: string;
name: string;
price: number | null;
stock: number | null;
buy_limit: number | null;
icon: string;
description: string;
task_id: string;
task_name: string;
raw: Record<string, unknown> | null;
updated_at: string | null;
}
// ==================== Proxy ====================
export interface ProxyConfig {