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.
44 lines
999 B
TypeScript
44 lines
999 B
TypeScript
import { MockMethod } from "vite-plugin-mock";
|
|
import { serverListData } from "./pools/serverListData";
|
|
import { modelListData } from "./pools/modelListData";
|
|
import { fetchCurrPageByList } from "./utils/apiMock";
|
|
|
|
export default [
|
|
{
|
|
url: "/getServerBoxList",
|
|
method: "post",
|
|
response: req => {
|
|
const { page, pageSize } = req.body;
|
|
// console.log(req);
|
|
return {
|
|
...fetchCurrPageByList({
|
|
...serverListData,
|
|
data: {
|
|
...serverListData.data,
|
|
page,
|
|
pageSize: pageSize || 10
|
|
}
|
|
})
|
|
};
|
|
}
|
|
},
|
|
{
|
|
url: "/getModelBoxList",
|
|
method: "post",
|
|
response: req => {
|
|
const { page, pageSize } = req.body;
|
|
// console.log(req);
|
|
return {
|
|
...fetchCurrPageByList({
|
|
...modelListData,
|
|
data: {
|
|
...modelListData.data,
|
|
page,
|
|
pageSize: pageSize || 10
|
|
}
|
|
})
|
|
};
|
|
}
|
|
}
|
|
] as MockMethod[];
|