第一次上传

This commit is contained in:
xxk
2026-06-11 10:31:24 +08:00
commit cfef094568
1523 changed files with 210650 additions and 0 deletions
+125
View File
@@ -0,0 +1,125 @@
import { defineMock } from "./base";
export default defineMock([
{
url: "tenant-plans",
method: ["GET"],
body: {
code: "00000",
data: {
list: [
{
id: "1",
name: "基础版",
code: "BASIC",
status: 1,
sort: 1,
remark: "",
createTime: "2026-03-01 10:00:00",
updateTime: "2026-03-01 10:00:00",
},
{
id: "2",
name: "专业版",
code: "PRO",
status: 1,
sort: 2,
remark: "",
createTime: "2026-03-02 10:00:00",
updateTime: "2026-03-02 10:00:00",
},
],
total: 2,
},
msg: "一切ok",
},
},
{
url: "tenant-plans/options",
method: ["GET"],
body: {
code: "00000",
data: [
{ value: "1", label: "基础版" },
{ value: "2", label: "专业版" },
],
msg: "一切ok",
},
},
{
url: "tenant-plans/:planId/form",
method: ["GET"],
body: ({ params }) => {
const planId = Number(params.planId);
const form =
planId === 2
? {
id: "2",
name: "专业版",
code: "PRO",
status: 1,
sort: 2,
remark: "",
}
: {
id: "1",
name: "基础版",
code: "BASIC",
status: 1,
sort: 1,
remark: "",
};
return {
code: "00000",
data: form,
msg: "一切ok",
};
},
},
{
url: "tenant-plans",
method: ["POST"],
body: {
code: "00000",
data: null,
msg: "一切ok",
},
},
{
url: "tenant-plans/:planId",
method: ["PUT"],
body: {
code: "00000",
data: null,
msg: "一切ok",
},
},
{
url: "tenant-plans/:ids",
method: ["DELETE"],
body: {
code: "00000",
data: null,
msg: "一切ok",
},
},
{
url: "tenant-plans/:planId/menuIds",
method: ["GET"],
body: {
code: "00000",
data: [1, 2, 3, 4, 5, 6],
msg: "一切ok",
},
},
{
url: "tenant-plans/:planId/menus",
method: ["PUT"],
body: {
code: "00000",
data: null,
msg: "一切ok",
},
},
]);