This commit is contained in:
wucongxing8150 2024-09-02 17:20:06 +08:00
parent e870b5483e
commit ec7f492f12

View File

@ -39,13 +39,13 @@ func (r *Login) Login(c *gin.Context) {
// 检测参数
if req.Mobile != "" {
if req.Code == "" {
responses.FailWithMessage("请输入手机号验证码", c)
return
}
// 检测验证码
if config.C.Env != "dev" {
if req.Code == "" {
responses.FailWithMessage("请输入手机号验证码", c)
return
}
if req.Source == 2 {
code, _ := global.Redis.Get(c, "login_code_count_"+req.Mobile).Result()
if code == "" {