1111
This commit is contained in:
parent
ce123da9d4
commit
e870b5483e
@ -46,15 +46,17 @@ func (r *Login) Login(c *gin.Context) {
|
|||||||
|
|
||||||
// 检测验证码
|
// 检测验证码
|
||||||
if config.C.Env != "dev" {
|
if config.C.Env != "dev" {
|
||||||
code, _ := global.Redis.Get(c, "login_code_count_"+req.Mobile).Result()
|
if req.Source == 2 {
|
||||||
if code == "" {
|
code, _ := global.Redis.Get(c, "login_code_count_"+req.Mobile).Result()
|
||||||
responses.FailWithMessage("验证码失效", c)
|
if code == "" {
|
||||||
return
|
responses.FailWithMessage("验证码失效", c)
|
||||||
}
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if req.Code != code {
|
if req.Code != code {
|
||||||
responses.FailWithMessage("验证码错误", c)
|
responses.FailWithMessage("验证码错误", c)
|
||||||
return
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user