Browse Source

‘fix:修改’

zhangxinlei1996 3 năm trước cách đây
mục cha
commit
04472400fb
2 tập tin đã thay đổi với 5 bổ sung3 xóa
  1. 2 1
      common/gatecode/global.go
  2. 3 2
      core/proxy/middleware/filterFuncs.go

+ 2 - 1
common/gatecode/global.go

@@ -2,9 +2,10 @@ package gatecode
 
 import (
 	"errors"
+	"strings"
+
 	"github.com/gogf/gf/v2/errors/gcode"
 	"github.com/gogf/gf/v2/errors/gerror"
-	"strings"
 )
 
 var (

+ 3 - 2
core/proxy/middleware/filterFuncs.go

@@ -1,6 +1,7 @@
 package middleware
 
 import (
+	"log"
 	"strings"
 
 	. "bp.jydev.jianyu360.cn/BaseService/gateway/common/gatecode"
@@ -35,9 +36,9 @@ func filterBefore(r *ghttp.Request) error {
 		if uCheck || eCheck {
 			infusionIdentity(r, ctx.Sess, rule.AppId)
 		}
-		//APPID注入请求体
-		infusionAppid(r, rule.AppId)
 	}
+	//APPID注入请求体
+	infusionAppid(r, rule.AppId)
 
 	//校验账户状态,校验认证状态
 	if rule.AccountCheck.NeedCheck() || rule.AuthCheck.NeedCheck() {