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.
32 lines
993 B
TypeScript
32 lines
993 B
TypeScript
2 months ago
|
/*
|
||
|
* @Author: donghao donghao@supervision.ltd
|
||
|
* @Date: 2025-03-07 14:57:20
|
||
|
* @LastEditors: donghao donghao@supervision.ltd
|
||
|
* @LastEditTime: 2025-03-07 15:10:10
|
||
|
* @FilePath: \5G-Loading-Bay-Web\mock\deviceStatus.ts
|
||
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||
|
*/
|
||
|
import { MockMethod } from "vite-plugin-mock";
|
||
|
import { deviceStatusListData } from "./pools/deviceStatusData";
|
||
|
import { fetchCurrPageByList } from "./utils/apiMock";
|
||
|
|
||
|
export default [
|
||
|
{
|
||
|
url: "/api/getDeviceStatusList",
|
||
|
method: "post",
|
||
|
response: req => {
|
||
|
const { page, pageSize } = req.body;
|
||
|
// console.log(req);
|
||
|
return {
|
||
|
...fetchCurrPageByList({
|
||
|
...deviceStatusListData,
|
||
|
data: {
|
||
|
...deviceStatusListData.data,
|
||
|
page,
|
||
|
pageSize: pageSize || 10
|
||
|
}
|
||
|
})
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
] as MockMethod[];
|