Quellcode durchsuchen

启动验证码

master
zongjl vor 2 Jahren
Ursprung
Commit
8be1c2782f
1 geänderte Dateien mit 6 neuen und 8 gelöschten Zeilen
  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 Datei anzeigen

@@ -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 {

Laden…
Abbrechen
Speichern