Browse Source

Merge branch 'feature/pool455_login_code' into debug

xyxie 15 hours ago
parent
commit
656863b425
2 changed files with 2 additions and 0 deletions
  1. 1 0
      controllers/user_login.go
  2. 1 0
      models/base.go

+ 1 - 0
controllers/user_login.go

@@ -322,6 +322,7 @@ func (this *UserLoginController) Login() {
 		    ok := store.Verify(req.CaptchaId, req.CaptchaCode, true)
 		    if !ok {
 			   br.Msg = "图形验证码错误, 请重新输入"
+			   br.Ret = models.BaseRespCodeLoginCaptchErr
 			   return
 		    }
 		}

+ 1 - 0
models/base.go

@@ -3,6 +3,7 @@ package models
 const (
 	BaseRespCodeAbnormalLogin = 4011 // 异常登录状态码
 	BaseRespCodeLoginErr      = 4012 // 账号或密码输入错误
+	BaseRespCodeLoginCaptchErr = 4022 // 图形验证码错误
 )
 
 type BaseResponse struct {