简要描述:

  • 获取员工列表

请求域名:

  • http://xx.com

请求URL:

xx.com/business/{公众号id}/admin/getStaffList

参数:

参数名 是否必须 类型 说明
department_id int 部门id
sub_page int 0分页 1不分页
get_leader int 是否获取领导列表 1获取 0或不传为不获取
kwd string 手机号或姓名,模糊查询
id int 员工id
status int 0未关联 1=已激活,2=已禁用,4=未激活,5=退出企业

返回示例:

正确时返回:

{
    "result": 1,
    "msg": "成功",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 21,
                "uid": 0,
                "name": "孙新建",
                "mobile": "15000245941",
                "position": "",
                "gender_desc": "男",
                "status": 1,
                "disabled": 0,
                "premission": {
                    "setAuth": 1,
                    "updateStaff": 1,
                    "deleteStaff": 1
                },
                "has_one_member": null
            },
            {
                "id": 22,
                "uid": 0,
                "name": "韦平",
                "mobile": "17620161217",
                "position": "",
                "gender_desc": "男",
                "status": 1,
                "disabled": 0,
                "premission": {
                    "setAuth": 1,
                    "updateStaff": 1,
                    "deleteStaff": 1
                },
                "has_one_member": null
            },
            {
                "id": 23,
                "uid": 0,
                "name": "莫秋宁",
                "mobile": "17675761991",
                "position": "",
                "gender_desc": "女",
                "status": 1,
                "disabled": 0,
                "premission": {
                    "setAuth": 1,
                    "updateStaff": 1,
                    "deleteStaff": 1
                },
                "has_one_member": null
            },
            {
                "id": 24,
                "uid": 76,
                "name": "Joy",
                "mobile": "",
                "position": "",
                "gender_desc": "女",
                "status": 1,
                "disabled": 0,
                "premission": {
                    "setAuth": 1,
                    "updateStaff": 1,
                    "deleteStaff": 1
                },
                "has_one_member": {
                    "uid": 76,
                    "avatar": "http://zouye.yunzmall.com/static/upload/newimage/ce24a55c19fe22357373de37b95d9172.png",
                    "nickname": "cps_6S6SZ3FK_555",
                    "realname": "",
                    "avatar_image": "http://zouye.yunzmall.com/static/upload/newimage/ce24a55c19fe22357373de37b95d9172.png",
                    "username": "cps_6S6SZ3FK_555"
                }
            },
            {
                "id": 25,
                "uid": 11,
                "name": "柏丽芬",
                "mobile": "15219025049",
                "position": "",
                "gender_desc": "女",
                "status": 1,
                "disabled": 0,
                "premission": {
                    "setAuth": 1,
                    "updateStaff": 1,
                    "deleteStaff": 1
                },
                "has_one_member": {
                    "uid": 11,
                    "avatar": "http://dev3.yunzshop.com/addons/yun_shop/static/images/photo-mr.jpg",
                    "nickname": "15219025049",
                    "realname": "",
                    "avatar_image": "https://dev3.yunzshop.com/addons/yun_shop/static/images/photo-mr.jpg",
                    "username": "15219025049"
                }
            }
        ],
        "first_page_url": "http://zouye.yunzmall.com/business/1/admin/getStaffList?page=1",
        "from": 1,
        "last_page": 3,
        "last_page_url": "http://zouye.yunzmall.com/business/1/admin/getStaffList?page=3",
        "next_page_url": "http://zouye.yunzmall.com/business/1/admin/getStaffList?page=2",
        "path": "http://zouye.yunzmall.com/business/1/admin/getStaffList",
        "per_page": 5,
        "prev_page_url": null,
        "to": 5,
        "total": 13,
        "leader_list": {
            "21": {
                "id": 21,
                "uid": 0,
                "name": "孙新建",
                "mobile": "15000245941",
                "position": "",
                "gender_desc": "男",
                "status": 1,
                "disabled": 0,
                "premission": {
                    "setAuth": 1,
                    "updateStaff": 1,
                    "deleteStaff": 1
                },
                "has_one_member": null
            },
            "22": {
                "id": 22,
                "uid": 0,
                "name": "韦平",
                "mobile": "17620161217",
                "position": "",
                "gender_desc": "男",
                "status": 1,
                "disabled": 0,
                "premission": {
                    "setAuth": 1,
                    "updateStaff": 1,
                    "deleteStaff": 1
                },
                "has_one_member": null
            }
        },
        "premission": {
            "createStaff": 1
        }
    }
}

错误时返回:

  {
  }

返回参数说明:

参数名 类型 说明
名称 类型 说明
data.premission.createStaff int 是否有创建员工的权限
data.data[].id int 员工id
data.data[].uid int 会员id,为0则是没有绑定商城会员
data.data[].name string 员工姓名
data.data[].mobile string 手机号
data.data[].position string 职位
data.data[].gender_desc string 性别
data.data[].status int 员工状态
data.data[].disabled int 是否被禁用 0正常 1禁用
data.data[].gender_desc string 性别
data.data[].premission.setAuth int 是否可以设置成员权限 0不允许 1允许
data.data[].premission.updateStaff int 是否可以编辑成员 0不允许 1允许
data.data[].premission.deleteStaff int 是否可以禁用成员 0不允许 1允许
data.data[].has_one_member object 会员信息
data.leader_list object 主管列表,只有请求值get_leader为正数时返回