##列表
~~~[api]
get:admin/structures
<<<
success
{
"code": 200,
"data": {},
"error": ""
}
<<<
error
~~~
##详情
~~~[api]
get:admin/structures/:id
<<<
success
{
"code": 200,
"data": {
"id": 10,
"name": "", //部门名称
"pid": 0, //父id,默认0
"status": 1 //状态,1启用,0禁用
},
"error": ""
}
<<<
error
~~~
##添加
~~~[api]
post:admin/structures
*name#名称
*int:pid#父id,默认0
*int:status#状态,1启用,0禁用
<<<
success
{
"code": 200,
"data": "添加成功",
"error": ""
}
<<<
error
~~~
##编辑
~~~[api]
PUT:admin/structures/:id
name#名称
int:pid#父id,默认0
int:status#状态,1启用,0禁用
<<<
success
{
"code": 200,
"data": "编辑成功",
"error": ""
}
<<<
error
~~~
##删除
~~~[api]
DELETE:admin/structures/:id
<<<
success
{
"code": 200,
"data": "删除成功",
"error": ""
}
<<<
error
~~~
##批量删除
~~~[api]
post:admin/structures/deletes
*array:ids#ID组
<<<
success
{
"code": 200,
"data": "删除成功",
"error": ""
}
<<<
error
~~~
##批量修改状态
~~~[api]
post:admin/structures/enables
*array:ids#ID组
*int:status#状态(0禁用、1启用)
<<<
success
{
"code": 200,
"data": "操作成功",
"error": ""
}
<<<
error
~~~