NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
[TOC=2] ## 枚举变量 ## 获取验证码 ~~~[api] post:/smsCaptcha/acquire *string:phone=15181474781#手机号 <<< success { "code": 0, "data": { "expire": 10,//有效时间(分钟) "length": 6,//验证码长度 "captcha": "798419"//验证码(测试才会返回该参数) } } <<< error { "code": -1, "msg": "手机号长度错误" } ~~~ ## 验证码登录(注册) ~~~[api] post:/user/login *string:phone=15181474781#手机号 *string:sms_captcha=211231#短信验证码 <<< success { "code": 0, "data": { "user_type": "user", "session_key": "PHPSESSID", "session_value": "8i8brdkuloum6jds7q252rq4fh" } } <<< error { "code": -1, "msg": "短信验证码错误" } ~~~ ## 密码注册 ~~~[api] post:/register *string:phone=15181474781#手机号 *string:password=123456#密码 注意加密 *string:sms_captcha=211231#短信验证码 <<< success { "code": 0 } <<< error { "code": -1, "msg": "该手机号已被注册" } ~~~ ## 密码登录 ~~~[api] post:/loginPwd *string:phone=15181474781#手机号 *string:password=123456#密码 请加密 <<< success { "code": 0, "data": { "user_type": "user", "session_key": "PHPSESSID", "session_value": "8i8brdkuloum6jds7q252rq4fh" } } <<< error { "code": -1, "msg": "密码错误" } ~~~ ## 修改密码 ~~~[api] post:/changePassword *string:password=123456#原密码 *string:password_new=123456#新密码 <<< success { "code": 0 } <<< error { "code": -1, "msg": "原密码不正确" } ~~~ ## 找回密码 ~~~[api] post:/resetPassword *string:phone=15181474781#手机号 *string:password=123456#密码 注意加密 *string:sms_captcha=211231#短信验证码 <<< success { "code": 0 } <<< error { "code": -1, "msg": "用户不存在" } ~~~ ## 更换手机 ~~~[api] post:/changePhone *string:phone=15181474781#手机号 *string:sms_captcha=211231#短信验证码 <<< success { "code": 0 } <<< error { "code": -1, "msg": "该手机号已被注册" } ~~~