This commit is contained in:
suyl
2021-07-14 10:26:45 +08:00
parent c6f7f00daa
commit 8324fd011b
2 changed files with 3 additions and 17 deletions

View File

@@ -12,23 +12,8 @@ import (
//刷新验证码 POST
func RefreshCode(c *gin.Context) {
var (
err error
user = &struct {
Width int `json:"width" form:"width" binding:"required"`
Height int `json:"height" form:"height" binding:"required"`
}{}
)
if err = c.ShouldBind(&user); err != nil {
c.JSON(http.StatusOK, &CallBack{
Code: model.ErrCodeNormal,
Desc: err.Error(),
})
globals.SugarLogger.Debugf("End API :%s error:%v:", c.Request.URL, err)
return
}
globals.SugarLogger.Debugf("RefreshCode, ip: %v", c.ClientIP())
utils.Captcha(c, user.Width, user.Height, 4)
utils.Captcha(c, 4)
}
type UserParam struct {