##列表
~~~[api]
get:admin/rules
type#若type为tree,则返回树状结构
<<<
success
{
"code": 200,
"data": {},
"error": ""
}
<<<
error
~~~
##详情
~~~[api]
get:admin/rules/:id
<<<
success
{
"code": 200,
"data": {
"id": 10,
"title": "系统基础功能", //名称
"name": "admin", //规则
"level": 1, //类别 1模块,2控制器,3操作
"pid": 0, //父id,默认0
"status": 1 //状态,1启用,0禁用
},
"error": ""
}
<<<
error
~~~
##添加
~~~[api]
post:admin/rules
*title#名称
*name#规则
*int:level#类别 1模块,2控制器,3操作
*int:pid#父id,默认0
*int:status#状态,1启用,0禁用
<<<
success
{
"code": 200,
"data": "添加成功",
"error": ""
}
<<<
error
~~~
##编辑
~~~[api]
PUT:admin/rules/:id
title#名称
name#规则
int:level#类别 1模块,2控制器,3操作
int:pid#父id,默认0
int:status#状态,1启用,0禁用
<<<
success
{
"code": 200,
"data": "编辑成功",
"error": ""
}
<<<
error
~~~
##删除
~~~[api]
DELETE:admin/rules/:id
<<<
success
{
"code": 200,
"data": "删除成功",
"error": ""
}
<<<
error
~~~
##批量删除
~~~[api]
post:admin/rules/deletes
*array:ids#ID组
<<<
success
{
"code": 200,
"data": "删除成功",
"error": ""
}
<<<
error
~~~
##批量修改
~~~[api]
post:admin/rules/enables
*array:ids#ID组
*int:status#状态(0禁用、1启用)
<<<
success
{
"code": 200,
"data": "操作成功",
"error": ""
}
<<<
error
~~~