mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:33:27 +08:00
【修复】修复appsetting.json微信公众号配置项命名错误的问题。
【新增】增加微信公众号获取JS-Token并且全局缓存功能。 【新增】增加微信公众号获取JS-SDK使用权限签名算法。
This commit is contained in:
@@ -13,6 +13,7 @@ using System.Threading.Tasks;
|
||||
using CoreCms.Net.Caching.Manual;
|
||||
using CoreCms.Net.Configuration;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using SKIT.FlurlHttpClient.Wechat.Api.Models;
|
||||
|
||||
namespace CoreCms.Net.Caching.AccressToken
|
||||
{
|
||||
@@ -43,5 +44,19 @@ namespace CoreCms.Net.Caching.AccressToken
|
||||
return cacheAccessToken?.accessToken;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取微信公众号WeiXinJsApiTicket
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GetWeChatJsApiTicket()
|
||||
{
|
||||
//获取微信AccessToken
|
||||
var cacheAccessToken = ManualDataCache.Instance.Get<CgibinTicketGetTicketResponse>(GlobalEnumVars.JsApiTicketEnum.WeiXinJsApiTicket.ToString());
|
||||
return cacheAccessToken.Ticket;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user