Merge pull request #795 from flipped-aurora/update

调整验证码校验规则保证前后端配置一致 #794
This commit is contained in:
奇淼(piexlmax
2021-11-09 11:38:11 +08:00
committed by GitHub
4 changed files with 20 additions and 148 deletions

View File

@@ -34,8 +34,9 @@ func (b *BaseApi) Captcha(c *gin.Context) {
response.FailWithMessage("验证码获取失败", c)
} else {
response.OkWithDetailed(systemRes.SysCaptchaResponse{
CaptchaId: id,
PicPath: b64s,
CaptchaId: id,
PicPath: b64s,
CaptchaLength: global.GVA_CONFIG.Captcha.KeyLong,
}, "验证码获取成功", c)
}
}

View File

@@ -1,6 +1,7 @@
package response
type SysCaptchaResponse struct {
CaptchaId string `json:"captchaId"`
PicPath string `json:"picPath"`
CaptchaId string `json:"captchaId"`
PicPath string `json:"picPath"`
CaptchaLength int `json:"captchaLength""`
}