获取菜单树列表
GET
/sys_menu/get_menu_tree
请求参数
Header 参数
X-token
string
可选
默认值:
{{X-Token}}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET '/sys_menu/get_menu_tree' \
--header 'X-token: {{X-Token}}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
sys_menu_tree
array [object {21}]
必需
示例
{ "code": 0, "message": "success", "data": { "sys_menu_tree": [ { "menu_id": 2, "route_name": null, "title": "系统管理", "icon": "setting", "path": null, "menu_type": "F", "permission": null, "parent_id": 0, "component": null, "sort": 199, "visible": 1, "is_link": 0, "layout": 1, "cache": 0, "create_by": 1, "update_by": null, "created_at": "2021-08-05 11:36:08", "updated_at": null, "active_menu": null, "children": [ { "menu_id": 5, "route_name": "SysUser", "title": "用户管理", "icon": null, "path": "/admin/sys-user", "menu_type": "P", "permission": "admin:sysuser", "parent_id": 2, "component": "/admin/sys-user/index.vue", "sort": 0, "visible": 1, "is_link": 0, "layout": 1, "cache": 0, "create_by": 1, "update_by": 1, "created_at": "2021-08-05 11:48:47", "updated_at": "2023-12-29 21:59:00", "active_menu": null, "children": [ { "menu_id": 11, "route_name": null, "title": "新增用户", "icon": null, "path": null, "menu_type": "B", "permission": "admin:sysuser:add", "parent_id": 5, "component": null, "sort": 1, "visible": 2, "is_link": 0, "layout": 1, "cache": 0, "create_by": 1, "update_by": null, "created_at": "2021-08-09 13:40:48", "updated_at": null, "active_menu": null, "children": [], "api_list": [ { "id": 16, "title": "添加新用户", "path": "/sys_user", "type": "POST", "created_at": "2021-08-09 13:31:26", "updated_at": null, "create_by": 1, "update_by": null } ] }, { "menu_id": 12, "route_name": null, "title": "修改用户", "icon": null, "path": null, "menu_type": "B", "permission": "admin:sysuser:edit", "parent_id": 5, "component": null, "sort": 2, "visible": 2, "is_link": 0, "layout": 1, "cache": 0, "create_by": 1, "update_by": 1, "created_at": "2021-08-09 13:41:28", "updated_at": "2021-08-09 13:42:24", "active_menu": null, "children": [], "api_list": [ { "id": 18, "title": "修改用户信息", "path": "/sys_user/update_user", "type": "PUT", "created_at": "2021-08-09 13:32:01", "updated_at": null, "create_by": 1, "update_by": null
修改于 2024-01-16 14:04:11