用户

登陆

POST - /user/login
参数 是否必填 说明
login_type 登陆方式 password密码登陆 wechat_openid微信登陆
username 手机号,登陆方式为password 必填
password 密码,登陆方式为password 必填
wechat_openid 微信openid ,登陆方式为wechat_openid 必填
wechat_mini_param 数组,必须包含code,encryptedData,iv

返回的信息里包含会过期的token

注册

POST - /user/register
参数 是否必填 说明
register_type 注册方式 password 密码注册 wechat_openid 微信注册
username 账号(手机号),注册方式为password 必填
password 密码,注册方式为password 必填
channel_type 渠道,sms短信 email 邮箱,v1版本选sms ,注册方式为password 必填
verify_code 验证码,注册方式为password 必填
wechat_openid 微信openid,注册方式为wechat_openid 必填
wechat 微信的用户信息,注册方式为wechat_openid 必填,字段参考《微信文档
wechat_mini_param 数组,必须包含code,encryptedData,iv

退出

GET - /user/logout

修改密码

POST - /user/editPassword
参数 是否必填 说明
oldpassword 老密码
password 新密码

找回密码

POST - /user/editPasswordByFind
参数 是否必填 说明
phone 手机号
password 新密码
verify_code 验证码

发送验证码

POST - /Verifycode/add
参数 是否必填 说明
behavior 行为标识,register 注册 findPassword 找回密码 editPassword 修改密码 bindPhone 绑定手机
channel_type 固定 传sms
phone 手机号

用户信息

GET - /user/self
{
    "code":0,
    "result":{
        "info":{
            "id":563,
            "username":"wechat_mini_oX3Qk0RaO1SPqT-KQNKx6rjdts_I_d1e99fc9",
            "phone":null,
            "email":null,
            "state":1,
            "salt":"56ea1c760da8314aab01504529eda896",
            "is_discard":0,
            "create_time":1534994779,
            "delete_time":null,
            "profile":{
                "id":2,
                "user_id":563,
                "name":null,
                "nickname":"韩文博😊",
                "avatar":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83ep7piaSYcwom3S1gouQ2nMxpXm2WwJuEA15qEXtkibRBXm7bc9BEuWuABP53ibrMWkJImTTIynzGfjTQ/132",
                "sex":1,
                "birthday":0,
                "qq":null,
                "delete_time":null
            },
            "assets":{
                "id":2,
                "user_id":563,
                "points":0,
                "balance":"0.00",
                "delete_time":null
            }
        }
    },
    "msg":null
}

修改资料

POST - /user/editProfile
参数 是否必填 说明
province_id 省份id
city_id 城市id
area_id 区域id
nickname 昵称
sex 性别 10
avatar 头像地址
birthday 生日时间戳

刷新token

POST - /user/token

绑定手机号

POST - /user/bindPhone
参数 是否需必填 说明
phone 手机号
password 密码
verify_code 验证码

绑定微信

POST - /user/bindWechat
参数 是否必填 说明
wechat_openid 微信openid
wechat 微信的用户信息,注册方式为wechat_openid 必填,字段参考《微信文档

手机解绑微信

POST - /user/unbindWechat

微信解绑手机

POST - /user/unbindPhone
上次更新: 2018/12/20 下午12:14:08