perf(douyu): 优化自动化中心运行总览加载

This commit is contained in:
yml
2026-11-23 06:21:59 +08:00
parent 1e67111715
commit 04e9b1d4c3
11 changed files with 550 additions and 187 deletions
+19 -2
View File
@@ -3,6 +3,7 @@ import type {
DouyuAccountProtectionTarget,
DouyuAccountProtectionTargetUpdate,
DouyuAccountPlatformStatus,
DouyuAccountPlatformSupply,
DouyuPlatformTrendsResponse,
DouyuConfig,
DouyuExchangeResultImage,
@@ -24,10 +25,26 @@ import type {
export const douyuApi = {
taskTypes: () => api.get<Record<string, string>, Record<string, string>>('/douyu/task-types'),
getAccountPlatformStatus: (includeTrends = true) =>
getAccountPlatformStatus: ({
includeTrends = true,
includeSupply = true,
includeDiagnostics = true,
}: {
includeTrends?: boolean;
includeSupply?: boolean;
includeDiagnostics?: boolean;
} = {}) =>
api.get<DouyuAccountPlatformStatus, DouyuAccountPlatformStatus>('/douyu/account-platform-status', {
params: { include_trends: includeTrends },
params: {
include_trends: includeTrends,
include_supply: includeSupply,
include_diagnostics: includeDiagnostics,
},
}),
getAccountPlatformSupply: () =>
api.get<DouyuAccountPlatformSupply, DouyuAccountPlatformSupply>(
'/douyu/account-platform-supply',
),
getAccountPlatformTrends: () =>
api.get<DouyuPlatformTrendsResponse, DouyuPlatformTrendsResponse>('/douyu/account-platform-trends'),
updateAccountProtectionTarget: (
+6
View File
@@ -886,6 +886,12 @@ export interface DouyuPlatformTrendsResponse {
alerts: DouyuPlatformAlert[];
}
export interface DouyuAccountPlatformSupply {
checked_at: string;
supply_targets: DouyuSupplyTargetStatus[];
alerts: DouyuPlatformAlert[];
}
export interface DouyuAccountPlatformStatus {
checked_at: string;
accounts: {