提交 | 用户 | 时间
|
fd2207
|
1 |
import request from '@/utils/request' |
懒 |
2 |
|
|
3 |
// 查询菜单列表 |
|
4 |
export function listMenu(query) { |
|
5 |
return request({ |
|
6 |
url: '/system/menu/list', |
|
7 |
method: 'get', |
|
8 |
params: query |
|
9 |
}) |
|
10 |
} |
|
11 |
|
|
12 |
// 查询菜单详细 |
|
13 |
export function getMenu(menuId) { |
|
14 |
return request({ |
|
15 |
url: '/system/menu/' + menuId, |
|
16 |
method: 'get' |
|
17 |
}) |
|
18 |
} |
|
19 |
|
|
20 |
// 查询菜单下拉树结构 |
|
21 |
export function treeselect() { |
|
22 |
return request({ |
|
23 |
url: '/system/menu/treeselect', |
|
24 |
method: 'get' |
|
25 |
}) |
|
26 |
} |
|
27 |
|
|
28 |
// 根据角色ID查询菜单下拉树结构 |
|
29 |
export function roleMenuTreeselect(roleId) { |
|
30 |
return request({ |
|
31 |
url: '/system/menu/roleMenuTreeselect/' + roleId, |
|
32 |
method: 'get' |
|
33 |
}) |
|
34 |
} |
|
35 |
|
|
36 |
// 新增菜单 |
|
37 |
export function addMenu(data) { |
|
38 |
return request({ |
|
39 |
url: '/system/menu', |
|
40 |
method: 'post', |
|
41 |
data: data |
|
42 |
}) |
|
43 |
} |
|
44 |
|
|
45 |
// 修改菜单 |
|
46 |
export function updateMenu(data) { |
|
47 |
return request({ |
|
48 |
url: '/system/menu', |
|
49 |
method: 'put', |
|
50 |
data: data |
|
51 |
}) |
|
52 |
} |
|
53 |
|
|
54 |
// 删除菜单 |
|
55 |
export function delMenu(menuId) { |
|
56 |
return request({ |
|
57 |
url: '/system/menu/' + menuId, |
|
58 |
method: 'delete' |
|
59 |
}) |
|
60 |
} |