feat(douyu): 新增和平小店查询模块(绑定角色/商品列表/点券余额)

- activity_client: getIframeUrl 签发 code/sig,道聚城 getrole.out/recommend/balance 接口
  (2026-08 起需 isCode=1 + authType=delegate + sAnchorId 才能通过 Livelink 校验)
- 迁移 0016: accounts xpd_* 字段、douyu_config 小店配置(actAlias/actId/rid)、
  douyu_xpd_goods_snapshot 商品快照表
- runner/service/router/schema 注册 query_xpd_role/refresh_xpd_goods/query_xpd_balance
  三个任务,任务结果剥离 role.raw 防 openid 泄露
- 前端: 和平小店路由/菜单/DouyuTasksPage 三态/商品下拉/配置弹窗
This commit is contained in:
yml2213
2026-08-06 17:23:59 +08:00
parent f8de495029
commit fdc74eba8c
12 changed files with 702 additions and 25 deletions
+2
View File
@@ -6,6 +6,7 @@ import type {
DouyuTaskBatchRequest,
DouyuTaskBatchResult,
DouyuTaskItem,
DouyuXpdGoodsItem,
MessageResponse,
PageParams,
PaginatedResponse,
@@ -21,6 +22,7 @@ export const douyuApi = {
updateConfig: (data: Partial<DouyuConfig>) => api.put<DouyuConfig, DouyuConfig>('/douyu/config', data),
listGoods: () => api.get<DouyuGoodsItem[], DouyuGoodsItem[]>('/douyu/goods'),
listEsportsGoods: () => api.get<DouyuGoodsItem[], DouyuGoodsItem[]>('/douyu/esports-goods'),
listPeaceGoods: () => api.get<DouyuXpdGoodsItem[], DouyuXpdGoodsItem[]>('/douyu/xpd-goods'),
createTasks: (data: DouyuTaskBatchRequest) =>
api.post<DouyuTaskBatchResult, DouyuTaskBatchResult>('/douyu/tasks/batch', data),
listTasks: (batchId?: string) =>
+17
View File
@@ -227,6 +227,13 @@ export interface DouyuTaskAccountItem {
esports_bind_status: string;
esports_change_role_wait_time: number | null;
esports_can_change_time: number | null;
xpd_game_name: string;
xpd_openid: string;
xpd_role_id: string;
xpd_plat_id: number | null;
xpd_area_id: number | null;
xpd_balance: number | null;
xpd_bind_status: string;
assigned_to: number | null;
assigned_username: string | null;
}
@@ -246,6 +253,9 @@ export interface DouyuConfig {
esports_chicken_skin_id: string;
esports_firework_gift_id: string;
esports_firework_skin_id: string;
xpd_act_alias: string;
xpd_act_id: string;
xpd_rid: string;
gold_pay_type: number;
gift_id: string;
skin_id: string;
@@ -291,6 +301,13 @@ export interface DouyuGoodsItem {
updated_at: string | null;
}
export interface DouyuXpdGoodsItem extends DouyuGoodsItem {
price: number | null;
org_price: number | null;
category: string;
goods_left: number | null;
}
// ==================== Huya ====================
export interface HuyaAccountItem {