获取菜单树
开发中
GET
/menus
最后修改时间:2024-01-16 07:26:06
责任人:未设置
请求参数
Header 参数
Authorization
string
必需
示例值:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ7XCJhdXRoZW50aWNhdGVkXCI6dHJ1ZSxcImF1dGhvcml0aWVzXCI6W10sXCJkZXRhaWxzXCI6e1wicmVtb3RlQWRkcmVzc1wiOlwiMDowOjA6MDowOjA6MDoxXCJ9LFwibmFtZVwiOlwiYWRtaW5cIixcInByaW5jaXBhbFwiOntcImFjY291bnROb25FeHBpcmVkXCI6dHJ1ZSxcImFjY291bnROb25Mb2NrZWRcIjp0cnVlLFwiYXZhdGFyXCI6XCJodHRwczovL3BpY2RsLnN1bmJhbmd5YW4uY24vMjAyMy8xMi8xNS9hNmZhOWY4MGExMzc4NjQzZjU5YmZmYWQwM2M2YTAxOC5qcGVnXFxyXFxuXCIsXCJjcmVhdGVCeVwiOlwiQURNSU5cIixcImNyZWF0ZVRpbWVcIjoxNzAyMzc0MDAxMDAwLFwiY3JlZGVudGlhbHNOb25FeHBpcmVkXCI6dHJ1ZSxcImRlbGV0ZWRcIjowLFwiZW1haWxcIjpcIjEyM0BxcS5jb21cIixcImVuYWJsZWRcIjp0cnVlLFwiZ2VuZGVyXCI6MSxcImlkXCI6MixcIm1vYmlsZVwiOlwiMTU1OTIxMSoqKipcIixcIm5pY2tuYW1lXCI6XCLnrqHnkIblkZhcIixcInBhc3N3b3JkXCI6XCIkMmEkMTAkU2o1SXhESldRblFka21RTnZyNUtYLnJvdGR5azVNVW42L3libm9VNC53UTJjemEuZTNrMWVcIixcInBlcm1zXCI6W1wic3lzOnVzZXI6bGlzdFwiLFwic3lzOnVzZXI6ZWRpdFwiLFwic3lzOnVzZXI6YWRkXCIsXCJzeXM6dXNlcjpkZWxldGVcIixcInN5czpyb2xlOmxpc3RcIixcInN5czpyb2xlOmVkaXRcIixcInN5czpyb2xlOmFkZFwiLFwic3lzOnJvbGU6ZGVsZXRlXCIsXCJzeXM6bWVudTpsaXN0XCIsXCJzeXM6bWVudTplZGl0XCJdLFwicm9sZXNcIjpbXCJBRE1JTlwiXSxcInN0YXR1c1wiOjEsXCJ1cGRhdGVCeVwiOlwiQURNSU5cIixcInVwZGF0ZVRpbWVcIjoxNzAyMzc0MDAxMDAwLFwidXNlcm5hbWVcIjpcImFkbWluXCJ9fSIsImV4cCI6MTcwNTYxMDc4MTY0NTB9.fhKo9y1deBDLOH1jJjUQAb_5HfwEhm0SUYqxLS8qEfI
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://192.168.1.110:8082/api/v1/menus' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ7XCJhdXRoZW50aWNhdGVkXCI6dHJ1ZSxcImF1dGhvcml0aWVzXCI6W10sXCJkZXRhaWxzXCI6e1wicmVtb3RlQWRkcmVzc1wiOlwiMDowOjA6MDowOjA6MDoxXCJ9LFwibmFtZVwiOlwiYWRtaW5cIixcInByaW5jaXBhbFwiOntcImFjY291bnROb25FeHBpcmVkXCI6dHJ1ZSxcImFjY291bnROb25Mb2NrZWRcIjp0cnVlLFwiYXZhdGFyXCI6XCJodHRwczovL3BpY2RsLnN1bmJhbmd5YW4uY24vMjAyMy8xMi8xNS9hNmZhOWY4MGExMzc4NjQzZjU5YmZmYWQwM2M2YTAxOC5qcGVnXFxyXFxuXCIsXCJjcmVhdGVCeVwiOlwiQURNSU5cIixcImNyZWF0ZVRpbWVcIjoxNzAyMzc0MDAxMDAwLFwiY3JlZGVudGlhbHNOb25FeHBpcmVkXCI6dHJ1ZSxcImRlbGV0ZWRcIjowLFwiZW1haWxcIjpcIjEyM0BxcS5jb21cIixcImVuYWJsZWRcIjp0cnVlLFwiZ2VuZGVyXCI6MSxcImlkXCI6MixcIm1vYmlsZVwiOlwiMTU1OTIxMSoqKipcIixcIm5pY2tuYW1lXCI6XCLnrqHnkIblkZhcIixcInBhc3N3b3JkXCI6XCIkMmEkMTAkU2o1SXhESldRblFka21RTnZyNUtYLnJvdGR5azVNVW42L3libm9VNC53UTJjemEuZTNrMWVcIixcInBlcm1zXCI6W1wic3lzOnVzZXI6bGlzdFwiLFwic3lzOnVzZXI6ZWRpdFwiLFwic3lzOnVzZXI6YWRkXCIsXCJzeXM6dXNlcjpkZWxldGVcIixcInN5czpyb2xlOmxpc3RcIixcInN5czpyb2xlOmVkaXRcIixcInN5czpyb2xlOmFkZFwiLFwic3lzOnJvbGU6ZGVsZXRlXCIsXCJzeXM6bWVudTpsaXN0XCIsXCJzeXM6bWVudTplZGl0XCJdLFwicm9sZXNcIjpbXCJBRE1JTlwiXSxcInN0YXR1c1wiOjEsXCJ1cGRhdGVCeVwiOlwiQURNSU5cIixcInVwZGF0ZVRpbWVcIjoxNzAyMzc0MDAxMDAwLFwidXNlcm5hbWVcIjpcImFkbWluXCJ9fSIsImV4cCI6MTcwNTYxMDc4MTY0NTB9.fhKo9y1deBDLOH1jJjUQAb_5HfwEhm0SUYqxLS8qEfI'
返回响应
🟢200成功
application/json
Body
code
integer
必需
msg
string
必需
data
array [object {12}]
必需
id
integer
必需
parentId
integer
必需
name
string
必需
type
string
必需
path
string
必需
component
string
必需
icon
string
必需
sort
integer
必需
visible
integer
必需
perm
null
必需
redirect
string | null
必需
children
array [object {12}]
必需
示例
{
"code": 200,
"msg": "一切ok",
"data": [
{
"id": 1,
"parentId": 0,
"name": "系统管理",
"type": "MENU",
"path": "/system",
"component": "Layout",
"icon": "system",
"sort": 1,
"visible": 1,
"perm": null,
"redirect": "/system/user",
"children": [
{
"id": 101,
"parentId": 1,
"name": "用户管理",
"type": "CATALOG",
"path": "/system/user",
"component": "system/user/index",
"icon": "user",
"sort": 1,
"visible": 1,
"perm": null,
"redirect": null,
"children": [
{
"id": 1001,
"parentId": 101,
"name": "查看用户",
"type": "BUTTON",
"path": "GET:/api/v1/users/*",
"component": null,
"icon": "",
"sort": null,
"visible": 1,
"perm": "sys:user:list",
"redirect": null,
"children": null
},
{
"id": 1002,
"parentId": 101,
"name": "编辑用户",
"type": "BUTTON",
"path": "PUT:/api/v1/users/*",
"component": null,
"icon": "",
"sort": null,
"visible": 1,
"perm": "sys:user:edit",
"redirect": null,
"children": null
},
{
"id": 1003,
"parentId": 101,
"name": "新增用户",
"type": "BUTTON",
"path": "POST:/api/v1/users/*",
"component": null,
"icon": "",
"sort": null,
"visible": 1,
"perm": "sys:user:add",
"redirect": null,
"children": null
},
{
"id": 1004,
"parentId": 101,
"name": "删除用户",
"type": "BUTTON",
"path": "DELETE:/api/v1/users/*",
"component": null,
"icon": "",
"sort": null,
"visible": 1,
"perm": "sys:user:delete",
"redirect": null,
"children": null
}
]
},
{
"id": 102,
"parentId": 1,
"name": "角色管理",
"type": "CATALOG",
"path": "/system/role",
"component": "system/role/index",
"icon": "role",
"sort": 1,
"visible": 1,
"perm": null,
"redirect": null,
"children": [
{
"id": 1005,
"parentId": 102,
"name": "查看角色",
"type": "BUTTON",
"path": "GET:/api/v1/roles/*",
"component": null,
"icon": "",
"sort": null,
"visible": 1,
"perm": "sys:role:list",
"redirect": null,
"children": null
},
{
"id": 1006,
"parentId": 102,
"name": "编辑角色",
"type": "BUTTON",
"path": "PUT:/api/v1/roles/*",
"component": null,
"icon": "",
"sort": null,
"visible": 1,
"perm": "sys:role:edit",
"redirect": null,
"children": null
},
{
"id": 1007,
"parentId": 102,
"name": "新增角色",
"type": "BUTTON",
"path": "POST:/api/v1/roles/*",
"component": null,
"icon": "",
"sort": null,
"visible": 1,
"perm": "sys:role:add",
"redirect": null,
"children": null
},
{
"id": 1008,
"parentId": 102,
"name": "删除角色",
"type": "BUTTON",
"path": "DELETE:/api/v1/roles/*",
"component": null,
"icon": "",
"sort": null,
"visible": 1,
"perm": "sys:role:delete",
"redirect": null,
"children": null
}
]
},
{
"id": 103,
"parentId": 1,
"name": "菜单管理",
"type": "CATALOG",
"path": "/system/menu",
"component": "system/menu/index",
"icon": "menu",
"sort": 1,
"visible": 1,
"perm": null,
"redirect": null,
"children": [
{
"id": 1009,
"parentId": 103,
"name": "查看菜单",
"type": "BUTTON",
"path": "GET:/api/v1/menus/*",
"component": null,
"icon": "",
"sort": null,
"visible": 1,
"perm": "sys:menu:list",
"redirect": null,
"children": null
},
{
"id": 1010,
"parentId": 103,
"name": "编辑菜单",
"type": "BUTTON",
"path": "PUT:/api/v1/menus/*",
"component": null,
"icon": "",
"sort": null,
"visible": 1,
"perm": "sys:menu:edit",
"redirect": null,
"children": null
},
{
"id": 1011,
"parentId": 103,
"name": "新增菜单",
"type": "BUTTON",
"path": "POST:/api/v1/menus/*",
"component": null,
"icon": "",
"sort": null,
"visible": 1,
"perm": "sys:menu:add",
"redirect": null,
"children": null
},
{
"id": 1012,
"parentId": 103,
"name": "删除菜单",
"type": "BUTTON",
"path": "DELETE:/api/v1/menus/*",
"component": null,
"icon": "",
"sort": null,
"visible": 1,
"perm": "sys:menu:delete",
"redirect": null,
"children": null
}
]
},
{
"id": 104,
"parentId": 1,
"name": "字典管理",
"type": "CATALOG",
"path": "/system/dict",
"component": "system/dict/index",
"icon": "dict",
"sort": 1,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
},
{
"id": 105,
"parentId": 1,
"name": "通知公告",
"type": "CATALOG",
"path": "/system/notice",
"component": "system/notice/index",
"icon": "message",
"sort": 1,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
}
]
},
{
"id": 2,
"parentId": 0,
"name": "系统监控",
"type": "MENU",
"path": "/monitor",
"component": "Layout",
"icon": "monitor",
"sort": 2,
"visible": 1,
"perm": null,
"redirect": "/monitor/online",
"children": [
{
"id": 106,
"parentId": 2,
"name": "在线用户",
"type": "CATALOG",
"path": "/monitor/online",
"component": "monitor/online/index",
"icon": "online",
"sort": 1,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
},
{
"id": 107,
"parentId": 2,
"name": "数据监控",
"type": "CATALOG",
"path": "/monitor/druid",
"component": "monitor/druid/index",
"icon": "druid",
"sort": 2,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
},
{
"id": 108,
"parentId": 2,
"name": "服务监控",
"type": "CATALOG",
"path": "/monitor/server",
"component": "monitor/server/index",
"icon": "server",
"sort": 3,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
},
{
"id": 109,
"parentId": 2,
"name": "缓存监控",
"type": "CATALOG",
"path": "/monitor/cache",
"component": "monitor/cache/server/index",
"icon": "redis",
"sort": 4,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
},
{
"id": 110,
"parentId": 2,
"name": "缓存列表",
"type": "CATALOG",
"path": "/monitor/cacheList",
"component": "monitor/cache/list/index",
"icon": "redis-list",
"sort": 5,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
}
]
},
{
"id": 3,
"parentId": 0,
"name": "文章管理",
"type": "MENU",
"path": "/article",
"component": "Layout",
"icon": "article",
"sort": 3,
"visible": 1,
"perm": null,
"redirect": "/article/list",
"children": [
{
"id": 111,
"parentId": 3,
"name": "文章列表",
"type": "CATALOG",
"path": "/article/articleList",
"component": "article/list/index",
"icon": "article-list",
"sort": 4,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
},
{
"id": 112,
"parentId": 3,
"name": "发布文章",
"type": "CATALOG",
"path": "/article/addArticle",
"component": "article/index",
"icon": "add-article",
"sort": 4,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
},
{
"id": 113,
"parentId": 3,
"name": "标签管理",
"type": "CATALOG",
"path": "/article/tag",
"component": "article/tag/index",
"icon": "tag",
"sort": 4,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
},
{
"id": 114,
"parentId": 3,
"name": "分类管理",
"type": "CATALOG",
"path": "/article/category",
"component": "article/category/index",
"icon": "category",
"sort": 4,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
}
]
},
{
"id": 4,
"parentId": 0,
"name": "日志管理",
"type": "MENU",
"path": "/notice",
"component": "Layout",
"icon": "log",
"sort": 4,
"visible": 1,
"perm": null,
"redirect": "/log/operlog",
"children": [
{
"id": 115,
"parentId": 4,
"name": "操作日志",
"type": "CATALOG",
"path": "/monitor/operlog",
"component": "monitor/log/operlog",
"icon": "form",
"sort": 1,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
},
{
"id": 116,
"parentId": 4,
"name": "登录日志",
"type": "CATALOG",
"path": "/monitor/logininfor",
"component": "monitor/log/logininfor",
"icon": "logininfor",
"sort": 2,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
}
]
},
{
"id": 5,
"parentId": 0,
"name": "测试图标",
"type": "MENU",
"path": "/test",
"component": "Layout",
"icon": "test",
"sort": 5,
"visible": 1,
"perm": null,
"redirect": null,
"children": [
{
"id": 117,
"parentId": 5,
"name": "测试",
"type": "CATALOG",
"path": "/test/2",
"component": "test/2/index",
"icon": "",
"sort": 1,
"visible": 1,
"perm": null,
"redirect": null,
"children": []
}
]
}
]
}
修改于 2024-01-16 07:26:06