Commit d8542e2b authored by 黄智's avatar 黄智

登录调整

parent 6610b00d
...@@ -63,7 +63,7 @@ func UserLoginV2(c *gin.Context) { ...@@ -63,7 +63,7 @@ func UserLoginV2(c *gin.Context) {
} }
loginInf.UserUnLock(userInfo.Id) loginInf.UserUnLock(userInfo.Id)
// TODO STEP2 用户和ip没有加入到访问规则登录不上提醒 //用户和ip没有加入到访问规则登录不上提醒
if config.AccessRuleState == 1 { if config.AccessRuleState == 1 {
ip := util.RemoteIp(c.Request) ip := util.RemoteIp(c.Request)
svc := service.AccessRuleSvc{} svc := service.AccessRuleSvc{}
...@@ -212,7 +212,7 @@ func UserPhoneLogin(c *gin.Context) { ...@@ -212,7 +212,7 @@ func UserPhoneLogin(c *gin.Context) {
return return
} }
// TODO STEP2 用户和ip没有加入到访问规则登录不上提醒 // 用户和ip没有加入到访问规则登录不上提醒
if config.AccessRuleState == 1 { if config.AccessRuleState == 1 {
ip := util.RemoteIp(c.Request) ip := util.RemoteIp(c.Request)
svc := service.AccessRuleSvc{} svc := service.AccessRuleSvc{}
...@@ -222,13 +222,13 @@ func UserPhoneLogin(c *gin.Context) { ...@@ -222,13 +222,13 @@ func UserPhoneLogin(c *gin.Context) {
} }
} }
// TODO STEP3 密码强弱提醒 // 密码强弱提醒
// 密码强弱提醒 // 密码强弱提醒
if config.ForceUpdateState == 1 && config.MinPwdLevel > userInfo.PwdLevel { if config.ForceUpdateState == 1 && config.MinPwdLevel > userInfo.PwdLevel {
SendJsonResponse(c, resp.FAIL.ErrorDetail(errors.New("密码强度弱,请联系管理员修改密码!")), nil) SendJsonResponse(c, resp.FAIL.ErrorDetail(errors.New("密码强度弱,请联系管理员修改密码!")), nil)
return return
} }
// TODO STEP4 验证码正确性校验 // 验证码正确性校验
exist, err := loginInf.VerifyPhoneCode(req.Phone) exist, err := loginInf.VerifyPhoneCode(req.Phone)
if err != nil { if err != nil {
SendJsonResponse(c, resp.FAIL.ErrorDetail(err), nil) SendJsonResponse(c, resp.FAIL.ErrorDetail(err), nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment