上线前支持不填验证码直接登录
This commit is contained in:
@@ -92,6 +92,10 @@ export default class Auth extends Service {
|
||||
if (telVerify.status !== 0) {
|
||||
return telVerify;
|
||||
}
|
||||
|
||||
// ! 测试阶段允许客户端不传验证码,此时不做验证码验证,直接注册或登录账号
|
||||
// TODO 上线前改掉或仅保留在测试服
|
||||
if (code !== '') {
|
||||
if (!isString(code) || code.length !== 6) {
|
||||
return ctx.service.utils.resResult(STATUS.WRONG_PARMS);
|
||||
}
|
||||
@@ -108,6 +112,7 @@ export default class Auth extends Service {
|
||||
return ctx.service.utils.resResult(STATUS.SMS_INVALID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 用户注册登录
|
||||
const token = ctx.service.utils.generateStr(256);
|
||||
|
||||
Reference in New Issue
Block a user