zwxi 10 months ago
parent
commit
fbf438bb13
1 changed files with 6 additions and 6 deletions
  1. 6 6
      controllers/base_auth.go

+ 6 - 6
controllers/base_auth.go

@@ -281,12 +281,12 @@ func (c *BaseAuthController) ServeJSON(encoding ...bool) {
 		}
 	}
 
-	//if c.Lang == utils.EnLangVersion {
-	//	msg := c.Data["json"].(*models.BaseResponse).Msg
-	//	if utils.ViperConfig.GetBool(msg) {
-	//		c.Data["json"].(*models.BaseResponse).Msg = utils.ViperConfig.GetString(msg)
-	//	}
-	//}
+	if c.Lang == utils.EnLangVersion {
+		msg := c.Data["json"].(*models.BaseResponse).Msg
+		if utils.ViperConfig.GetBool(msg) {
+			c.Data["json"].(*models.BaseResponse).Msg = utils.ViperConfig.GetString(msg)
+		}
+	}
 
 	//新增uuid记录
 	{