perf(douyu): 优化自动化中心运行总览加载
This commit is contained in:
@@ -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: (
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user