[TOC]
## 用户组列表
~~~[api]
post:/usergroup/list
string:key#排序字段名 如 id, name
string:order#排序规则
*int:page#页码
*int:limit#每页数量
string:title#名字筛选
int:state#状态筛选
<<<
success
{
"code": 0,
"info": "成功",
"data": [{
"id": 1,
"start_time": "9",
"end_time": "22",
"title": "总经理",
"state": 1,
"user_count": 0
}]
}
<<<
error
~~~
## 添加用户组
~~~[api]
post:/usergroup/add
*string:title#名称
*start_time#开始时间 格式8
*end_time#结束时间 格式22
<<<
success
{
"code": 0,
"info": "成功",
"data": {
"title": "经理3",
"start_time": "8",
"end_time": "20",
"id": "1"
}
}
<<<
error
~~~
## 编辑用户组
~~~[api]
post:/usergroup/edit
*string:id#ID
*string:state#状态
*string:title#名称
*start_time#开始时间 格式8
*end_time#结束时间 格式22
<<<
success
{
"code": 0,
"info": "成功",
"data": {
"title": "经理3",
"start_time": "8",
"end_time": "20",
"id": "1"
}
}
<<<
error
~~~
## 用户组成员列表
~~~[api]
post:/usergroup/user
*string:id=默认值#用户组ID
<<<
success
{
"code": 0,
"info": "成功",
"data": [{
"id": 1,
"title": "总经理",
"state": 1,
"users": [{
"id": 999,
"name": "王伟",
"state": 1,
"user_group_id": 0,
"group_title": null,
"checked": false
}, {
"id": 1001,
"name": "王伟",
"state": 1,
"user_group_id": 1,
"group_title": "总经理",
"checked": true
}]
}, {
"id": 2,
"title": "经理",
"state": 1,
"users": [{
"id": 1000,
"name": "老板",
"state": 1,
"user_group_id": 0,
"group_title": null,
"checked": false
}]
}, {
"id": 3,
"title": "店长",
"state": 1,
"users": []
}]
}
<<<
error
~~~
## 用户组成员修改提交
~~~[api]
post:/usergroup/useredit
*int:id=默认值#用户组ID
*array:user_id#用户id数组
<<<
success
{
"code": 0,
"info": "成功",
"data":[]
}
<<<
error
~~~