Browse Source

no message

xingzai 7 months ago
parent
commit
20e4d24193
1 changed files with 11 additions and 0 deletions
  1. 11 0
      controllers/user.go

+ 11 - 0
controllers/user.go

@@ -75,6 +75,11 @@ func (this *UserCommonController) Login() {
 			return
 		}
 
+		if utils.ValidateMobileFormatat(mobile) {
+			br.Msg = "格式错误,请输入正确的手机号码。"
+			return
+		}
+
 		//专栏作者,但是还没设置登录密码,弹窗提示如下:
 		isSetPassword := services.GetIsSetPassword(mobile)
 		if !isSetPassword {
@@ -2151,6 +2156,12 @@ func (this *UserCommonController) ReSetPass() {
 		br.Msg = "该账号不是专栏作者,请使用验证码登录。"
 		return
 	}
+
+	if utils.ValidateMobileFormatat(mobile) {
+		br.Msg = "格式错误,请输入正确的手机号码。"
+		return
+	}
+
 	isSetPassword := services.GetIsSetPassword(mobile)
 	if isSetPassword {
 		err = models.UpdateCygxUserPassword(mobile, password)