zhou.xiaoning vor 1 Jahr
Ursprung
Commit
23c172996b
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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",