切换主题
获取管理员信息和权限菜单
接口URL
http://localhost:8080/admin/getinfo
请求方式
POST
Content-Type
application/x-www-form-urlencoded
请求Header参数
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
token | eyJ...8NA | Text | 是 | 用户token |
成功响应示例
json
{
"code": 1,
"msg": null,
"data": {
"id": 1,
"username": "admin",
"avatar": "https://cqwm2478.oss-cn-beijing.aliyuncs.com/ts.png",
"isSuper": 1,
"role": {
"id": 2,
"name": "超级管理员"
},
"menus": [
{
"id": 5,
"ruleId": 0,
"status": 1,
"createTime": 1565501769,
"updateTime": 1640086271,
"name": "后台面板",
"desc": "index",
"frontpath": null,
"condition": null,
"menu": 1,
"order": 1,
"icon": "help",
"method": "GET",
"child": [
{
"id": 10,
"ruleId": 5,
"status": 1,
"createTime": 1565501822,
"updateTime": 1640089283,
"name": "主控台",
"desc": "index",
"frontpath": "/",
"condition": null,
"menu": 1,
"order": 20,
"icon": "home-filled",
"method": "GET",
"child": null
}
]
},
...
{
"id": 7,
"ruleId": 0,
"status": 1,
"createTime": 1565501800,
"updateTime": 1640086638,
"name": "订单管理",
"desc": "order_order_list",
"frontpath": null,
"condition": null,
"menu": 1,
"order": 4,
"icon": "message-box",
"method": "GET",
"child": [
{
"id": 17,
"ruleId": 7,
"status": 1,
"createTime": 1577511896,
"updateTime": 1640089346,
"name": "评论管理",
"desc": "shop_comment_list",
"frontpath": "/comment/list",
"condition": "",
"menu": 1,
"order": 20,
"icon": "comment",
"method": "GET",
"child": null
},
{
"id": 18,
"ruleId": 7,
"status": 1,
"createTime": 1577511942,
"updateTime": 1640089382,
"name": "订单管理",
"desc": "order_order_list",
"frontpath": "/order/list",
"condition": "",
"menu": 1,
"order": 1,
"icon": "reading",
"method": "GET",
"child": null
}
]
},
],
"ruleNames": [
"Rule1",
"Rule2",
"Rule3"
]
}
}
错误响应示例
json
{
"code": 0,
"msg": "非法token",
"data": null
}