DESKTOP-HN5QP3V\Administrator 2 сар өмнө
parent
commit
f585bd37be

+ 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(),