通用约定
- 域名HOST代表xxxxxxx.com
- 所有的SALT代表字符串exam.com.cn(加密认证时使用)
目录
账号
- 时间同步
- 登陆
- 注册
- 退出
- 找回密码(设置密码)
- 发送验证码
- 验证手机号(包括修改手机号码)
时间同步
post参数
变量名 | 注释 |
---|---|
uuid | 设备编号 |
version | 当前版本号 |
返回值
登陆
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" }
注册
post参数
变量名 | 注释 |
---|---|
uuid | 设备编号 |
version | 当前版本号 |
pwd | md5后的密码 |
in_uid | 邀请码 |
mob_token_key | 验证参数 |
mob | 手机号码 |
返回值
example
{
"code": 200,
"msg": "success"
}