Jinquan_Ou
2023-03-20 a51079ad8deab6a0a00e0e8729a778b19c357477
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
@@ -2,6 +2,7 @@
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
@@ -47,7 +48,6 @@
    {
        AjaxResult ajax = AjaxResult.success();
        boolean captchaEnabled = configService.selectCaptchaEnabled();
        ajax.put("captchaEnabled", captchaEnabled);
        if (!captchaEnabled)
        {
            return ajax;
@@ -87,11 +87,13 @@
            return AjaxResult.error(e.getMessage());
        }
        ajax.put("uuid", uuid);
        ajax.put("img", Base64.encode(os.toByteArray()));
        ajax.put("code",200);
        ajax.put("value",code);
        ajax.put("txt","77777");
        HashMap<String, Object> data = new HashMap<>();
        data.put("uuid",uuid);
        data.put("img",Base64.encode(os.toByteArray()));
        data.put("value",code);
        data.put("txt","77777");
        ajax.put("msg","操作成功");
        ajax.put("data",data);
        return ajax;
    }
}