Browse Source

Fixed bug

zhou.xiaoning 1 year ago
parent
commit
23c172996b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      token/token.go

+ 1 - 1
token/token.go

@@ -131,7 +131,7 @@ func Auth() gin.HandlerFunc {
 				c.Abort()
 				return
 			}
-			if time.Now().Unix()-int64(t) > 10 {
+			if time.Now().UnixMilli()-int64(t) > 10*1000 {
 				c.JSON(http.StatusUnauthorized, gin.H{
 					"code": e.ERROR,
 					"msg":  "非法调用接口1",