{"id":52779,"date":"2024-12-03T09:47:46","date_gmt":"2024-12-03T01:47:46","guid":{"rendered":"https:\/\/fwq.ai\/blog\/52779\/"},"modified":"2024-12-03T09:47:46","modified_gmt":"2024-12-03T01:47:46","slug":"%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e7%94%a8%e6%88%b7%e7%99%bb%e5%bd%95%e8%bf%87%e6%9c%9f%e5%90%8e%e7%9a%84%e8%87%aa%e5%8a%a8%e9%87%8d%e6%96%b0%e7%99%bb%e5%bd%95%e5%92%8c%e6%9d%83%e9%99%90%e6%8e%a7-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/52779\/","title":{"rendered":"\u5982\u4f55\u5b9e\u73b0\u7528\u6237\u767b\u5f55\u8fc7\u671f\u540e\u7684\u81ea\u52a8\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u5982\u4f55\u5b9e\u73b0\u7528\u6237\u767b\u5f55\u8fc7\u671f\u540e\u7684\u81ea\u52a8\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\uff1f<\/h1>\n<p>\u76ee\u524d\u7c73\u4e91\u4e0a\u5df2\u7ecf\u6709\u5f88\u591a\u5173\u4e8e<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\u7684\u6587\u7ae0\u4e86\uff0c\u81ea\u5df1\u5728\u521d\u6b21\u9605\u8bfb\u8fd9\u4e9b\u6587\u7ae0\u4e2d\uff0c\u4e5f\u89c1\u8bc6\u5230\u4e86\u5f88\u591a\u5b66\u4e60\u601d\u8def\uff1b\u90a3\u4e48\u672c\u6587<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300a\u5982\u4f55\u5b9e\u73b0\u7528\u6237\u767b\u5f55\u8fc7\u671f\u540e\u7684\u81ea\u52a8\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\uff1f\u300b<\/span>\uff0c\u4e5f\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5927\u5bb6\uff0c\u5982\u679c\u9605\u8bfb\u5b8c\u540e\u771f\u7684\u5bf9\u4f60\u5b66\u4e60<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\u6709\u5e2e\u52a9\uff0c\u6b22\u8fce\u52a8\u52a8\u624b\u6307\uff0c\u8bc4\u8bba\u7559\u8a00\u5e76\u5206\u4eab~<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241123\/17323400306741693e40be7.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5b9e\u73b0\u7528\u6237\u767b\u5f55\u8fc7\u671f\u540e\u7684\u81ea\u52a8\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5b9e\u73b0\u7528\u6237\u767b\u5f55\u8fc7\u671f\u540e\u7684\u81ea\u52a8\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u6709\u5173\u767b\u5f55\u8fc7\u671f\u3001\u91cd\u65b0\u767b\u5f55\u53ca\u6743\u9650\u63a7\u5236\u7684\u8bbe\u8ba1<\/strong><\/p>\n<p>\u60a8\u63d0\u51fa\u4e86\u4e00\u4e2a\u6709\u5173\u7528\u6237\u4f1a\u8bdd\u7ba1\u7406\u548c\u6743\u9650\u63a7\u5236\u7684\u9700\u6c42\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u8bbe\u8ba1\u6b64\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<ol>\n<li><strong>\u9a8c\u8bc1\u767b\u5f55\u51ed\u636e\uff1a<\/strong><br \/>\u7528\u6237\u767b\u5f55\u65f6\uff0c\u670d\u52a1\u5668\u8fd4\u56de\u4e00\u4e2a\u5305\u542b\u8fc7\u671f\u65f6\u95f4\u7684\u4ee4\u724c (token)\u3002\u8be5\u4ee4\u724c\u5728\u670d\u52a1\u5668\u7aef\u5b58\u50a8\u3002<\/li>\n<li><strong>\u5ba2\u6237\u7aef\u4ee4\u724c\u9a8c\u8bc1\uff1a<\/strong><br \/>\u5728\u7528\u6237\u6d4f\u89c8\u7f51\u7ad9\u65f6\uff0c\u5ba2\u6237\u7aef\uff08\u6d4f\u89c8\u5668\uff09\u4f1a\u5b9a\u671f\u5411\u670d\u52a1\u5668\u53d1\u9001\u4ee4\u724c\u8fdb\u884c\u9a8c\u8bc1\u3002<\/li>\n<li><strong>\u4ee4\u724c\u8fc7\u671f\u5904\u7406\uff1a<\/strong><br \/>\u5982\u679c\u4ee4\u724c\u9a8c\u8bc1\u5931\u8d25\uff0c\u5ba2\u6237\u7aef\u4f1a\u5c06\u7528\u6237\u91cd\u65b0\u5b9a\u5411\u5230\u767b\u5f55\u9875\u9762\u3002<\/li>\n<li><strong>\u6743\u9650\u63a7\u5236\uff1a<\/strong><br \/>\u6839\u636e\u7528\u6237\u7684\u6743\u9650\u7b49\u7ea7\uff0c\u6e32\u67d3\u4e0d\u540c\u7684\u9875\u9762\u548c\u529f\u80fd\u3002<\/li>\n<\/ol>\n<p><strong>\u4ee3\u7801\u5b9e\u73b0\u793a\u4f8b\uff1a<\/strong><\/p>\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b javascript \u4ee3\u7801\u5b9a\u671f\u68c0\u67e5\u4ee4\u724c\uff1a<\/p>\n<pre>function checkuuid() {\n  var uuid = getCookie(\"uuid\");\n  $.ajax({\n    type: \"GET\",\n    url: \"http:\/\/127.0.0.1:8081\/projectname\/checkuuid?uuid=\" + uuid,\n    async: true,\n    crossDomain: true,\n    dataType: \"jsonp\",\n    jsonp: \"callback\",\n    beforeSend: function() {},\n    success: function(data) {\n      if (data.success == false) {\n        window.location.href = \"login.htm\";\n      }\n    },\n    error: function() {\n      window.location.href = \"login.htm\";\n    }\n  });\n}<\/pre>\n<p>\u7ec8\u4e8e\u4ecb\u7ecd\u5b8c\u5566\uff01\u5c0f\u4f19\u4f34\u4eec\uff0c\u8fd9\u7bc7\u5173\u4e8e\u300a\u5982\u4f55\u5b9e\u73b0\u7528\u6237\u767b\u5f55\u8fc7\u671f\u540e\u7684\u81ea\u52a8\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\uff1f\u300b\u7684\u4ecb\u7ecd\u5e94\u8be5\u8ba9\u4f60\u6536\u83b7\u591a\u591a\u4e86\u5427\uff01\u6b22\u8fce\u5927\u5bb6\u6536\u85cf\u6216\u5206\u4eab\u7ed9\u66f4\u591a\u9700\u8981\u5b66\u4e60\u7684\u670b\u53cb\u5427~\u7c73\u4e91\u516c\u4f17\u53f7\u4e5f\u4f1a\u53d1\u5e03\u6587\u7ae0\u76f8\u5173\u77e5\u8bc6\uff0c\u5feb\u6765\u5173\u6ce8\u5427\uff01<\/p>\n<dl>\n<dt><\/dt>\n<dd>\n   Python \u8f6c\u7801 UTF-8 \u540e\u4ecd\u51fa\u73b0\u7f16\u7801\u9519\u8bef\uff1a\u5982\u4f55\u89e3\u51b3\u201c\\&#8217;gbk\\&#8217; \u7f16\u89e3\u7801\u5668\u65e0\u6cd5\u89e3\u7801\u201d\uff1f\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5b9e\u73b0\u7528\u6237\u767b\u5f55\u8fc7\u671f\u540e\u7684\u81ea\u52a8\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\uff1f \u76ee\u524d\u7c73\u4e91\u4e0a\u5df2\u7ecf\u6709\u5f88\u591a\u5173\u4e8e\u6587\u7ae0\u7684\u6587\u7ae0\u4e86\uff0c\u81ea\u5df1\u5728\u521d\u6b21\u9605\u8bfb\u8fd9\u4e9b\u6587\u7ae0\u4e2d\uff0c\u4e5f\u89c1\u8bc6\u5230\u4e86\u5f88\u591a\u5b66\u4e60\u601d\u8def\uff1b\u90a3\u4e48\u672c\u6587\u300a\u5982\u4f55\u5b9e\u73b0\u7528\u6237\u767b\u5f55\u8fc7\u671f\u540e\u7684\u81ea\u52a8\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\uff1f\u300b\uff0c\u4e5f\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5927\u5bb6\uff0c\u5982\u679c\u9605\u8bfb\u5b8c\u540e\u771f\u7684\u5bf9\u4f60\u5b66\u4e60\u6587\u7ae0\u6709\u5e2e\u52a9\uff0c\u6b22\u8fce\u52a8\u52a8\u624b\u6307\uff0c\u8bc4\u8bba\u7559\u8a00\u5e76\u5206\u4eab~ \u6709\u5173\u767b\u5f55\u8fc7\u671f\u3001\u91cd\u65b0\u767b\u5f55\u53ca\u6743\u9650\u63a7\u5236\u7684\u8bbe\u8ba1 \u60a8\u63d0\u51fa\u4e86\u4e00\u4e2a\u6709\u5173\u7528\u6237\u4f1a\u8bdd\u7ba1\u7406\u548c\u6743\u9650\u63a7\u5236\u7684\u9700\u6c42\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u8bbe\u8ba1\u6b64\u89e3\u51b3\u65b9\u6848\uff1a \u9a8c\u8bc1\u767b\u5f55\u51ed\u636e\uff1a\u7528\u6237\u767b\u5f55\u65f6\uff0c\u670d\u52a1\u5668\u8fd4\u56de\u4e00\u4e2a\u5305\u542b\u8fc7\u671f\u65f6\u95f4\u7684\u4ee4\u724c (token)\u3002\u8be5\u4ee4\u724c\u5728\u670d\u52a1\u5668\u7aef\u5b58\u50a8\u3002 \u5ba2\u6237\u7aef\u4ee4\u724c\u9a8c\u8bc1\uff1a\u5728\u7528\u6237\u6d4f\u89c8\u7f51\u7ad9\u65f6\uff0c\u5ba2\u6237\u7aef\uff08\u6d4f\u89c8\u5668\uff09\u4f1a\u5b9a\u671f\u5411\u670d\u52a1\u5668\u53d1\u9001\u4ee4\u724c\u8fdb\u884c\u9a8c\u8bc1\u3002 \u4ee4\u724c\u8fc7\u671f\u5904\u7406\uff1a\u5982\u679c\u4ee4\u724c\u9a8c\u8bc1\u5931\u8d25\uff0c\u5ba2\u6237\u7aef\u4f1a\u5c06\u7528\u6237\u91cd\u65b0\u5b9a\u5411\u5230\u767b\u5f55\u9875\u9762\u3002 \u6743\u9650\u63a7\u5236\uff1a\u6839\u636e\u7528\u6237\u7684\u6743\u9650\u7b49\u7ea7\uff0c\u6e32\u67d3\u4e0d\u540c\u7684\u9875\u9762\u548c\u529f\u80fd\u3002 \u4ee3\u7801\u5b9e\u73b0\u793a\u4f8b\uff1a \u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b javascript \u4ee3\u7801\u5b9a\u671f\u68c0\u67e5\u4ee4\u724c\uff1a function checkuuid() { var uuid = getCookie(&#8220;uuid&#8221;); $.ajax({ type: &#8220;GET&#8221;, url: &#8220;http:\/\/127.0.0.1:8081\/projectname\/checkuuid?uuid=&#8221; + uuid, async: true, crossDomain: true, dataType: &#8220;jsonp&#8221;, jsonp: &#8220;callback&#8221;, beforeSend: function() {}, success: function(data) { if (data.success == false) { window.location.href = &#8220;login.htm&#8221;; } }, error: function() { window.location.href [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-52779","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52779","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=52779"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52779\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=52779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=52779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=52779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}