简要描述
请求url
https://www.商城域名.com/index.php?s=/admin/store.menu/index
请求方式
请求header
参数名 |
类型 |
是否必须 |
示例值 |
说明 |
Access-Token |
string |
必填 |
- |
当前登录用户的 Token |
返回示例
{
"status": 200,
"message": "success",
"data": {
"list": [
{
"menu_id": 10001,
"module": 10,
"name": "首页",
"path": "/index",
"action_mark": "",
"parent_id": 0,
"sort": 100,
"create_time": "2021-03-01 08:00:00",
"update_time": "2021-03-01 08:00:00",
"apiIds": [
10001
],
"menuApi": [
{
"id": 10161,
"menu_id": 10001,
"api_id": 10001,
"create_time": "2021-03-01 08:00:00"
}
]
},
{
"menu_id": 10002,
"module": 10,
"name": "管理员",
"path": "/manage",
"action_mark": "",
"parent_id": 0,
"sort": 105,
"create_time": "2021-03-01 08:00:00",
"update_time": "2021-03-01 08:00:00",
"apiIds": [
10005,
10003,
10002
],
"children": [
{
"menu_id": 10003,
"module": 10,
"name": "管理员列表",
"path": "/manage/user/index",
"action_mark": "",
"parent_id": 10002,
"sort": 100,
"create_time": "2021-03-01 08:00:00",
"update_time": "2021-03-01 08:00:00",
"apiIds": [
10004,
10003,
10002
],
"children": [
{
"menu_id": 10005,
"module": 20,
"name": "新增",
"path": "",
"action_mark": "add",
"parent_id": 10003,
"sort": 100,
"create_time": "2021-03-01 08:00:00",
"update_time": "2021-03-01 08:00:00",
"apiIds": [
10005,
10003,
10002
],
"menuApi": [
{
"id": 10127,
"menu_id": 10005,
"api_id": 10005,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10128,
"menu_id": 10005,
"api_id": 10003,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10129,
"menu_id": 10005,
"api_id": 10002,
"create_time": "2021-03-01 08:00:00"
}
]
},
{
"menu_id": 10006,
"module": 20,
"name": "编辑",
"path": "",
"action_mark": "edit",
"parent_id": 10003,
"sort": 100,
"create_time": "2021-03-01 08:00:00",
"update_time": "2021-03-01 08:00:00",
"apiIds": [
10006,
10003,
10002
],
"menuApi": [
{
"id": 10133,
"menu_id": 10006,
"api_id": 10006,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10134,
"menu_id": 10006,
"api_id": 10003,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10135,
"menu_id": 10006,
"api_id": 10002,
"create_time": "2021-03-01 08:00:00"
}
]
},
{
"menu_id": 10008,
"module": 20,
"name": "删除",
"path": "",
"action_mark": "delete",
"parent_id": 10003,
"sort": 100,
"create_time": "2021-03-01 08:00:00",
"update_time": "2021-03-01 08:00:00",
"apiIds": [
10007,
10003,
10002
],
"menuApi": [
{
"id": 10130,
"menu_id": 10008,
"api_id": 10007,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10131,
"menu_id": 10008,
"api_id": 10003,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10132,
"menu_id": 10008,
"api_id": 10002,
"create_time": "2021-03-01 08:00:00"
}
]
}
],
"menuApi": [
{
"id": 10124,
"menu_id": 10003,
"api_id": 10004,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10125,
"menu_id": 10003,
"api_id": 10003,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10126,
"menu_id": 10003,
"api_id": 10002,
"create_time": "2021-03-01 08:00:00"
}
]
},
{
"menu_id": 10004,
"module": 10,
"name": "角色管理",
"path": "/manage/role/index",
"action_mark": "",
"parent_id": 10002,
"sort": 100,
"create_time": "2021-03-01 08:00:00",
"update_time": "2021-03-01 08:00:00",
"apiIds": [
10009,
11005,
11004,
10008,
10002
],
"children": [
{
"menu_id": 10009,
"module": 20,
"name": "新增",
"path": "",
"action_mark": "add",
"parent_id": 10004,
"sort": 100,
"create_time": "2021-03-01 08:00:00",
"update_time": "2021-03-01 08:00:00",
"apiIds": [
10010,
11006,
10008,
10002
],
"menuApi": [
{
"id": 10153,
"menu_id": 10009,
"api_id": 10010,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10154,
"menu_id": 10009,
"api_id": 11006,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10155,
"menu_id": 10009,
"api_id": 10008,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10156,
"menu_id": 10009,
"api_id": 10002,
"create_time": "2021-03-01 08:00:00"
}
]
},
{
"menu_id": 10010,
"module": 20,
"name": "编辑",
"path": "",
"action_mark": "edit",
"parent_id": 10004,
"sort": 100,
"create_time": "2021-03-01 08:00:00",
"update_time": "2021-03-01 08:00:00",
"apiIds": [
10011,
11006,
10008,
10002
],
"menuApi": [
{
"id": 10157,
"menu_id": 10010,
"api_id": 10011,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10158,
"menu_id": 10010,
"api_id": 11006,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10159,
"menu_id": 10010,
"api_id": 10008,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10160,
"menu_id": 10010,
"api_id": 10002,
"create_time": "2021-03-01 08:00:00"
}
]
},
{
"menu_id": 10011,
"module": 20,
"name": "删除",
"path": "",
"action_mark": "delete",
"parent_id": 10004,
"sort": 100,
"create_time": "2021-03-01 08:00:00",
"update_time": "2021-03-01 08:00:00",
"apiIds": [
10012,
10008,
10002
],
"menuApi": [
{
"id": 10142,
"menu_id": 10011,
"api_id": 10012,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10143,
"menu_id": 10011,
"api_id": 10008,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10144,
"menu_id": 10011,
"api_id": 10002,
"create_time": "2021-03-01 08:00:00"
}
]
}
],
"menuApi": [
{
"id": 10148,
"menu_id": 10004,
"api_id": 10009,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10149,
"menu_id": 10004,
"api_id": 11005,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10150,
"menu_id": 10004,
"api_id": 11004,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10151,
"menu_id": 10004,
"api_id": 10008,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10152,
"menu_id": 10004,
"api_id": 10002,
"create_time": "2021-03-01 08:00:00"
}
]
}
],
"menuApi": [
{
"id": 10112,
"menu_id": 10002,
"api_id": 10005,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10113,
"menu_id": 10002,
"api_id": 10003,
"create_time": "2021-03-01 08:00:00"
},
{
"id": 10114,
"menu_id": 10002,
"api_id": 10002,
"create_time": "2021-03-01 08:00:00"
}
]
}
]
}
}
返回参数
参数名 |
类型 |
示例值 |
说明 |
status |
int |
200 |
请求状态(200:请求成功;500:请求错误/失败) |
message |
string |
success |
请求结果的信息,默认为 success |
data |
object |
- |
返回的业务数据 |
data 参数
参数名 |
类型 |
示例值 |
说明 |
list |
array |
- |
列表数据 |
data.list 参数
参数名 |
类型 |
示例值 |
说明 |
menu_id |
int |
10001 |
菜单ID |
module |
int |
10 |
模块类型 (10菜单 20操作) |
name |
string |
首页 |
菜单名称 |
path |
string |
/index |
菜单路径 (唯一) |
action_mark |
number |
- |
操作标识 |
parent_id |
int |
0 |
上级菜单ID |
sort |
int |
100 |
排序 (数字越小越靠前) |
create_time |
string |
2021-03-01 08:00:00 |
创建时间 |
update_time |
string |
2021-03-01 08:00:00 |
更新时间 |
apiIds |
array |
- |
该菜单所有API的ID集 |
menuApi |
array |
- |
该菜单所有API记录 |
data.list.menuApi 参数
参数名 |
类型 |
示例值 |
说明 |
id |
int |
10161 |
ID |
menu_id |
int |
10001 |
菜单ID |
api_id |
int |
10001 |
APIID |
create_time |
string |
2021-03-01 08:00:00 |
创建时间 |