修复关闭验证码时显示问题
This commit is contained in:
parent
4889941a78
commit
ef6286ec1b
|
@ -27,6 +27,11 @@ public class SysCaptchaServiceImpl implements SysCaptchaService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SysCaptchaVO generate() {
|
public SysCaptchaVO generate() {
|
||||||
|
// 判断是否开启验证码
|
||||||
|
if (!isCaptchaEnabled()) {
|
||||||
|
return new SysCaptchaVO();
|
||||||
|
}
|
||||||
|
|
||||||
// 生成验证码key
|
// 生成验证码key
|
||||||
String key = UUID.randomUUID().toString();
|
String key = UUID.randomUUID().toString();
|
||||||
|
|
||||||
|
@ -44,6 +49,7 @@ public class SysCaptchaServiceImpl implements SysCaptchaService {
|
||||||
SysCaptchaVO captchaVO = new SysCaptchaVO();
|
SysCaptchaVO captchaVO = new SysCaptchaVO();
|
||||||
captchaVO.setKey(key);
|
captchaVO.setKey(key);
|
||||||
captchaVO.setImage(image);
|
captchaVO.setImage(image);
|
||||||
|
captchaVO.setEnabled(true);
|
||||||
|
|
||||||
return captchaVO;
|
return captchaVO;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,4 +21,7 @@ public class SysCaptchaVO implements Serializable {
|
||||||
|
|
||||||
@Schema(description = "image base64")
|
@Schema(description = "image base64")
|
||||||
private String image;
|
private String image;
|
||||||
|
|
||||||
|
@Schema(description = "是否开启验证码")
|
||||||
|
private boolean enabled;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user