From 1e2d5b199abeef8d74147c2042478bd22ae662ce Mon Sep 17 00:00:00 2001 From: Mrx <18278715334@163.com> Date: Sat, 28 Feb 2026 12:00:07 +0800 Subject: [PATCH] f --- pkg/captcha/aliyun.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/captcha/aliyun.go b/pkg/captcha/aliyun.go index f48b8d5..d338d9d 100644 --- a/pkg/captcha/aliyun.go +++ b/pkg/captcha/aliyun.go @@ -22,8 +22,9 @@ func Verify(cfg Config, captchaVerifyParam string) error { if os.Getenv("ENV") == "development" { return nil } + // captchaVerifyParam 为可选入参,未传入时默认验证通过(兼容未做防滑拼图的页面) if captchaVerifyParam == "" { - return errors.Wrapf(xerr.NewErrMsg("图形验证码校验失败"), "empty captchaVerifyParam") + return nil } clientCfg := &openapi.Config{