返回平台所有树形菜单集合
开发中
GET
/admin/menu/tree
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Query 参数
menuType
string
可选
parentId
string
父级id
menuName
string
菜单名字
Header 参数
Authorization
string
必需
示例值:
Bearer 61ceacb7-5901-48e7-8ea0-b4780aefdd11
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://devapi.maicanbao.com/admin/menu/tree?menuType&parentId&menuName' \
--header 'Authorization: Bearer 61ceacb7-5901-48e7-8ea0-b4780aefdd11'
返回响应
🟢200成功
application/json
Body
code
integer
必需
msg
null
必需
data
array [object {12}]
必需
id
string
菜单id
parentId
string
父级id
weight
integer
排序值
name
string
菜单名字
title
string
菜单标题
path
string
前端路由标识路径
component
null
前端组件
meta
object
适配 vue3
sortOrder
integer
排序值
menuType
string
必需
permission
null
菜单权限标识
children
array [object {11}]
子菜单
ok
boolean
必需
示例
{ "code": 0, "msg": null, "data": [ { "id": "2000", "parentId": "-1", "weight": 1, "name": "router.systemManagement", "path": "/admin", "componentPath": null, "meta": { "isLink": "", "isIframe": null, "isKeepAlive": false, "icon": "iconfont icon-quanjushezhi_o", "isAffix": false, "title": "router.systemManagement", "isHide": false }, "sortOrder": 1, "menuType": "0", "permission": null, "children": [ { "id": "1000", "parentId": "2000", "weight": 0, "name": "router.permissionManagement", "path": "/system", "componentPath": null, "meta": { "isLink": "", "isIframe": false, "isKeepAlive": false, "icon": "iconfont icon-icon-", "isAffix": false, "title": "router.permissionManagement", "isHide": false }, "sortOrder": 0, "menuType": "0", "permission": null, "children": [ { "id": "1100", "parentId": "1000", "weight": 1, "name": "router.userManagement", "path": "/admin/system/user/index", "componentPath": null, "meta": { "isLink": "", "isIframe": false, "isKeepAlive": false, "icon": "ele-User", "isAffix": false, "title": "router.userManagement", "isHide": false }, "sortOrder": 1, "menuType": "0", "permission": null }, { "id": "1200", "parentId": "1000", "weight": 2, "name": "router.menuManagement", "path": "/admin/system/menu/index", "componentPath": null, "meta": { "isLink": "", "isIframe": false, "isKeepAlive": false, "icon": "iconfont icon-caidan", "isAffix": false, "title": "router.menuManagement", "isHide": false }, "sortOrder": 2, "menuType": "0", "permission": null }, { "id": "1300", "parentId": "1000", "weight": 3, "name": "router.roleManagement", "path": "/admin/system/role/index", "componentPath": null, "meta": { "isLink": "", "isIframe": null, "isKeepAlive": false, "icon": "iconfont icon-gerenzhongxin", "isAffix": false, "title": "router.roleManagement", "isHide": false }, "sortOrder": 3, "menuType": "0", "permission": null }, { "id": "1400", "parentId": "1000", "weight": 4, "name": "router.departmentManagement", "path": "/admin/system/dept/index", "componentPath": null, "meta": { "isLink": "", "isIframe": null, "isKeepAlive": false, "icon": "iconfont icon-zidingyibuju", "isAffix": false, "title": "router.depar