{"id":8998,"date":"2022-11-09T09:54:02","date_gmt":"2022-11-09T01:54:02","guid":{"rendered":"https:\/\/sdeno.com\/?p=8998"},"modified":"2022-11-09T10:03:25","modified_gmt":"2022-11-09T02:03:25","slug":"%e5%a4%84%e7%90%86vue%e5%b8%a6%e5%8f%b7%e9%97%ae%e9%a2%98%ef%bc%8chtml%e7%bc%96%e7%a0%81","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=8998","title":{"rendered":"\u5904\u7406vue\u5e26#\u53f7\u95ee\u9898\uff0chtml\u7f16\u7801"},"content":{"rendered":"<p>html\u7f16\u7801<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">encodeURIComponent(\"http:\/\/xxx.com\/#\/1.html\")\r\nhttp%3A%2F%2Fxxx.com%2F%23%2F1.html<\/pre>\n<p>\u76f8\u5e94\u89e3\u7801<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">decodeURIComponent('http%3A%2F%2Fxxx.com%2F%23%2F1.html')\r\n'http:\/\/xxx.com\/#\/1.html'<\/pre>\n<p>&nbsp;<\/p>\n<p>base64\u65b9\u6cd5<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">var Base64 = {\r\n  _keyStr: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+\/=\",\r\n  encode: function(e) {\r\n    var t = \"\";\r\n    var n, r, i, s, o, u, a;\r\n    var f = 0;\r\n    e = Base64._utf8_encode(e);\r\n    while (f &lt; e.length) {\r\n      n = e.charCodeAt(f++);\r\n      r = e.charCodeAt(f++);\r\n      i = e.charCodeAt(f++);\r\n      s = n &gt;&gt; 2;\r\n      o = (n &amp; 3) &lt;&lt; 4 | r &gt;&gt; 4;\r\n      u = (r &amp; 15) &lt;&lt; 2 | i &gt;&gt; 6;\r\n      a = i &amp; 63;\r\n      if (isNaN(r)) {\r\n        u = a = 64\r\n      } else if (isNaN(i)) {\r\n        a = 64\r\n      }\r\n      t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a)\r\n    }\r\n    return t\r\n  },\r\n  decode: function(e) {\r\n    var t = \"\";\r\n    var n, r, i;\r\n    var s, o, u, a;\r\n    var f = 0;\r\n    e = e.replace(\/[^A-Za-z0-9+\/=]\/g, \"\");\r\n    while (f &lt; e.length) {\r\n      s = this._keyStr.indexOf(e.charAt(f++));\r\n      o = this._keyStr.indexOf(e.charAt(f++));\r\n      u = this._keyStr.indexOf(e.charAt(f++));\r\n      a = this._keyStr.indexOf(e.charAt(f++));\r\n      n = s &lt;&lt; 2 | o &gt;&gt; 4;\r\n      r = (o &amp; 15) &lt;&lt; 4 | u &gt;&gt; 2;\r\n      i = (u &amp; 3) &lt;&lt; 6 | a;\r\n      t = t + String.fromCharCode(n);\r\n      if (u != 64) {\r\n        t = t + String.fromCharCode(r)\r\n      }\r\n      if (a != 64) {\r\n        t = t + String.fromCharCode(i)\r\n      }\r\n    }\r\n    t = Base64._utf8_decode(t);\r\n    return t\r\n  },\r\n  _utf8_encode: function(e) {\r\n    e = e.replace(\/rn\/g, \"n\");\r\n    var t = \"\";\r\n    for (var n = 0; n &lt; e.length; n++) {\r\n      var r = e.charCodeAt(n);\r\n      if (r &lt; 128) {\r\n        t += String.fromCharCode(r)\r\n      } else if (r &gt; 127 &amp;&amp; r &lt; 2048) {\r\n        t += String.fromCharCode(r &gt;&gt; 6 | 192);\r\n        t += String.fromCharCode(r &amp; 63 | 128)\r\n      } else {\r\n        t += String.fromCharCode(r &gt;&gt; 12 | 224);\r\n        t += String.fromCharCode(r &gt;&gt; 6 &amp; 63 | 128);\r\n        t += String.fromCharCode(r &amp; 63 | 128)\r\n      }\r\n    }\r\n    return t\r\n  },\r\n  _utf8_decode: function(e) {\r\n    var t = \"\";\r\n    var n = 0;\r\n    var r = c1 = c2 = 0;\r\n    while (n &lt; e.length) {\r\n      r = e.charCodeAt(n);\r\n      if (r &lt; 128) {\r\n        t += String.fromCharCode(r);\r\n        n++\r\n      } else if (r &gt; 191 &amp;&amp; r &lt; 224) {\r\n        c2 = e.charCodeAt(n + 1);\r\n        t += String.fromCharCode((r &amp; 31) &lt;&lt; 6 | c2 &amp; 63);\r\n        n += 2\r\n      } else {\r\n        c2 = e.charCodeAt(n + 1);\r\n        c3 = e.charCodeAt(n + 2);\r\n        t += String.fromCharCode((r &amp; 15) &lt;&lt; 12 | (c2 &amp; 63) &lt;&lt; 6 | c3 &amp; 63);\r\n        n += 3\r\n      }\r\n    }\r\n    return t\r\n  }\r\n}\r\n\r\n\r\n\r\n Base64.encode('http:\/\/xxx.com\/#\/1.html')\/\/\u52a0\u5bc6\r\n Base64.decode('aHR0cDovL3h4eC5jb20vIy8xLmh0bWw=') \/\/\u89e3\u5bc6<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>html\u7f16\u7801 encodeURIComponent(&#8220;http:\/\/xxx.com\/#\/1.html&#8221;) ht [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8998","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/8998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8998"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/8998\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8998"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}