diff --git a/src/main/java/org/blue/club/utils/VerifyCodeUtils.java b/src/main/java/org/blue/club/utils/VerifyCodeUtils.java index a18b749..66f3432 100644 --- a/src/main/java/org/blue/club/utils/VerifyCodeUtils.java +++ b/src/main/java/org/blue/club/utils/VerifyCodeUtils.java @@ -20,9 +20,9 @@ import java.util.Random; @Component @RequiredArgsConstructor public class VerifyCodeUtils { - public static final int width = 240; - public static final int height = 80; - public static final int fontSize = 50; + public static final int width = 120; + public static final int height = 40; + public static final int fontSize = 25; public static final Font mainFont = new Font("宋体", Font.BOLD, fontSize); private final RandomUtils randomUtils; @@ -43,7 +43,7 @@ public class VerifyCodeUtils { for (char c : text.toCharArray()) { Random random = new Random(); setToRandomColor(g); - g.drawString(c + "", 15 + x * 40, 40 + new Random().nextInt(10)); + g.drawString(c + "", 15 + x * 20, 20 + new Random().nextInt(10)); for (int j = 0; j < random.nextInt(3, 7); j++) { setToRandomColor(g); g.drawLine(random.nextInt(width), random.nextInt(height), random.nextInt(width), random.nextInt(height));