|
|
@@ -37,6 +37,8 @@ public partial class WechatApiClientFactory : ISingleton
|
|
|
{
|
|
|
AppId = _wechatOptions.WechatAppId,
|
|
|
AppSecret = _wechatOptions.WechatAppSecret,
|
|
|
+ PushToken = _wechatOptions.WechatToken,
|
|
|
+ PushEncodingAESKey = _wechatOptions.WechatEncodingAESKey,
|
|
|
})
|
|
|
.UseHttpClient(_httpClientFactory.CreateClient(), disposeClient: false) // 设置 HttpClient 不随客户端一同销毁
|
|
|
.Build();
|
|
|
@@ -64,8 +66,10 @@ public partial class WechatApiClientFactory : ISingleton
|
|
|
var client = WechatApiClientBuilder.Create(new WechatApiClientOptions()
|
|
|
{
|
|
|
AppId = _wechatOptions.WxOpenAppId,
|
|
|
- AppSecret = _wechatOptions.WxOpenAppSecret
|
|
|
- })
|
|
|
+ AppSecret = _wechatOptions.WxOpenAppSecret,
|
|
|
+ PushToken = _wechatOptions.WxToken,
|
|
|
+ PushEncodingAESKey = _wechatOptions.WxEncodingAESKey,
|
|
|
+ })
|
|
|
.UseHttpClient(_httpClientFactory.CreateClient(), disposeClient: false) // 设置 HttpClient 不随客户端一同销毁
|
|
|
.Build();
|
|
|
|