Skip to content

shinygang/Wechat-JSSDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Wechat-SDK

C#版本的微信sdk处理。


如果对你有帮助,恳请给作者累积一个大保健的机会,欢迎扫码

首先请修改SiteSettings.cs里面的参数

JSSDK

官方jssdk文档 微信jssdk签名认证,JSSDK.cs里面修改参数:

private static string wxAppId = "*****";
private static string wxAppSecret = "*****";

然后页面直接调用:

JSSDK.getSignPackage()或者JSSDK.getSignPackage(url)

Hashtable ht = JSSDK.getSignPackage();
string appId = ht["appId"].ToString();
string nonceStr = ht["nonceStr"].ToString();
string timestamp = ht["timestamp"].ToString();
string signature = ht["signature"].ToString();

然后根据获取的参数进行微信jssdk签名

WXOauth.cs 微信认证和获取用户信息

官方授权文档

//获取token和openid信息
OAuth_Token Model = Get_token(code);
//获取微信用户信息
OAuthUser user = Get_UserInfo(Model.access_token, Model.openid);

About

C#版本的微信jssdk签名处理

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published