diff --git a/CoreCms.Net.Model/CoreCms.Net.Model.xml b/CoreCms.Net.Model/CoreCms.Net.Model.xml
index 6fdd4a24..2d4b9503 100644
--- a/CoreCms.Net.Model/CoreCms.Net.Model.xml
+++ b/CoreCms.Net.Model/CoreCms.Net.Model.xml
@@ -10832,6 +10832,21 @@
提现方式
+
+
+
+
+
+
+
+ 请求网址
+
+
+
+
+ 请求授权
+
+
小程序提交数据标准接收实体
diff --git a/CoreCms.Net.Model/FromBody/FMWeChatOffiaccount.cs b/CoreCms.Net.Model/FromBody/FMWeChatOffiaccount.cs
new file mode 100644
index 00000000..12817b3d
--- /dev/null
+++ b/CoreCms.Net.Model/FromBody/FMWeChatOffiaccount.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CoreCms.Net.Model.FromBody
+{
+ ///
+ ///
+ ///
+ public class FMGetWeChatConfig
+ {
+ ///
+ /// 请求网址
+ ///
+ public string url { get; set; }
+
+ ///
+ /// 请求授权
+ ///
+
+ public string token { get; set; } = string.Empty;
+
+ }
+}
diff --git a/CoreCms.Net.Web.WebApi/Controllers/WeChatOffiaccountController.cs b/CoreCms.Net.Web.WebApi/Controllers/WeChatOffiaccountController.cs
index fe048c02..b0162040 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/WeChatOffiaccountController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/WeChatOffiaccountController.cs
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using CoreCms.Net.Caching.AccressToken;
using CoreCms.Net.Model;
+using CoreCms.Net.Model.FromBody;
using CoreCms.Net.WeChat.Service.Enums;
using CoreCms.Net.WeChat.Service.HttpClients;
using CoreCms.Net.WeChat.Service.Options;
@@ -44,15 +45,15 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public IActionResult GetWeChatConfig()
+ public IActionResult GetWeChatConfig(FMGetWeChatConfig entity)
{
//获取全局缓存的jsapi_ticket
var jsApiTicket = WeChatCacheAccessTokenHelper.GetWeChatJsApiTicket();
var nonceStr = CoreCms.Net.Utility.Helper.CommonHelper.GetSerialNumber();
var timestamp = CoreCms.Net.Utility.Helper.CommonHelper.GetTimeStampByTotalSeconds().ToString();
- var url = Request.GetTypedHeaders().Referer;
+ //var url = Request.GetTypedHeaders().Referer;
//获取前面
- var signatureStr = "jsapi_ticket=" + jsApiTicket + "&noncestr=" + nonceStr + "×tamp=" + timestamp + "&url=" + url;
+ var signatureStr = "jsapi_ticket=" + jsApiTicket + "&noncestr=" + nonceStr + "×tamp=" + timestamp + "&url=" + entity.url;
var signature = CoreCms.Net.Utility.Helper.CommonHelper.Sha1Signature(signatureStr);
return new JsonResult(new
@@ -62,7 +63,8 @@ namespace CoreCms.Net.Web.WebApi.Controllers
timestamp,
nonceStr,
signature,
- url
+ entity.url,
+ entity
});
}
diff --git a/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.xml b/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.xml
index ab448627..46020818 100644
--- a/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.xml
+++ b/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.xml
@@ -1514,7 +1514,7 @@
-
+
JS-SDK使用权限签名算法