This commit is contained in:
2024-07-29 11:59:01 +08:00
parent 5a94972228
commit 502908b4e5
3 changed files with 14 additions and 1 deletions
+12
View File
@@ -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{})