You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
General-AI-Platform-Web-Client/mock/alarm.ts

33 lines
824 B
TypeScript

/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-01-17 13:54:43
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-04-16 09:29:01
* @FilePath: \General-AI-Platform-Web-Client\mock\alarm.ts
* @Description: mock
*/
import { MockMethod } from "vite-plugin-mock";
import { alarmListData } from "./pools/alarmData";
import { fetchCurrPageByList } from "./utils/apiMock";
1 year ago
export default [
{
url: "/getAlarmList",
method: "post",
response: req => {
const { page, pageSize } = req.body;
// console.log(req);
return {
...fetchCurrPageByList({
...alarmListData,
data: {
...alarmListData.data,
page,
pageSize: pageSize || 10
}
})
};
}
}
] as MockMethod[];