From 3389be85bee3ba5f20cb5fa1026e0e47db740fe8 Mon Sep 17 00:00:00 2001 From: jingna <1264204245@qq.com> Date: Tue, 19 May 2026 09:17:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/platform.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 }