From a463c8f81ceb50566fad258c27ce8aa1776005d8 Mon Sep 17 00:00:00 2001 From: lanyulei Date: Tue, 19 Nov 2024 00:34:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/system/captcha.go | 2 +- tools/captcha/captcha.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/system/captcha.go b/apis/system/captcha.go index a871960b..79ecc3a1 100644 --- a/apis/system/captcha.go +++ b/apis/system/captcha.go @@ -13,7 +13,7 @@ import ( */ func GenerateCaptchaHandler(c *gin.Context) { - id, b64s, err := captcha.DriverDigitFunc() + id, b64s, _, err := captcha.DriverDigitFunc() if err != nil { app.Error(c, -1, err, fmt.Sprintf("验证码获取失败, %v", err.Error())) return diff --git a/tools/captcha/captcha.go b/tools/captcha/captcha.go index 55dc8f88..e38a18aa 100644 --- a/tools/captcha/captcha.go +++ b/tools/captcha/captcha.go @@ -19,7 +19,7 @@ type configJsonBody struct { DriverDigit *base64Captcha.DriverDigit } -func DriverDigitFunc() (id, b64s string, err error) { +func DriverDigitFunc() (id, b64s, answer string, err error) { e := configJsonBody{} e.Id = uuid.New().String() e.DriverDigit = base64Captcha.NewDriverDigit(80, 240, 4, 0.7, 80)