소스 검색

启动验证码

master
zongjl 2 년 전
부모
커밋
8be1c2782f
1개의 변경된 파일6개의 추가작업 그리고 8개의 파일을 삭제
  1. +6
    -8
      tuoheng-system/src/main/java/com/tuoheng/system/service/impl/LoginServiceImpl.java

+ 6
- 8
tuoheng-system/src/main/java/com/tuoheng/system/service/impl/LoginServiceImpl.java 파일 보기

@@ -89,14 +89,12 @@ public class LoginServiceImpl extends ServiceImpl<UserMapper, User> implements I
return JsonResult.error("验证码KEY不能为空");
}
// 验证码
if (!loginDto.getCaptcha().equals("520")) {
if (StringUtils.isEmpty(loginDto.getCaptcha())) {
return JsonResult.error("验证码不能为空");
}
// 验证码校验
if (!loginDto.getCaptcha().toLowerCase().equals(redisUtils.get(loginDto.getKey()).toString().toLowerCase())) {
return JsonResult.error("验证码不正确");
}
if (StringUtils.isEmpty(loginDto.getCaptcha())) {
return JsonResult.error("验证码不能为空");
}
// 验证码校验
if (!loginDto.getCaptcha().toLowerCase().equals(redisUtils.get(loginDto.getKey()).toString().toLowerCase())) {
return JsonResult.error("验证码不正确");
}

try {

Loading…
취소
저장