Skip to content

用户

获取用户信息

  • 参数说明

url: /co/user

method: get

return(json):

字段说明备注
er错误码0 表示未出错
avatar头像
id用户 ID
code登录名
name昵称
date注册时间
drop有效时间
email邮箱
phone联系电话
  • 请求示例
java
//axios请求:
 {
 	 url:"/co/user"
     method:"get"
 }

//返回数据:
{
    "avatar":"1-1708325722631.png",
    "code":"Admin",
    "date":"2029-01-01 12:00:00",
    "drop":"2100-11-16 0:00:00",
    "email":"163@qq.com",
    "er":0,
    "id":1,
    "name":"Admin",
    "phone":"18130022005"
}
//axios请求:
 {
 	 url:"/co/user"
     method:"get"
 }

//返回数据:
{
    "avatar":"1-1708325722631.png",
    "code":"Admin",
    "date":"2029-01-01 12:00:00",
    "drop":"2100-11-16 0:00:00",
    "email":"163@qq.com",
    "er":0,
    "id":1,
    "name":"Admin",
    "phone":"18130022005"
}

修改密码

  • 参数说明

url: /co/user/pswd

method: put

body(json):

字段说明类型是否必填
oldPswd旧密码String
newPswd新密码String

return(json):

字段说明备注
er错误码0 表示未出错
msg错误信息无错误信息表示未出错
  • 请求示例
java
//axios请求:
 {
 	 url:"/co/user/pswd"
     method:"put",
     body:{
        "oldPswd":"s+l/beC+/uE=",
        "newPswd":"+BgAkMr6NNg="
    }
 }

//返回数据:
{
    "er": 0
}
//axios请求:
 {
 	 url:"/co/user/pswd"
     method:"put",
     body:{
        "oldPswd":"s+l/beC+/uE=",
        "newPswd":"+BgAkMr6NNg="
    }
 }

//返回数据:
{
    "er": 0
}

获取头像

  • 参数说明

url: co/user/avatar

method: get

return(文件流):

  • 请求示例
java
//axios请求:
 {
 	 url:"co/user/avatar"
     method:"get"
 }

//axios请求:
 {
 	 url:"co/user/avatar"
     method:"get"
 }

设置头像

  • 参数说明

url: co/user/avatar

method: post

body(multipart/form-data):

字段说明类型是否必填
file头像文件file

return(json):

字段说明备注
er错误码0 表示未出错
msg错误信息无错误信息表示未出错
  • 请求示例
java
//axios请求:
 {
 	 url:"co/user/avatar"
     method:"post",
     params:{
        "file":file
        }
 }

//返回数据:
{
	"er": 0,
}
//axios请求:
 {
 	 url:"co/user/avatar"
     method:"post",
     params:{
        "file":file
        }
 }

//返回数据:
{
	"er": 0,
}

重置头像

  • 参数说明

url: co/user/avatar

method: delete

return(json):

字段说明备注
er错误码0 表示未出错
msg错误信息无错误信息表示未出错
  • 请求示例
java
//axios请求:
 {
 	 url:"co/user/avatar"
     method:"delete",
 }

//返回数据:
{
	"er": 0,
}
//axios请求:
 {
 	 url:"co/user/avatar"
     method:"delete",
 }

//返回数据:
{
	"er": 0,
}

获取用户列表

  • 参数说明

url: co/user/list

method: get

字段说明类型是否必填
search关键字String
pageSize每页条数int
page第几页int

return(json):

字段说明备注
er错误码0 表示未出错
  • 请求示例
java
//axios请求:
 {
 	 url:"co/user/list"
     method:"get"
 }

//返回数据:
{
	"er": 0,
    "data":[]
}
//axios请求:
 {
 	 url:"co/user/list"
     method:"get"
 }

//返回数据:
{
	"er": 0,
    "data":[]
}

获取组织机构树

  • 参数说明

url: co/orgn

method: get

字段说明类型是否必填
type类型(-1 所有部门;0 是顶级部门)int
search关键字String

return(json):

字段说明备注
er错误码0 表示未出错
data数据集
id机构 id
code编码
name名称
note备注
type
slug
  • 请求示例
java
//axios请求:
 {
 	 url:"/co/orgn"
     method:"get"
     params:
        {
        "type":-1
        ,"search":""
        }
 }

//返回数据:
{
    "data":[
        {
        "code":"",
        "id":1,
        "name":"苍穹数码技术股份有限公司",
        "note":"",
        "slug":"",
        "type":0
        }
    ],
    "er":0
}
//axios请求:
 {
 	 url:"/co/orgn"
     method:"get"
     params:
        {
        "type":-1
        ,"search":""
        }
 }

//返回数据:
{
    "data":[
        {
        "code":"",
        "id":1,
        "name":"苍穹数码技术股份有限公司",
        "note":"",
        "slug":"",
        "type":0
        }
    ],
    "er":0
}

获取组织机构人员

  • 参数说明

url: co/orgn/user

method: get

字段说明类型是否必填
orgnId组织机构 idint

return(json):

字段说明备注
er错误码0 表示未出错
data数据集
id用户 id
code登录账号
name昵称
  • 请求示例
java
//axios请求:
 {
 	 url:"/co/orgn/user"
     method:"get"
     params:
        {
        "orgId":1
        }
 }

//返回数据:
{
    "data":[
        {
        "code":"Administrator",
        "id":6,
        "name":"Administrator"
        },
        {
        "code":"xurui",
        "id":29,
        "name":"xurui"
        },
        {
        "code":"xurui2",
        "id":46,
        "name":"xurui1"
        }
    ],
    "er":0
}
//axios请求:
 {
 	 url:"/co/orgn/user"
     method:"get"
     params:
        {
        "orgId":1
        }
 }

//返回数据:
{
    "data":[
        {
        "code":"Administrator",
        "id":6,
        "name":"Administrator"
        },
        {
        "code":"xurui",
        "id":29,
        "name":"xurui"
        },
        {
        "code":"xurui2",
        "id":46,
        "name":"xurui1"
        }
    ],
    "er":0
}

Powerd by Vitepress.