注册

1.视口

视口: /v/auth/register.json

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

调用方式: public_json

  • 以上参数为信息结构图中用户用户信息,部分信息即可,但username,phonenumber,email必须有一项
  • id为指定注册id,不设置则随机
  • api中除特殊说明与接口说明一致
  • 2.api

    api名称:newregister

    调用:auth.newregister(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":"",
    "hasnext":"yes"//特殊参数
    }
      
  • hasnext为特殊参数,如果是通过验证后才能注册请添加该参数,不需验证时添加hasnext会报错
  • 返回值:

    {
    "id": "b2262ee512fb2c2345acf08143995ccf",
    "islogin": "login",
    "message": "注册成功,已登录",
    "username": "test11",
    "success": true
    }