Commit d48cb15c authored by liaoanyuan's avatar liaoanyuan

pc端验证码登录修改为随意输入即可登录

parent 3af5645a
......@@ -104,7 +104,8 @@ public class SendSmsSerViceImpl implements SendSmsSerVice {
//判断缓存是否过期
long time = redisService.getExpire(key);
if (time < 0) {
return R.error(1, "验证码已过期!", false);
//return R.error(1, "验证码已过期!", false);
return R.ok(0, true);
}
//redis中获取验证码
......@@ -116,9 +117,11 @@ public class SendSmsSerViceImpl implements SendSmsSerVice {
redisService.del(key);
return R.ok(0, true);
} else {
return R.error(1, "验证码错误!", false);
//return R.error(1, "验证码错误!", false);
return R.ok(0, true);
}
}
return R.ok(1, false);
//return R.ok(1, false);
return R.ok(0, true);
}
}
......@@ -103,6 +103,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UsersMapper, User> impleme
//2、判断验证码是否正确
String source = SourceType.getByCode(userVo.getSource());
R<Boolean> result = sendSmsSerVice.valid(userVo.getPhone(), userVo.getCode(), userVo.getScene(), source);
if (null != result && result.getCode() == ERROR_CODE) {
return R.error(result.getMessage());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment