[TOC=2]
## 获取验证码
~~~[api]
post:/smsCaptcha/acquire
*string:phone=15181474781#手机号
<<<
success
{
"code": 0,
"data": {
"expire": 10,//有效期 分钟
"length": 6,//验证码长度
"captcha": "146119"// 测试的验证码
}
}
<<<
error
{
"code": -1,
"msg": "手机号长度错误"
}
~~~
## 注册
~~~[api]
post:/phoneUser/register
*string:phone=15181474781#手机号
*string:password=123456#密码
*string:sms_captcha=123456#短信验证码
<<<
success
{
"code": 0
}
<<<
error
{
"code": -1,
"msg": "短信验证码错误"
}
~~~
## 登录
~~~[api]
post:/phoneUser/login
*string:phone=15181474781#手机号
*string:password=123456#密码
<<<
success
{
"code": 0,
"data": {
"name": "15181474781",//账号
"recent_login_time": 1522639328,//最近登录时间
"session_key": "PHPSESSID",
"session_value": "sbqlee5f24d7l4r83kmj756bbs"
}
}
<<<
error
{
"code": -1,
"msg": "密码不能为空"
}
~~~
## 忘记密码
~~~[api]
post:/phoneUser/resetPassword
*string:phone=15181474781#手机号
*string:password=123456#密码
*string:sms_captcha=123456#短信验证码
<<<
success
{
"code": 0
}
<<<
error
{
"code": -1,
"msg": "密码不能为空"
}
~~~
## 修改密码
~~~[api]
post:/phoneUser/changePassword
*string:password=123456#原密码
*string:password_new=123456789#新密码
<<<
success
{
"code": 0
}
<<<
error
{
"code": -1,
"msg": "密码不能为空"
}
~~~
## 验证码登录
~~~[api]
post:/phoneUser/loginBySMS
*string:phone=15181474781#手机号
*string:sms_captcha=123456#短信验证码
<<<
success
{
"code": 0,
"data": {
"name": "15181474781",//账号
"recent_login_time": 1522640720,//最近登录时间
"session_key": "PHPSESSID",
"session_value": "errss6ktn7scs3mv68gcg2g8lo"
}
}
<<<
error
{
"code": -1,
"msg": "短信验证码错误"
}
~~~
