|
@@ -92,11 +92,9 @@ public class AppHelpGoodsController {
|
|
|
public R<String> createPropsVerificationCode(@ApiParam(value = "道具ID", required = true) @RequestParam Long helpGoodsId,
|
|
public R<String> createPropsVerificationCode(@ApiParam(value = "道具ID", required = true) @RequestParam Long helpGoodsId,
|
|
|
@ApiParam(value = "用户ID", required = true) @RequestParam Long userId,
|
|
@ApiParam(value = "用户ID", required = true) @RequestParam Long userId,
|
|
|
@ApiParam(value = "作品ID", required = true) @RequestParam Long productId) {
|
|
@ApiParam(value = "作品ID", required = true) @RequestParam Long productId) {
|
|
|
- // 自定义纯数字的验证码(随机4位数字,可重复)
|
|
|
|
|
-// RandomGenerator randomGenerator = new RandomGenerator("0123456789", 4);
|
|
|
|
|
// 创建图像验证码
|
|
// 创建图像验证码
|
|
|
- LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(200, 100);
|
|
|
|
|
-// lineCaptcha.setGenerator(randomGenerator);
|
|
|
|
|
|
|
+ LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(250, 100);
|
|
|
|
|
+// lineCaptcha.setGenerator(new ChineseGenerator(4));
|
|
|
// 重新生成code
|
|
// 重新生成code
|
|
|
lineCaptcha.createCode();
|
|
lineCaptcha.createCode();
|
|
|
// 创建验证码,并放到缓存中,有效期60秒
|
|
// 创建验证码,并放到缓存中,有效期60秒
|