zhou.xiaoning 1 سال پیش
والد
کامیت
6a6a8d0f97
1فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 5 5
      token/token.go

+ 5 - 5
token/token.go

@@ -111,7 +111,7 @@ func Auth() gin.HandlerFunc {
 			if timestamp == "" || token == "" || verification == "" {
 				c.JSON(http.StatusUnauthorized, gin.H{
 					"code": e.ERROR,
-					"msg":  "缺少检验参数",
+					"msg":  "apikey1",
 					"data": struct{}{},
 				})
 
@@ -124,7 +124,7 @@ func Auth() gin.HandlerFunc {
 			if err != nil {
 				c.JSON(http.StatusUnauthorized, gin.H{
 					"code": e.ERROR,
-					"msg":  "检验参数错误",
+					"msg":  "apikey2",
 					"data": struct{}{},
 				})
 
@@ -134,7 +134,7 @@ func Auth() gin.HandlerFunc {
 			if time.Now().UnixMilli()-int64(t) > 10*1000 {
 				c.JSON(http.StatusUnauthorized, gin.H{
 					"code": e.ERROR,
-					"msg":  "非法调用接口1",
+					"msg":  "apikey3",
 					"data": struct{}{},
 				})
 
@@ -149,7 +149,7 @@ func Auth() gin.HandlerFunc {
 			if h == "" {
 				c.JSON(http.StatusUnauthorized, gin.H{
 					"code": e.ERROR,
-					"msg":  "接口检验失败",
+					"msg":  "apikey4",
 					"data": struct{}{},
 				})
 
@@ -159,7 +159,7 @@ func Auth() gin.HandlerFunc {
 			if h != verification {
 				c.JSON(http.StatusUnauthorized, gin.H{
 					"code": e.ERROR,
-					"msg":  "非法调用接口2",
+					"msg":  "apikey5",
 					"data": struct{}{},
 				})