{"id":1505,"date":"2024-11-10T15:22:31","date_gmt":"2024-11-10T07:22:31","guid":{"rendered":"https:\/\/fwq.ai\/blog\/1505\/"},"modified":"2024-11-10T15:22:31","modified_gmt":"2024-11-10T07:22:31","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%e8%87%aa%e5%8a%a8%e8%b7%b3%e8%bd%ac%e3%80%81%e9%87%8d%e6%96%b0%e7%99%bb%e5%bd%95%e5%92%8c%e6%9d%83%e9%99%90","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/1505\/","title":{"rendered":"\u5982\u4f55\u5b9e\u73b0\u7528\u6237\u767b\u5f55\u8fc7\u671f\u81ea\u52a8\u8df3\u8f6c\u3001\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173045044163860.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5b9e\u73b0\u7528\u6237\u767b\u5f55\u8fc7\u671f\u81ea\u52a8\u8df3\u8f6c\u3001\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5b9e\u73b0\u7528\u6237\u767b\u5f55\u8fc7\u671f\u81ea\u52a8\u8df3\u8f6c\u3001\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u767b\u5f55\u8fc7\u671f\u3001\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236<\/strong><\/p>\n<p>\u5728\u5f00\u53d1\u9879\u76ee\u65f6\uff0c\u6211\u4eec\u7ecf\u5e38\u4f1a\u9047\u5230\u7528\u6237\u767b\u5f55\u540e\u9700\u8981\u6301\u7eed\u9a8c\u8bc1\u5176\u8eab\u4efd\u5e76\u63a7\u5236\u5176\u6743\u9650\u7684\u60c5\u51b5\u3002\u5f53\u7528\u6237\u767b\u5f55\u65f6\uff0c\u540e\u53f0\u4e00\u822c\u4f1a\u8fd4\u56de\u4e00\u4e2a token\uff0c\u5176\u4e2d\u5305\u542b\u7528\u6237\u7684\u8fc7\u671f\u65f6\u95f4\u3002\u5bf9\u4e8e\u672c\u95ee\u9898\u63d0\u51fa\u7684\u9700\u6c42\uff0c\u6211\u4eec\u9700\u8981\u8bbe\u8ba1\u4e00\u4e2a\u673a\u5236\uff0c\u5f53\u7528\u6237\u7684 token \u8fc7\u671f\u65f6\uff0c\u65e0\u8bba\u4ed6\u4eec\u6b63\u5728\u64cd\u4f5c\u9875\u9762\u7684\u54ea\u4e2a\u90e8\u5206\uff0c\u90fd\u80fd\u8df3\u8f6c\u5230\u767b\u5f55\u9875\u9762\uff0c\u5e76\u6839\u636e\u4e0d\u540c\u7684\u8d26\u53f7\u6743\u9650\u6e32\u67d3\u51fa\u4e0d\u540c\u7684\u529f\u80fd\u3002<\/p>\n<p>\u4e3a\u4e86\u6ee1\u8db3\u6b64\u9700\u6c42\uff0c\u53ef\u4ee5\u91c7\u7528\u4ee5\u4e0b\u8bbe\u8ba1\u65b9\u6848\uff1a<\/p>\n<p>\u7f16\u5199\u4e00\u4e2a\u5b9a\u65f6\u4efb\u52a1\u51fd\u6570 checkuuid()\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>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728\u9875\u9762\u7684\u5408\u9002\u4f4d\u7f6e\u8c03\u7528 checkuuid() \u51fd\u6570\uff0c\u5b83\u5c06\u5b9a\u671f\u5411\u540e\u53f0\u53d1\u9001\u8bf7\u6c42\uff0c\u68c0\u67e5 token \u662f\u5426\u8fc7\u671f\u3002\u5982\u679c token \u8fc7\u671f\uff0c\u7528\u6237\u5c06\u88ab\u91cd\u5b9a\u5411\u5230\u767b\u5f55\u9875\u9762\u3002<\/p>\n<p>\u540c\u65f6\uff0c\u5728\u540e\u53f0\u7cfb\u7edf\u4e2d\u5b9e\u73b0\u6743\u9650\u63a7\u5236\u903b\u8f91\uff0c\u6839\u636e\u4e0d\u540c\u7684\u8d26\u53f7\u6743\u9650\u6e32\u67d3\u4e0d\u540c\u7684\u529f\u80fd\u3002\u5f53\u7528\u6237\u767b\u5f55\u540e\uff0c\u53ef\u4ee5\u5c06\u7528\u6237\u7684\u6743\u9650\u4fe1\u606f\u5b58\u50a8\u5728 cookie \u6216\u5176\u4ed6\u65b9\u5f0f\u4e2d\uff0c\u7136\u540e\u5728\u6e32\u67d3\u9875\u9762\u65f6\u6839\u636e\u8fd9\u4e9b\u4fe1\u606f\u51b3\u5b9a\u663e\u793a\u54ea\u4e9b\u529f\u80fd\u3002<\/p>\n<p>\u91c7\u7528\u8fd9\u79cd\u8bbe\u8ba1\u65b9\u6848\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u5904\u7406\u7528\u6237\u767b\u5f55\u8fc7\u671f\u3001\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\u95ee\u9898\uff0c\u786e\u4fdd\u7cfb\u7edf\u7684\u5b89\u5168\u6027\u5e76\u6ee1\u8db3\u4e1a\u52a1\u9700\u6c42\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5b9e\u73b0\u7528\u6237\u767b\u5f55\u8fc7\u671f\u81ea\u52a8\u8df3\u8f6c\u3001\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\uff1f\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>\u5982\u4f55\u5904\u7406\u767b\u5f55\u8fc7\u671f\u3001\u91cd\u65b0\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236 \u5728\u5f00\u53d1\u9879\u76ee\u65f6\uff0c\u6211\u4eec\u7ecf\u5e38\u4f1a\u9047\u5230\u7528\u6237\u767b\u5f55\u540e\u9700\u8981\u6301\u7eed\u9a8c\u8bc1\u5176\u8eab\u4efd\u5e76\u63a7\u5236\u5176\u6743\u9650\u7684\u60c5\u51b5\u3002\u5f53\u7528\u6237\u767b\u5f55\u65f6\uff0c\u540e\u53f0\u4e00\u822c\u4f1a\u8fd4\u56de\u4e00\u4e2a token\uff0c\u5176\u4e2d\u5305\u542b\u7528\u6237\u7684\u8fc7\u671f\u65f6\u95f4\u3002\u5bf9\u4e8e\u672c\u95ee\u9898\u63d0\u51fa\u7684\u9700\u6c42\uff0c\u6211\u4eec\u9700\u8981\u8bbe\u8ba1\u4e00\u4e2a\u673a\u5236\uff0c\u5f53\u7528\u6237\u7684 token \u8fc7\u671f\u65f6\uff0c\u65e0\u8bba\u4ed6\u4eec\u6b63\u5728\u64cd\u4f5c\u9875\u9762\u7684\u54ea\u4e2a\u90e8\u5206\uff0c\u90fd\u80fd\u8df3\u8f6c\u5230\u767b\u5f55\u9875\u9762\uff0c\u5e76\u6839\u636e\u4e0d\u540c\u7684\u8d26\u53f7\u6743\u9650\u6e32\u67d3\u51fa\u4e0d\u540c\u7684\u529f\u80fd\u3002 \u4e3a\u4e86\u6ee1\u8db3\u6b64\u9700\u6c42\uff0c\u53ef\u4ee5\u91c7\u7528\u4ee5\u4e0b\u8bbe\u8ba1\u65b9\u6848\uff1a \u7f16\u5199\u4e00\u4e2a\u5b9a\u65f6\u4efb\u52a1\u51fd\u6570 checkuuid()\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 = &#8220;login.htm&#8221;; [&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-1505","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1505","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=1505"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1505\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=1505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=1505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=1505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}