4
This commit is contained in:
@@ -32,6 +32,18 @@ func (r *Login) LoginPhone(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// 检测验证码
|
||||
code, _ := global.Redis.Get(c, "login_code_count_"+req.Mobile).Result()
|
||||
if code == "" {
|
||||
responses.FailWithMessage("验证码失效", c)
|
||||
return
|
||||
}
|
||||
|
||||
if req.Code != code {
|
||||
responses.FailWithMessage("验证码错误", c)
|
||||
return
|
||||
}
|
||||
|
||||
// 检测用户信息
|
||||
userDao := dao.UserDao{}
|
||||
maps := make(map[string]interface{})
|
||||
|
||||
Reference in New Issue
Block a user