简要描述:
- 获取权限勾选列表
请求域名:
- http://xx.com
请求URL:
xx.com/business/{公众号id}/admin/getAuthList
参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
department_id | 否 | int | 部门id,默认为0,与职员id二选1 |
staff_id | 否 | int | 职员id,默认为0,与部门id二选1 |
is_leader | 否 | int | 0部门成员权限 1部门主管权限 默认为0 |
返回示例:
正确时返回:
{
"result": 1,
"msg": "成功",
"data": {
"auth_list": {
"admin": [
{
"name": "设置",
"route": "settingInformation",
"can": 1,
"child": [
{
"name": "企业信息",
"route": "editBussiness",
"can": 0,
"child": []
},
{
"name": "企业微信设置",
"route": "businessSetQyInformation",
"can": 1,
"child": [
{
"name": "企业微信设置",
"route": "businessQyWxSetting",
"can": 0,
"child": []
}
]
}
]
},
{
"name": "部门管理",
"route": "departmentIndex",
"can": 0,
"child": [
{
"name": "企业微信部门同步",
"route": "refreshDepartmentList",
"can": 0,
"child": []
},
{
"name": "获取部门列表",
"route": "getDepatmemtList",
"can": 1,
"child": []
},
{
"name": "全部门管理(创建部门)",
"route": "createAllDepartment",
"can": 0,
"child": []
},
{
"name": "子部门管理(创建部门)",
"route": "createSubDepartment",
"can": 0,
"child": []
},
{
"name": "全部门管理(编辑部门)",
"route": "updateAllDepartment",
"can": 0,
"child": []
},
{
"name": "全部门管理(删除部门)",
"route": "deleteAllDepartment",
"can": 0,
"child": []
},
{
"name": "子部门管理(删除部门)",
"route": "deleteSubDepartment",
"can": 0,
"child": []
},
{
"name": "推送部门到企业微信",
"route": "pushDepartment",
"can": 0,
"child": []
}
]
},
{
"name": "员工管理",
"route": "staffIndex",
"can": 1,
"child": [
{
"name": "获取员工列表",
"route": "getStaffList",
"can": 0,
"child": []
},
{
"name": "同步企业微信员工",
"route": "refreshStaffList",
"can": 0,
"child": []
},
{
"name": "推送员工信息到企业微信",
"route": "pushStaff",
"can": 0,
"child": []
},
{
"name": "设置部门领导",
"route": "setDepartmentLeader",
"can": 0,
"child": []
},
{
"name": "创建员工",
"route": "createStaff",
"can": 1,
"child": []
},
{
"name": "编辑员工",
"route": "updateStaff",
"can": 0,
"child": []
},
{
"name": "禁用员工",
"route": "deleteStaff",
"can": 0,
"child": []
}
]
}
]
},
"tab_list": [
{
"key": "admin",
"name": "基础权限"
}
],
"right_type":0,
}
}
错误时返回:
{
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
名称 | 类型 | 说明 |
tab_list[].key | string | 分组key |
tab_list[].name | string | 分组名称 |
auth_list | object | 权限勾选列表,根据tab_list里的key进行分组 |
auth_list[].name | string | 路由或者页面名称 |
auth_list[].route | string | 接口路由或页面路由 |
auth_list[].can | string | 是否允许访问 |
auth_list[].child | arr | 下级路由列表 |
right_type | int | 0部门权限 1个人权限,获取部门权限时固定为0 |