#region 生成专家流程确认个人小程序二维码
public static string GetwxCode(string id,string email,string root) {
string url = "";
string tokenUrl = $"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={"wxafcbed6260fe0527"}&secret={"958f6264094c810167548b9ad91d6e62"}";
var responseString = new HttpClient().GetStringAsync(tokenUrl).Result;
dynamic jsonstr = Newtonsoft.Json.JsonConvert.DeserializeObject(responseString);
if (!string.IsNullOrWhiteSpace(jsonstr.access_token.ToString()))
{
//获取token
string access_token = jsonstr.access_token;
//页面附带参数必须是键值对形式,否则小程序会把值作为参数名,接收不到参数
string content = $"key={id}";
//跳转路径
string pathurl = $"pages/index/index?{content}";
string j
.net core请求微信小程序接口动态生成二维码
最新推荐文章于 2024-05-30 11:56:11 发布