创建新用户(管理员用)

1.视口

视口: /v/auth/cadmincreateuser.json

参数:username,phonenumber,email,password,desc,nickname,gender,province,city,year,birthday,idcardnum,address,telephone,country,relatedid,relatedid2,otherinfo,role,id

调用方式: public_json

  • 以上参数为信息结构图中用户用户信息,部分信息即可,但username,phonenumber,email必须有一项
  • 可以通过接口指定role,但不能为admin,需要设置用户角色为admin 只能通过api,请在明确各权限确认之后再设置
  • id为指定注册id,不设置则随机
  • api中除特殊说明与接口说明一致
  • 2.api

    api名称:createuser

    调用:auth.createuser(req,res,param);

    参数:param

    param为对象,包含以下部分

    {
    "username":"",
    "phonenumber":"",
    "email":"",
    "password":"",
    "role":"",//可以为数组或字符串,多个角色请务必使用数组!
    "desc":"",
    "nickname":"",
    "gender":"",
    "province":"",
    "city":"",
    "year":"",
    "birthday":"",
    "idcardnum":"",
    "address":"",
    "telephone":"",
    "country":"",
    "relatedid":"",
    "relatedid2":"",
    "otherinfo":"",
    "id":""
    }
      

    返回值:

    {
    "success": true,
    "message": "创建用户成功!"
    }