mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
5.0
This commit is contained in:
@@ -1,27 +1,62 @@
|
||||
// 模拟后端动态生成路由
|
||||
import { defineFakeRoute } from "vite-plugin-fake-server/client";
|
||||
|
||||
/**
|
||||
* 服务管理
|
||||
*/
|
||||
const apiRouter = {
|
||||
path: "/serve",
|
||||
meta: {
|
||||
title: "服务管理",
|
||||
icon: "ri:server-line",
|
||||
rank: 10
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/serve/api/index",
|
||||
name: "ApiManage",
|
||||
meta: {
|
||||
title: "接口管理",
|
||||
roles: ["admin"]
|
||||
const apiRouters = [
|
||||
{
|
||||
path: "/serve",
|
||||
meta: {
|
||||
title: "服务管理",
|
||||
icon: "ri:server-line",
|
||||
rank: 10
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/serve/api/index",
|
||||
name: "ApiManage",
|
||||
meta: {
|
||||
title: "接口管理",
|
||||
roles: ["admin"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/isv",
|
||||
meta: {
|
||||
title: "ISV管理",
|
||||
icon: "ri:shield-user-line",
|
||||
rank: 10
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/isv/list/index",
|
||||
name: "IsvManage",
|
||||
meta: {
|
||||
title: "ISV列表",
|
||||
roles: ["admin"]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/sys",
|
||||
meta: {
|
||||
title: "系统管理",
|
||||
icon: "ri:settings-2-line",
|
||||
rank: 10
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/admin/user/index",
|
||||
name: "AdminUser",
|
||||
meta: {
|
||||
title: "用户管理",
|
||||
roles: ["admin"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
export default defineFakeRoute([
|
||||
{
|
||||
@@ -30,7 +65,7 @@ export default defineFakeRoute([
|
||||
response: () => {
|
||||
return {
|
||||
success: true,
|
||||
data: [apiRouter]
|
||||
data: apiRouters
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user