111133333
This commit is contained in:
parent
ec7f492f12
commit
631326b759
@ -41,12 +41,12 @@ func (r *Login) Login(c *gin.Context) {
|
||||
if req.Mobile != "" {
|
||||
// 检测验证码
|
||||
if config.C.Env != "dev" {
|
||||
if req.Code == "" {
|
||||
responses.FailWithMessage("请输入手机号验证码", c)
|
||||
return
|
||||
}
|
||||
|
||||
if req.Source == 2 {
|
||||
if req.Code == "" {
|
||||
responses.FailWithMessage("请输入手机号验证码", c)
|
||||
return
|
||||
}
|
||||
|
||||
code, _ := global.Redis.Get(c, "login_code_count_"+req.Mobile).Result()
|
||||
if code == "" {
|
||||
responses.FailWithMessage("验证码失效", c)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user