/*
 * @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[];