调整eslint,优化oc判断

This commit is contained in:
奇淼(piexlmax
2023-01-14 10:52:15 +08:00
parent dfcb283899
commit 66666ed5fd
9 changed files with 103 additions and 139 deletions

View File

@@ -47,10 +47,7 @@ func (b *BaseApi) Login(c *gin.Context) {
global.BlackCache.Set(key, 1, time.Second*time.Duration(openCaptchaTimeOut))
}
var oc bool
if openCaptcha == 0 || openCaptcha < interfaceToInt(v) {
oc = true
}
var oc bool = openCaptcha == 0 || openCaptcha < interfaceToInt(v)
if !oc || store.Verify(l.CaptchaId, l.Captcha, true) {
u := &system.SysUser{Username: l.Username, Password: l.Password}