{"id":31309,"date":"2024-11-25T10:55:22","date_gmt":"2024-11-25T02:55:22","guid":{"rendered":"https:\/\/fwq.ai\/blog\/31309\/"},"modified":"2024-11-25T10:55:22","modified_gmt":"2024-11-25T02:55:22","slug":"%e5%be%ae%e4%bf%a1%e5%88%86%e4%ba%ab%e5%8a%9f%e8%83%bd%e7%9a%84%e5%bc%80%e5%8f%91","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/31309\/","title":{"rendered":"\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1"},"content":{"rendered":"<p style=\"text-align: left\">\u8fd9\u6b21\u7ed9\u5927\u5bb6\u5e26\u6765\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\uff0c\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u5f00\u53d1\u7684\u6709\u54ea\u4e9b\uff0c\u4e0b\u9762\u5c31\u662f\u5b9e\u6218\u6848\u4f8b\uff0c\u4e00\u8d77\u6765\u770b\u4e00\u4e0b\u3002<\/p>\n<p style=\"text-align: left\">\u5185\u5d4c\u5728\u5fae\u4fe1\u4e2d\u7684\u7f51\u9875\uff0c\u53f3\u4e0a\u89d2\u90fd\u4f1a\u6709\u4e00\u4e2a\u9ed8\u8ba4\u7684\u5206\u4eab\u529f\u80fd\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u7b2c\u4e00\u4e2a\u4e3a\u81ea\u5b9a\u4e49\u7684\u6548\u679c\uff0c\u7b2c\u4e8c\u4e2a\u4e3a\u9ed8\u8ba4\u7684\u6548\u679c\u3002\u5b9e\u73b0\u4e86\u81ea\u5b9a\u4e49\u7684\u5206\u4eab\u94fe\u63a5\u662f\u4e0d\u662f\u66f4\u8ba9\u4eba\u6709\u70b9\u51fb\u7684\u6b32\u671b\uff1f\u4e0b\u9762\u8bb2\u89e3\u4e0b\u5f00\u53d1\u7684\u8fc7\u7a0b\u3002<\/p>\n<p style=\"text-align: left\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/061\/021\/fe2b7a470830446ac99291cdc9e3140e-0.png\" style=\"max-width:90%\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\u63d2\u56fe\" alt=\"\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\u63d2\u56fe\" \/><\/p>\n<h2>\u4e00\u3001\u51c6\u5907\uff0c\u8bbe\u7f6ejs\u63a5\u53e3\u5b89\u5168\u57df\u540d<\/h2>\n<p style=\"text-align: left\">\u8fd9\u9700\u8981\u4f7f\u7528\u5fae\u4fe1\u7684jssdk\uff0c\u5148\u9700\u8981\u5728\u5fae\u4fe1\u516c\u4f17\u53f7\u540e\u53f0\u8fdb\u884c\u8bbe\u7f6e\uff1a\u516c\u4f17\u53f7\u8bbe\u7f6e&#8211;&gt;\u529f\u80fd\u8bbe\u7f6e&#8211;&gt;JS\u63a5\u53e3\u5b89\u5168\u57df\u540d\u3002\u6253\u5f00\u8fd9\u4e2a\u9875\u9762\u4e4b\u540e\u4f60\u4f1a\u770b\u5230\u4e0b\u9762\u7684\u63d0\u793a\u3002\u9700\u8981\u5148\u4e0b\u8f7d\u8fd9\u4e2a\u6587\u4ef6\u5e76\u4e0a\u4f20\u5230\u6307\u5b9a\u57df\u540d\u7684\u6839\u76ee\u5f55\u3002<\/p>\n<p style=\"text-align: left\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/061\/021\/be9d109917c2bd257a934537102e5572-1.png\" style=\"max-width:90%\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\u63d2\u56fe1\" alt=\"\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\u63d2\u56fe1\" \/><\/p>\n<p style=\"text-align: left\">\u8fd9\u4e2a\u6587\u4ef6\u91cc\u9762\u662f\u4e00\u4e2a\uff0c\u4ece\u540d\u79f0\u770b\u662f\u7528\u6765\u6821\u9a8c\u7528\u7684\u3002\u5148\u4e0a\u4f20\u4e86\u8fd9\u4e2a\u6587\u4ef6\uff0c\u4f60\u624d\u80fd\u4fdd\u5b58\u6210\u529f\u3002\u8fd9\u6837\u4f60\u5c31\u53ef\u4ee5\u4f7f\u7528jssdk\u4e86\u3002<\/p>\n<h2>&nbsp;\u4e8c\u3001\u524d\u7aef\u914d\u7f6e<\/h2>\n<p style=\"text-align: left\">&nbsp;\u9996\u5148\u8981\u8bf4\u660e\u7684\u662f<span style=\"background-color: #ffff00\">\u5206\u4eab\u529f\u80fd\u662f\u4e00\u4e2a\u914d\u7f6e\u529f\u80fd\uff0c\u7ed1\u5b9a\u5728\u6309\u94ae\u7684click\u4e8b\u4ef6\u4e2d\u662f\u6ca1\u6709\u6548<\/span>\u679c\u7684\u3002\u4e5f\u5c31\u662f\u8bf4\u53ea\u6709\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u5206\u4eab\u624d\u6709\u6548\u679c(\u6709\u7684\u6587\u5b57\u5185\u5bb9\u5206\u4eab\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u5b9e\u73b0\u7684)\u3002\u5b98\u65b9\u7684js\u6709\u56db\u4e2a\u6b65\u9aa4\uff0c\u9996\u5148\u662f\u5f15\u5165jssdk\uff1a<\/p>\n<pre>&lt;script src=\"http:\/\/res.wx.qq.com\/open\/js\/jweixin-1.1.0.js\"&gt;&lt;\/script&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">\u6839\u636e\u5b98\u65b9\u7684\u914d\u7f6e\u53c2\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u4e00\u4e2aWXShareModel\u5bf9\u8c61:<\/p>\n<pre>   public class WXShareModel\r\n    {        public string appId { get; set; }        public string nonceStr { get; set; }        public long timestamp { get; set; }        public string signature { get; set; }        public string ticket { get; set; }        public string url { get; set; }        public void MakeSign()\r\n        {             var string1Builder = new StringBuilder();\r\n             string1Builder.Append(\"jsapi_ticket=\").Append(ticket).Append(\"&amp;\")\r\n                          .Append(\"noncestr=\").Append(nonceStr).Append(\"&amp;\")\r\n                          .Append(\"timestamp=\").Append(timestamp).Append(\"&amp;\")\r\n                          .Append(\"url=\").Append(url.IndexOf(\"#\") &gt;= 0 ? url.Substring(0, url.IndexOf(\"#\")) : url);            var string1 = string1Builder.ToString();\r\n            signature = Util.Sha1(string1, Encoding.Default);\r\n        }\r\n    }<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">\u7136\u540e\u662f\u8fdb\u884c\u914d\u7f6e\uff1a<\/p>\n<pre>wx.config({\r\n        debug: true, \/\/ \u5f00\u542f\u8c03\u8bd5\u6a21\u5f0f,\u8c03\u7528\u7684\u6240\u6709api\u7684\u8fd4\u56de\u503c\u4f1a\u5728\u5ba2\u6237\u7aefalert\u51fa\u6765\uff0c\u82e5\u8981\u67e5\u770b\u4f20\u5165\u7684\u53c2\u6570\uff0c\u53ef\u4ee5\u5728pc\u7aef\u6253\u5f00\uff0c\u53c2\u6570\u4fe1\u606f\u4f1a\u901a\u8fc7log\u6253\u51fa\uff0c\u4ec5\u5728pc\u7aef\u65f6\u624d\u4f1a\u6253\u5370\u3002\r\n        appId: '@Model.appId', \/\/ \u5fc5\u586b\uff0c\u516c\u4f17\u53f7\u7684\u552f\u4e00\u6807\u8bc6\r\n        timestamp: '@Model.timestamp', \/\/ \u5fc5\u586b\uff0c\u751f\u6210\u7b7e\u540d\u7684\u65f6\u95f4\u6233\r\n        nonceStr: '@Model.nonceStr', \/\/ \u5fc5\u586b\uff0c\u751f\u6210\u7b7e\u540d\u7684\u968f\u673a\u4e32\r\n        signature: '@Model.signature',\/\/ \u5fc5\u586b\uff0c\u7b7e\u540d\uff0c\u89c1\u9644\u5f551\r\n        jsApiList: [\"checkJsApi\", \"onMenuShareTimeline\", \"onMenuShareAppMessage\", \"onMenuShareQQ\", \"onMenuShareQZone\"] \/\/ \u5fc5\u586b\uff0c\u9700\u8981\u4f7f\u7528\u7684JS\u63a5\u53e3\u5217\u8868\uff0c\u6240\u6709JS\u63a5\u53e3\u5217\u8868\u89c1\u9644\u5f552    });\r\n    wx.ready(function () {\r\n        document.querySelector('#checkJsApi').onclick = function () {\r\n            wx.checkJsApi({\r\n                jsApiList: [            'getNetworkType',            'previewImage'\r\n                ],\r\n                success: function (res) {\r\n                    alert(JSON.stringify(res));\r\n                }\r\n            });\r\n        };\r\n\u3000\u3000\u3000\u3000\/\/\u670b\u53cb\u5708        wx.onMenuShareTimeline({\r\n            title: '\u6696\u6728\u79d1\u6280', \/\/ \u5206\u4eab\u6807\u9898\r\n            link: 'http:\/\/www.warmwood.com\/home\/lampindex', \/\/ \u5206\u4eab\u94fe\u63a5\r\n            imgUrl: 'http:\/\/www.warmwood.com\/images\/s1.jpg',\r\n            success: function (res) {\r\n                alert('\u5df2\u5206\u4eab');\r\n            },\r\n            cancel: function (res) {\r\n                alert('\u5df2\u53d6\u6d88');\r\n            },\r\n            fail: function (res) {\r\n                alert(JSON.stringify(res));\r\n            }\r\n        });        \/\/\u670b\u53cb        wx.onMenuShareAppMessage({\r\n            title: '\u6696\u6728\u79d1\u6280', \/\/ \u5206\u4eab\u6807\u9898\r\n            desc: '\u5b9d\u5b9d\u7684\u7761\u7720\u5f88\u91cd\u8981\uff0c\u4f60\u7684\u7761\u7720\u4e5f\u5f88\u91cd\u8981', \/\/ \u5206\u4eab\u63cf\u8ff0\r\n            link: 'http:\/\/www.warmwood.com\/home\/lampindex', \/\/ \u5206\u4eab\u94fe\u63a5\r\n            imgUrl: 'http:\/\/www.warmwood.com\/images\/s1.jpg', \/\/ \u5206\u4eab\u56fe\u6807\r\n            type: '', \/\/ \u5206\u4eab\u7c7b\u578b,music\u3001video\u6216link\uff0c\u4e0d\u586b\u9ed8\u8ba4\u4e3alink\r\n            dataUrl: '', \/\/ \u5982\u679ctype\u662fmusic\u6216video\uff0c\u5219\u8981\u63d0\u4f9b\u6570\u636e\u94fe\u63a5\uff0c\u9ed8\u8ba4\u4e3a\u7a7a\r\n            success: function () {                \/\/ \u7528\u6237\u786e\u8ba4\u5206\u4eab\u540e\u6267\u884c\u7684\u56de\u8c03\u51fd\u6570\r\n                alert(\"\u5206\u4eab\");\r\n            },\r\n            cancel: function () {                \/\/ \u7528\u6237\u53d6\u6d88\u5206\u4eab\u540e\u6267\u884c\u7684\u56de\u8c03\u51fd\u6570\r\n                alert(\"\u53d6\u6d88\u5206\u4eab\");\r\n            }\r\n        });\r\n    });<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">\u7136\u540e\u5269\u4e0b\u5c31\u662f\u540e\u7aef\u7684\u4e8b\u60c5\u4e86\u3002\u540e\u7aef\u7684\u5173\u952e\u662f\u83b7\u53d6access_token\u548cjsapi_ticket\u4ee5\u53ca\u751f\u6210\u6b63\u786e\u7684\u7b7e\u540d\u3002\u53e6\u5916\u5982\u679c\u8981\u7edf\u8ba1\u5206\u4eab\u7684\u6570\u91cf\uff0c\u6700\u597d\u5c31\u662f\u5728success\u65b9\u6cd5\u4e2d\u8fdb\u884c\u7edf\u8ba1\u4e86\u3002<\/p>\n<h2>\u4e09\u3001\u751f\u6210\u7b7e\u540d<\/h2>\n<h3>1.access_token&nbsp;<\/h3>\n<p style=\"text-align: left\">\u83b7\u53d6access_token\u65b9\u6cd5\u5168\u5e73\u53f0\u90fd\u662f\u4e00\u81f4\u7684\u3002<\/p>\n<pre>public const string AccessTokenUrl = \"https:\/\/api.weixin.qq.com\/cgi-bin\/token?grant_type=client_credential&amp;appid={0}&amp;secret={1}\";<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre> public TokenResult GetAccessToken()\r\n        {            var url = string.Format(WxDeviceConfig.AccessTokenUrl, WxDeviceConfig.AppId, WxDeviceConfig.APPSECRET);            var res = SendHelp.Send&lt;TokenResult&gt;(null, url, null, CommonJsonSendType.GET);            return res;\r\n        }<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">access_token\u7684\u8d85\u65f6\u65f6\u95f4\u662f7200\u79d2\uff0c\u6240\u4ee5\u5148\u53ef\u4ee5\u7f13\u5b58\u8d77\u6765\u3002SendHelp\u6587\u7ae0\u672b\u5c3e\u53ef\u4e0b\u8f7d<\/p>\n<h3>2.\u83b7\u53d6jsapi_ticket<\/h3>\n<p style=\"text-align: left\">access_token\u7684\u4f5c\u7528\u5c31\u662f\u4e3a\u4e86\u83b7\u53d6jsapi_ticket\u3002\u7528get\u65b9\u5f0f\u83b7\u53d6\uff0curl:https:\/\/api.weixin.qq.com\/cgi-bin\/ticket\/getticket?access_token=ACCESS_TOKEN&amp;type=jsapi,\u8fd4\u56de\u7684JSON\u5bf9\u8c61\u5982\u4e0b\u3002<\/p>\n<pre>{\"errcode\":0,\"errmsg\":\"ok\",\"ticket\":\"bxLdikRXVbTPdHSM05e5u5sUoXNKd8-41ZO3MhKoyN5OfkWITDGgnr2fwJ0m9E8NYzWKVZvdVtaUgWvsdshFKA\",\"expires_in\":7200}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">\u6240\u4ee5\u53ef\u4ee5\u5b9a\u4e49\u4e00\u4e2a\u6a21\u578b\uff1a<\/p>\n<pre>public class jsapiTicketModel\r\n    {        public string errcode { get; set; }        public string errmsg { get; set; }        public string ticket { get; set; }        public string expires_in { get; set; }\r\n    }<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">\u518d\u5b8c\u6210\u83b7\u53d6ticket\u7684\u65b9\u6cd5\uff1a<\/p>\n<pre> public jsapiTicketModel GetJsApiTicket(string accessToken)\r\n        {            var url = string.Format(WxPayConfig.Jsapi_ticketUrl, accessToken);            return SendHelp.Send&lt;jsapiTicketModel&gt;(accessToken, url, \"\", CommonJsonSendType.GET);\r\n        }<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">ticket\u8fc7\u671f\u65f6\u95f4\u4e5f\u662f7200\u79d2\uff0c\u5e76\u4e14\u4e0d\u80fd\u9891\u7e41\u7684\u8bf7\u6c42\uff0c\u6240\u4ee5\u4e5f\u9700\u8981\u518d\u670d\u52a1\u7aef\u7f13\u5b58\u8d77\u6765\u3002<\/p>\n<pre> private void setCacheTicket(string cache)\r\n        {\r\n            _cacheManager.Set(tokenKey, cache, 7200);\r\n        }<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">MemoryCacheManager\uff1a<\/p>\n<p style=\"text-align: left\">View Code<\/p>\n<h3>3.\u7b7e\u540d<\/h3>\n<p style=\"text-align: left\">\u7ec8\u4e8e\u5230\u8fd9\u4e00\u6b65\u4e86\uff0c\u7136\u540e\u4f60\u5728\u6587\u6863\u4e2d\u770b\u5230\u8ba9\u4f60\u5931\u671b\u7684\u4e00\u5e55\uff1a<\/p>\n<p style=\"text-align: left\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/061\/021\/be9d109917c2bd257a934537102e5572-3.png\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\u63d2\u56fe2\" alt=\"\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\u63d2\u56fe2\" \/><\/p>\n<p style=\"text-align: left\">\u4e48\u6709C#\u7684demo\uff0c\u652f\u4ed8\u90a3\u8fb9\u90fd\u63d0\u4f9b\u4e86\uff0c\u4e3a\u5565jssdk\u6ca1\u6709\u63d0\u4f9b\uff0c\u597d\u5427\u5148\u4e0d\u5410\u69fd\u4e86\u3002\u5b98\u65b9\u4e5f\u8bf4\u660e\u767d\u7b7e\u540d\u7684\u89c4\u5219\u3002\u4e00\u5f00\u59cb\u6211\u4f7f\u7528\u7684\u662fhttps:\/\/github.com\/night-king\/weixinSDK\u4e2d\u7684\u7b7e\u540d\uff1a<\/p>\n<pre> public static string Sha1(string orgStr, string encode = \"UTF-8\")\r\n        {            var sha1 = new SHA1Managed();            var sha1bytes = System.Text.Encoding.GetEncoding(encode).GetBytes(orgStr);            byte[] resultHash = sha1.ComputeHash(sha1bytes);            string sha1String = BitConverter.ToString(resultHash).ToLower();\r\n            sha1String = sha1String.Replace(\"-\", \"\");            return sha1String;\r\n        }\/\/\u9519\u8bef\u793a\u4f8b<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">\u5f97\u51fa\u7684\u7ed3\u679c\u548c\u5b98\u65b9\u6821\u9a8c\u7684\u4e0d\u4e00\u81f4\uff0c\u4e00\u76f4\u63d0\u793a\u7b7e\u540d\u9519\u8bef\u3002<\/p>\n<p style=\"text-align: left\">&nbsp;<img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/061\/021\/be9d109917c2bd257a934537102e5572-4.png\" style=\"max-width:90%\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\u63d2\u56fe3\" alt=\"\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\u63d2\u56fe3\" \/><\/p>\n<p style=\"text-align: left\">&nbsp;\u6b63\u786e\u7684\u5199\u6cd5\u662f\uff1a<\/p>\n<pre>public static string Sha1(string orgStr, Encoding encode)\r\n        {\r\n            SHA1 sha1 = new SHA1CryptoServiceProvider();            byte[] bytes_in = encode.GetBytes(orgStr);            byte[] bytes_out = sha1.ComputeHash(bytes_in);\r\n            sha1.Dispose();            string result = BitConverter.ToString(bytes_out);\r\n            result = result.Replace(\"-\", \"\");            return result;  \r\n        }<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">\u548c\u5b98\u65b9\u6821\u9a8c\u7684\u7ed3\u679c\u4e00\u76f4\u540e\uff0c\u5c31ok\u4e86\uff08\u5ffd\u7565\u5927\u5c0f\u5199\uff09\u3002\u53e6\u5916\u4e00\u4e2a\u9700\u8981\u6ce8\u610f\u7684\u5730\u65b9\u662f\u7b7e\u540d\u4e2d\u7684url\u3002\u5982\u679c\u9875\u9762\u6709\u53c2\u6570\uff0cmodel\u4e2d\u7684url\u4e5f\u9700\u8981\u5e26\u53c2\u6570\uff0c#\u53f7\u540e\u9762\u7684\u4e0d\u8981\u3002\u4e0d\u7136\u4e5f\u662f\u4f1a\u62a5\u7b7e\u540d\u9519\u8bef\u3002<\/p>\n<pre> public ActionResult H5Share()\r\n        {            var model = new WXShareModel();\r\n            model.appId = WxPayConfig.APPID;\r\n            model.nonceStr = WxPayApi.GenerateNonceStr();\r\n            model.timestamp = Util.CreateTimestamp();\r\n            model.ticket = GetTicket();\r\n            model.url = \"http:\/\/www.warmwood.com\/AuthWeiXin\/share\";\/\/ domain + Request.Url.PathAndQuery;            model.MakeSign();\r\n            Logger.Debug(\"\u83b7\u53d6\u5230ticket:\" + model.ticket);\r\n            Logger.Debug(\"\u83b7\u53d6\u5230\u7b7e\u540d:\" + model.signature);            return View(model);\r\n        }<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u56db\u3001\u5c0f\u7ed3<\/h2>\n<p style=\"text-align: left\">wx.config\u4e2d\u7684debug\u4e3atrue\u4f1aalert\u5404\u79cd\u64cd\u4f5c\u7ed3\u679c\u3002\u53c2\u6570\u6b63\u786e\u4e4b\u540e\u754c\u9762\u4f1a\u63d0\u793a\uff1a<\/p>\n<p style=\"text-align: left\">&nbsp;<img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/061\/021\/be9d109917c2bd257a934537102e5572-5.png\" style=\"max-width:90%\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\u63d2\u56fe4\" alt=\"\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\u63d2\u56fe4\" \/><\/p>\n<p style=\"text-align: left\">\u81f3\u6b64\uff0c\u5206\u4eab\u7684\u529f\u80fd\u5c31ok\u4e86\u3002\u4e5f\u5c31\u6253\u5f00\u4e86\u8c03\u7528\u5176\u4ed6jssdk\u7684\u5927\u95e8\u3002\u53e6\u5916\u6587\u4e2d\u7684SendHelp\u5bf9\u8c61\u662f\u7528\u7684Senparc&nbsp;(\u57fa\u4e8e.net4.5)\u7684dll\u3002<\/p>\n<p>\u76f8\u4fe1\u770b\u4e86\u672c\u6587\u6848\u4f8b\u4f60\u5df2\u7ecf\u638c\u63e1\u4e86\u65b9\u6cd5\uff0c\u66f4\u591a\u7cbe\u5f69\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n<p>\u63a8\u8350\u9605\u8bfb\uff1a<\/p>\n<p style=\"text-align: left\"><\/p>\n<p style=\"text-align: left\"><\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u6b21\u7ed9\u5927\u5bb6\u5e26\u6765\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u7684\u5f00\u53d1\uff0c\u5fae\u4fe1\u5206\u4eab\u529f\u80fd\u5f00\u53d1\u7684\u6709\u54ea\u4e9b\uff0c\u4e0b\u9762\u5c31\u662f\u5b9e\u6218\u6848\u4f8b\uff0c\u4e00\u8d77\u6765\u770b\u4e00\u4e0b\u3002 \u5185\u5d4c\u5728\u5fae\u4fe1\u4e2d\u7684\u7f51\u9875\uff0c\u53f3\u4e0a\u89d2\u90fd\u4f1a\u6709\u4e00\u4e2a\u9ed8\u8ba4\u7684\u5206\u4eab\u529f\u80fd\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u7b2c\u4e00\u4e2a\u4e3a\u81ea\u5b9a\u4e49\u7684\u6548\u679c\uff0c\u7b2c\u4e8c\u4e2a\u4e3a\u9ed8\u8ba4\u7684\u6548\u679c\u3002\u5b9e\u73b0\u4e86\u81ea\u5b9a\u4e49\u7684\u5206\u4eab\u94fe\u63a5\u662f\u4e0d\u662f\u66f4\u8ba9\u4eba\u6709\u70b9\u51fb\u7684\u6b32\u671b\uff1f\u4e0b\u9762\u8bb2\u89e3\u4e0b\u5f00\u53d1\u7684\u8fc7\u7a0b\u3002 \u4e00\u3001\u51c6\u5907\uff0c\u8bbe\u7f6ejs\u63a5\u53e3\u5b89\u5168\u57df\u540d \u8fd9\u9700\u8981\u4f7f\u7528\u5fae\u4fe1\u7684jssdk\uff0c\u5148\u9700\u8981\u5728\u5fae\u4fe1\u516c\u4f17\u53f7\u540e\u53f0\u8fdb\u884c\u8bbe\u7f6e\uff1a\u516c\u4f17\u53f7\u8bbe\u7f6e&#8211;&gt;\u529f\u80fd\u8bbe\u7f6e&#8211;&gt;JS\u63a5\u53e3\u5b89\u5168\u57df\u540d\u3002\u6253\u5f00\u8fd9\u4e2a\u9875\u9762\u4e4b\u540e\u4f60\u4f1a\u770b\u5230\u4e0b\u9762\u7684\u63d0\u793a\u3002\u9700\u8981\u5148\u4e0b\u8f7d\u8fd9\u4e2a\u6587\u4ef6\u5e76\u4e0a\u4f20\u5230\u6307\u5b9a\u57df\u540d\u7684\u6839\u76ee\u5f55\u3002 \u8fd9\u4e2a\u6587\u4ef6\u91cc\u9762\u662f\u4e00\u4e2a\uff0c\u4ece\u540d\u79f0\u770b\u662f\u7528\u6765\u6821\u9a8c\u7528\u7684\u3002\u5148\u4e0a\u4f20\u4e86\u8fd9\u4e2a\u6587\u4ef6\uff0c\u4f60\u624d\u80fd\u4fdd\u5b58\u6210\u529f\u3002\u8fd9\u6837\u4f60\u5c31\u53ef\u4ee5\u4f7f\u7528jssdk\u4e86\u3002 &nbsp;\u4e8c\u3001\u524d\u7aef\u914d\u7f6e &nbsp;\u9996\u5148\u8981\u8bf4\u660e\u7684\u662f\u5206\u4eab\u529f\u80fd\u662f\u4e00\u4e2a\u914d\u7f6e\u529f\u80fd\uff0c\u7ed1\u5b9a\u5728\u6309\u94ae\u7684click\u4e8b\u4ef6\u4e2d\u662f\u6ca1\u6709\u6548\u679c\u7684\u3002\u4e5f\u5c31\u662f\u8bf4\u53ea\u6709\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u5206\u4eab\u624d\u6709\u6548\u679c(\u6709\u7684\u6587\u5b57\u5185\u5bb9\u5206\u4eab\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u5b9e\u73b0\u7684)\u3002\u5b98\u65b9\u7684js\u6709\u56db\u4e2a\u6b65\u9aa4\uff0c\u9996\u5148\u662f\u5f15\u5165jssdk\uff1a &lt;script src=&#8221;http:\/\/res.wx.qq.com\/open\/js\/jweixin-1.1.0.js&#8221;&gt;&lt;\/script&gt; \u767b\u5f55\u540e\u590d\u5236 \u6839\u636e\u5b98\u65b9\u7684\u914d\u7f6e\u53c2\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u4e00\u4e2aWXShareModel\u5bf9\u8c61: public class WXShareModel { public string appId { get; set; } public string nonceStr { get; set; } public long timestamp { get; set; } public string signature { get; set; } public string ticket { get; set; } public string url { get; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-31309","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=31309"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31309\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=31309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=31309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=31309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}