diff --git a/frontend/src/api/platform.ts b/frontend/src/api/platform.ts index ac3d2de..9e99c7f 100644 --- a/frontend/src/api/platform.ts +++ b/frontend/src/api/platform.ts @@ -52,7 +52,13 @@ export async function fetchSystemConfig(): Promise { return response.data.data } -export async function fetchAlarmHistory(params: any): Promise { +export async function fetchAlarmHistory(pageOrParams: number | any = 1, size = 20): Promise { + let params: any + if (typeof pageOrParams === 'number') { + params = { page: pageOrParams, size } + } else { + params = pageOrParams + } const response = await http.get>('/alarm/list', { params }) return response.data.data }