DESKTOP-HN5QP3V\Administrator пре 2 месеци
родитељ
комит
f585bd37be
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      pkg/helper/wechat/wechatHelper.go

+ 3 - 1
pkg/helper/wechat/wechatHelper.go

@@ -153,7 +153,9 @@ func NewWechatHelper() *WechatHelper {
 		Cache:     wechatCache.NewAccessToken(cache.RedisReport),
 	})
 
-	wx.Context.SetGetAccessTokenFunc(MyAccessTokenFunc)
+	if os.Getenv("CHANNEL") == "product" {
+		wx.Context.SetGetAccessTokenFunc(MyAccessTokenFunc)
+	}
 
 	return &WechatHelper{
 		ctx:       context.Background(),