- 添加菜单权限控制
- url 权限控制
This commit is contained in:
21
admin-web/mock/admin.js
Normal file
21
admin-web/mock/admin.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import adminMenu from './geographic/admin-menu.json';
|
||||
import adminMenuAll from './geographic/admin-menu-all.json';
|
||||
import adminUrls from './geographic/admin-urls';
|
||||
|
||||
/* eslint-disable */
|
||||
function getAdminMenu(req, res) {
|
||||
return res.json(adminMenu);
|
||||
}
|
||||
|
||||
function getAdminMenuAll(req, res) {
|
||||
return res.json(adminMenuAll);
|
||||
}
|
||||
|
||||
function getAdminUrls(req, res) {
|
||||
return res.json(adminUrls);
|
||||
}
|
||||
|
||||
export default {
|
||||
'GET /admin-api/admin/resource/admin_menu_tree': getAdminMenuAll,
|
||||
'GET /admin-api/admin/resource/admin_url_list': getAdminUrls,
|
||||
};
|
||||
5
admin-web/mock/geographic/admin-menu-all.json
Normal file
5
admin-web/mock/geographic/admin-menu-all.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 0,
|
||||
"message": "",
|
||||
"data": "all"
|
||||
}
|
||||
26
admin-web/mock/geographic/admin-menu.json
Normal file
26
admin-web/mock/geographic/admin-menu.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"code": 0,
|
||||
"message": "",
|
||||
"data": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"handler": "/order/list1",
|
||||
"id": 1,
|
||||
"name": "商品管理1",
|
||||
"pid": 1
|
||||
},
|
||||
{
|
||||
"handler": "/order/list2",
|
||||
"id": 1,
|
||||
"name": "商品管理2",
|
||||
"pid": 1
|
||||
}
|
||||
],
|
||||
"handler": "/home",
|
||||
"id": 1,
|
||||
"name": "商品管理",
|
||||
"pid": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
5
admin-web/mock/geographic/admin-urls.json
Normal file
5
admin-web/mock/geographic/admin-urls.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 0,
|
||||
"data": ["/admin/source/add", "/admin/source/delete"],
|
||||
"message": "string"
|
||||
}
|
||||
Reference in New Issue
Block a user