Procházet zdrojové kódy

Merge branch 'CRM_12.9' into debug

ziwen před 2 roky
rodič
revize
b6c1b73400
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      controller/auth.go

+ 4 - 1
controller/auth.go

@@ -149,6 +149,9 @@ func (a *AuthController) Register(c *gin.Context) {
 			}
 			resp.Ok("注册成功", c)
 			userId = int(emailItem.Id)
+		} else if emailItem.Status == 1 && emailItem.Password != "" {
+			resp.Registered("邮箱已注册.", c)
+			return
 		} else if emailItem.Status == 2 {
 			resp.Registered("邮箱已注册.", c)
 			return
@@ -171,7 +174,7 @@ func (a *AuthController) Register(c *gin.Context) {
 
 		err = user.Add()
 		if err != nil {
-			resp.FailData("新增用户信息失败", "Err:"+err.Error(), c)
+			resp.FailData("新增用户信息失败"+"Err:"+err.Error(), "Err:"+err.Error(), c)
 			return
 		}
 		userId = int(user.Id)