App接口文档实例(md格式)

通用约定

  1. 域名HOST代表xxxxxxx.com
  2. 所有的SALT代表字符串exam.com.cn(加密认证时使用)

目录

账号

  1. 时间同步
  2. 登陆
  3. 注册
  4. 退出
  5. 找回密码(设置密码)
  6. 发送验证码
  7. 验证手机号(包括修改手机号码)

时间同步

https://exam.com/system/get_system_time

post参数

变量名 注释
uuid 设备编号
version 当前版本号

返回值

  • data 服务器系统的时间(13位时间戳)

    example

    {
    "code": 200,
    "msg": "success",
    "data": 1400000000000
    
    }

登陆

https://exam.com.cn/Auth/login

post参数

变量名 注释
username 用户名
time 服务器系统时间戳(10位时间 + 3位随机数)
key sha1(username + md5(password) + time + SALT)
uuid 设备编号
version 当前版本号
jpush_id 极光推送RegistrationID(获取方式见极光API)

返回值

  • data 是经过des(substr(md5(password), 0, 8))加密过的
  • uid 用户id
  • token 令牌
  • phone 用户手机号码
  • name 用户姓名
  • inviter_id 邀请人id

    example

    {
    "code": 200,
    "msg": "success",
    "data": {
        "uid": "123",
        "phone": "13500000000",
        "name": "张三",
        "token": "xxxxxxxx",
        "inviter_id": "xxxx"
    }
    
    }

注册

https://example.com/Auth/reg

post参数

变量名 注释
uuid 设备编号
version 当前版本号
pwd md5后的密码
in_uid 邀请码
mob_token_key 验证参数
mob 手机号码

返回值

example

{
    "code": 200,
    "msg": "success"
}

end