MpWeiXinCore 1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package MpWeiXinCore --version 1.0.0
NuGet\Install-Package MpWeiXinCore -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MpWeiXinCore" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MpWeiXinCore --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MpWeiXinCore, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MpWeiXinCore as a Cake Addin #addin nuget:?package=MpWeiXinCore&version=1.0.0 // Install MpWeiXinCore as a Cake Tool #tool nuget:?package=MpWeiXinCore&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
微信公众号开发
使用
使用前先注入IDistributedCache
// 分布式 Redis 缓存
services.AddStackExchangeRedisCache(options =>
{
options.Configuration = "localhost";
options.InstanceName = "SampleInstance";
});
注入服务
services.AddMpWeiXin(option =>
{
configuration.GetSection("WxConfig").Bind(option);
});
or
services.AddMpWeiXin(option =>
{
AppId ="wxxxxx";
AppSecret = "test";
});
功能
验证签名
WeiXinSignature.ValidateSignature()
获取TOKEN
WxAccessTokenService.GetToken()
生成临时二维码
WxAccountService.GetQrCode(int sceneId)
- screen: 生成二维码的场景
发送客服消息
CustomerService.Send(CustomerMessage message)
- message: 客户消息对象
微信服务器事件推送处理
- 自定义菜单事件
- 微信推荐事件
微信js sdk
- 获取微信分享朋友圈、分享给朋友权限验证配置
WxJsSdkService.GetSignature
配置
在appsettings中加入以下内容
"WxConfig": {
// 配置当前是否开启调试,`1:开启,0:禁用`
"IsDebug": true,
// 开发阶段使用的TOKEN
"AccessToken": "",
"AppId": "wx725d7d9a9fcf63a6",
"AppSecret": "9571cc24f82834b9d7314fa2ffa79db6",
"Token": "CHNFUND_VST"
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- Easy.Common (>= 3.8.0)
- Microsoft.AspNetCore.Http (>= 2.2.2)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Caching.Abstractions (>= 3.1.5)
- Microsoft.Extensions.Configuration.Abstractions (>= 3.1.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 3.1.5)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.5)
- Microsoft.Extensions.Options (>= 3.1.5)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 3.1.5)
- Newtonsoft.Json (>= 11.0.2)
- System.Security.Cryptography.Algorithms (>= 4.3.1)
- System.Security.Cryptography.Algorithms.Extensions (>= 1.0.0)
- System.Text.Encoding (>= 4.3.0)
- System.Text.Encoding.Extensions (>= 4.3.0)
- System.Xml.XmlSerializer (>= 4.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.