From 9d55238cefaffb75e00dbc3b22965d6c722823c9 Mon Sep 17 00:00:00 2001 From: Gucheng Wang Date: Mon, 6 Mar 2023 00:33:26 +0800 Subject: [PATCH] Fix code issue --- captcha/aliyun.go | 8 ++++---- web/src/common/CaptchaModal.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/captcha/aliyun.go b/captcha/aliyun.go index bb412cb7..17695ce8 100644 --- a/captcha/aliyun.go +++ b/captcha/aliyun.go @@ -86,8 +86,8 @@ func (captcha *AliyunCaptchaProvider) VerifyCaptcha(token, clientSecret string) } type captchaResponse struct { - Code string `json:"Code"` - Message string `json:"Message"` + Code int `json:"Code"` + Msg string `json:"Msg"` } captchaResp := &captchaResponse{} @@ -96,8 +96,8 @@ func (captcha *AliyunCaptchaProvider) VerifyCaptcha(token, clientSecret string) return false, err } - if captchaResp.Code != "100" { - return false, errors.New(captchaResp.Message) + if captchaResp.Code != 100 { + return false, errors.New(captchaResp.Msg) } return true, nil diff --git a/web/src/common/CaptchaModal.js b/web/src/common/CaptchaModal.js index 64a17460..702cf791 100644 --- a/web/src/common/CaptchaModal.js +++ b/web/src/common/CaptchaModal.js @@ -144,7 +144,7 @@ export const CaptchaModal = (props) => { return [ , - , + , ]; };