fix(douyu): 升级工作台任务流并修正换绑冷却

This commit is contained in:
yml
2026-11-22 23:39:02 +08:00
parent 4b57f9b2a7
commit 8e01c3c69e
9 changed files with 343 additions and 113 deletions
+12 -2
View File
@@ -71,9 +71,19 @@ export const douyuApi = {
listPeaceGoods: () => api.get<DouyuXpdGoodsItem[], DouyuXpdGoodsItem[]>('/douyu/xpd-goods'),
createTasks: (data: DouyuTaskBatchRequest) =>
api.post<DouyuTaskBatchResult, DouyuTaskBatchResult>('/douyu/tasks/batch', data),
listTasks: (handbookScope: 'elite' | 'esports' | 'peace', batchId?: string) =>
listTasks: (
handbookScope: 'elite' | 'esports' | 'peace',
batchId?: string,
workbenchOnly = false,
pageSize = 100,
) =>
api.get<DouyuTaskItem[], DouyuTaskItem[]>('/douyu/tasks', {
params: { handbook_scope: handbookScope, ...(batchId ? { batch_id: batchId } : {}) },
params: {
handbook_scope: handbookScope,
...(batchId ? { batch_id: batchId } : {}),
...(workbenchOnly ? { workbench_only: true } : {}),
page_size: pageSize,
},
}),
listWorkbenchAccounts: (handbookScope: 'elite' | 'esports' | 'peace') =>
api.get<{ account_ids: number[]; configured: boolean }, { account_ids: number[]; configured: boolean }>('/douyu/workbench-accounts', {