修改
This commit is contained in:
parent
c93af16eee
commit
3389be85be
@ -52,7 +52,13 @@ export async function fetchSystemConfig(): Promise<SystemConfigPayload> {
|
||||
return response.data.data
|
||||
}
|
||||
|
||||
export async function fetchAlarmHistory(params: any): Promise<AlarmEvent[]> {
|
||||
export async function fetchAlarmHistory(pageOrParams: number | any = 1, size = 20): Promise<AlarmEvent[]> {
|
||||
let params: any
|
||||
if (typeof pageOrParams === 'number') {
|
||||
params = { page: pageOrParams, size }
|
||||
} else {
|
||||
params = pageOrParams
|
||||
}
|
||||
const response = await http.get<ApiResponse<AlarmEvent[]>>('/alarm/list', { params })
|
||||
return response.data.data
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user