mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2026-01-20 16:53:37 +08:00
fix: 根据角色返回不同数据,权限管理
This commit is contained in:
@@ -42,11 +42,18 @@ export default [
|
||||
{
|
||||
url: "/getAsyncRoutes",
|
||||
method: "get",
|
||||
response: () => {
|
||||
return {
|
||||
code: 0,
|
||||
info: systemRouter,
|
||||
};
|
||||
response: ({ query }) => {
|
||||
if (query.name === "admin") {
|
||||
return {
|
||||
code: 0,
|
||||
info: systemRouter,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
code: 0,
|
||||
info: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
] as MockMethod[];
|
||||
|
||||
Reference in New Issue
Block a user