Files
ClassContent/历届学生/18课程/class18_2/项目/上课项目/管理后台/笔记.txt
2024-09-27 02:06:13 +08:00

54 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

管理后台权限控制:
用户登录的时候,后端接口返回给你权限数组
addRoutes
1:根据登录返回的权限数组 生成 左侧菜单
2:根据登录返回的权限数组 生成 路由配置
{
status: 200,
result: {
token: "WER2345465RTRGESEGRDHTGWFEWRGDTHY534T3",
jurisdiction: [
{
id: 1,
name: "用户管理",
icon: "icon-wedd",
path: "/user",
children: [
{
name: "用户列表",
icon: "icon-wedd",
path: "/list",
},
{
name: "用户统计",
icon: "icon-wedd",
path: "/tongji",
}
]
},
{
id: 1,
name: "产品管理",
icon: "icon-wedd",
path: "/product",
children: [
{
name: "产品列表",
icon: "icon-wedd",
path: "/list",
},
{
name: "产品统计",
icon: "icon-wedd",
path: "/tongji",
}
]
}
]
}
}