{"id":51405,"date":"2025-08-10T22:19:27","date_gmt":"2025-08-10T14:19:27","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/51405.html"},"modified":"2025-08-10T22:19:27","modified_gmt":"2025-08-10T14:19:27","slug":"%e6%b7%b1%e5%ba%a6%e6%8f%ad%e7%a7%98%ef%bc%9a%e5%a6%82%e4%bd%95%e5%9c%a8%e5%8d%95%e9%a1%b5%e5%ba%94%e7%94%a8%ef%bc%88spa%ef%bc%89%e4%b8%ad%e5%ae%8c%e7%be%8e%e4%bf%9d%e7%95%99%e8%b7%af%e7%94%b1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/51405.html","title":{"rendered":"\u6df1\u5ea6\u63ed\u79d8\uff1a\u5982\u4f55\u5728\u5355\u9875\u5e94\u7528\uff08SPA\uff09\u4e2d\u5b8c\u7f8e\u4fdd\u7559\u8def\u7531\u5207\u6362\u6eda\u52a8\u4f4d\u7f6e\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\uff01"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810141917-6898aa655b4bb.jpg\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>\u6458\u8981<\/h3>\n<p>\u73b0\u5728\u5f88\u591a\u7f51\u7ad9\u548c\u5e94\u7528\u90fd\u4f7f\u7528\u5355\u9875\u5e94\u7528&#xff08;SPA&#xff09;\u6280\u672f&#xff0c;\u7528\u6237\u5728\u9875\u9762\u4e4b\u95f4\u8df3\u8f6c\u65f6&#xff0c;\u9875\u9762\u4e0d\u4f1a\u6574\u9875\u5237\u65b0&#xff0c;\u800c\u662f\u901a\u8fc7\u8def\u7531\u52a8\u6001\u5207\u6362\u5185\u5bb9\u3002\u8fd9\u79cd\u65b9\u5f0f\u4f53\u9a8c\u6d41\u7545&#xff0c;\u4f46\u6709\u4e00\u4e2a\u5e38\u89c1\u7684\u95ee\u9898&#xff1a;\u9875\u9762\u5207\u6362\u65f6&#xff0c;\u6eda\u52a8\u4f4d\u7f6e\u9ed8\u8ba4\u4f1a\u8df3\u56de\u9876\u90e8&#xff0c;\u7528\u6237\u5728\u5217\u8868\u3001\u6587\u7ae0\u9875\u5207\u6362\u65f6\u4f53\u9a8c\u5c31\u4e0d\u592a\u81ea\u7136\u4e86\u3002\u672c\u6587\u5206\u4eab\u5982\u4f55\u5728 SPA \u4e2d\u5b9e\u73b0\u8def\u7531\u5207\u6362\u65f6\u4fdd\u7559\u9875\u9762\u6eda\u52a8\u4f4d\u7f6e&#xff0c;\u63d0\u5347\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<h3>\u5f15\u8a00<\/h3>\n<p>\u968f\u7740\u524d\u7aef\u6846\u67b6\u5982 Vue\u3001React\u3001Angular \u7b49\u7684\u53d1\u5c55&#xff0c;SPA \u5e94\u7528\u53d8\u5f97\u8d8a\u6765\u8d8a\u666e\u904d\u3002\u5b83\u4eec\u7684\u8def\u7531\u673a\u5236\u8ba9\u9875\u9762\u8df3\u8f6c\u53d8\u5f97\u975e\u5e38\u5feb&#xff0c;\u4f46\u4e5f\u5e26\u6765\u4e86\u6eda\u52a8\u4f4d\u7f6e\u4e22\u5931\u7684\u95ee\u9898\u3002<\/p>\n<p>\u6bd4\u5982\u4f60\u5728\u7535\u5546\u7f51\u7ad9\u7684\u5546\u54c1\u5217\u8868\u9875&#xff0c;\u5f80\u4e0b\u6eda\u4e86\u534a\u5c4f&#xff0c;\u70b9\u5f00\u4e00\u4e2a\u5546\u54c1\u8be6\u60c5\u9875&#xff0c;\u8fd4\u56de\u5217\u8868\u65f6\u5374\u53d1\u73b0\u9875\u9762\u81ea\u52a8\u6eda\u5230\u4e86\u9876\u90e8&#xff0c;\u627e\u4e0d\u5230\u4e4b\u524d\u770b\u5230\u7684\u4f4d\u7f6e\u3002\u8fd9\u4e2a\u65f6\u5019\u5982\u679c\u80fd\u8bb0\u4f4f\u6eda\u52a8\u6761\u7684\u4f4d\u7f6e&#xff0c;\u518d\u5207\u6362\u56de\u6765\u65f6\u81ea\u52a8\u6eda\u5230\u4e4b\u524d\u7684\u4f4d\u7f6e&#xff0c;\u7528\u6237\u4f53\u9a8c\u4f1a\u597d\u5f88\u591a\u3002<\/p>\n<p>\u6240\u4ee5&#xff0c;\u5982\u4f55\u4f18\u96c5\u5730\u5b9e\u73b0\u201c\u8def\u7531\u5207\u6362\u65f6\u6eda\u52a8\u4f4d\u7f6e\u7684\u4fdd\u5b58\u548c\u6062\u590d\u201d&#xff0c;\u6210\u4e3a\u4e86\u524d\u7aef\u5f00\u53d1\u7684\u4e00\u4e2a\u5e38\u89c1\u9700\u6c42\u3002\u63a5\u4e0b\u6765\u6211\u4f1a\u4ee5 Vue Router \u4e3a\u4f8b&#xff0c;\u8bb2\u89e3\u5982\u4f55\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd&#xff0c;\u5e76\u5206\u4eab\u51e0\u4e2a\u5178\u578b\u7684\u5e94\u7528\u573a\u666f\u3002<\/p>\n<h2>\u8def\u7531\u5207\u6362\u65f6\u4fdd\u7559\u6eda\u52a8\u4f4d\u7f6e\u7684\u57fa\u672c\u601d\u8def<\/h2>\n<h3>\u539f\u7406\u5206\u6790<\/h3>\n<p>\u5355\u9875\u5e94\u7528\u7684\u8def\u7531\u5207\u6362&#xff0c;\u5176\u5b9e\u53ea\u662f\u7ec4\u4ef6\u7684\u6302\u8f7d\u548c\u5378\u8f7d&#xff0c;\u6d4f\u89c8\u5668\u4e0d\u4f1a\u89e6\u53d1\u4f20\u7edf\u9875\u9762\u5237\u65b0&#xff0c;\u6eda\u52a8\u6761\u4e0d\u4f1a\u81ea\u52a8\u4fdd\u5b58\u4f4d\u7f6e\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;\u6bcf\u6b21\u8def\u7531\u5207\u6362\u540e\u9875\u9762\u6eda\u52a8\u6761\u4f4d\u7f6e\u90fd\u4f1a\u91cd\u7f6e\u3002<\/p>\n<p>\u6240\u4ee5\u89e3\u51b3\u65b9\u6848\u5f88\u76f4\u89c2&#xff1a;<\/p>\n<li>\n<p>\u4fdd\u5b58\u6eda\u52a8\u4f4d\u7f6e&#xff1a;\u8def\u7531\u5207\u6362\u4e4b\u524d&#xff0c;\u5148\u8bb0\u5f55\u5f53\u524d\u9875\u9762\u7684\u6eda\u52a8\u4f4d\u7f6e&#xff08;\u901a\u5e38\u662f window.scrollY \u6216\u8005\u67d0\u4e2a\u5bb9\u5668\u7684\u6eda\u52a8\u503c&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u6062\u590d\u6eda\u52a8\u4f4d\u7f6e&#xff1a;\u8def\u7531\u5207\u6362\u4e4b\u540e&#xff0c;\u6839\u636e\u76ee\u6807\u8def\u7531\u8bfb\u53d6\u4e4b\u524d\u4fdd\u5b58\u7684\u6eda\u52a8\u4f4d\u7f6e&#xff0c;\u8c03\u7528 window.scrollTo(x, y) \u8fd8\u539f\u6eda\u52a8\u3002<\/p>\n<\/li>\n<p>\u4fdd\u5b58\u6eda\u52a8\u4f4d\u7f6e\u53ef\u4ee5\u5b58\u653e\u5728&#xff1a;<\/p>\n<ul>\n<li>\u5185\u5b58\u53d8\u91cf&#xff08;\u7b80\u5355\u4e14\u5feb\u901f&#xff0c;\u4f46\u5237\u65b0\u4f1a\u4e22\u5931&#xff09;<\/li>\n<li>sessionStorage&#xff08;\u5237\u65b0\u4fdd\u7559&#xff0c;\u4f46\u9700\u8981\u5e8f\u5217\u5316&#xff09;<\/li>\n<li>Vuex \u6216\u5168\u5c40\u72b6\u6001\u7ba1\u7406&#xff08;\u590d\u6742\u9879\u76ee\u53ef\u4ee5\u4f7f\u7528&#xff09;<\/li>\n<\/ul>\n<h3>Vue Router \u4e2d\u7684\u793a\u4f8b\u5b9e\u73b0<\/h3>\n<p>\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u57fa\u4e8e Vue Router \u7684\u6eda\u52a8\u4f4d\u7f6e\u4fdd\u5b58\u548c\u6062\u590d\u793a\u4f8b&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ \u5b9a\u4e49\u4e00\u4e2a\u5bf9\u8c61\u7528\u6765\u4fdd\u5b58\u5404\u4e2a\u8def\u7531\u7684\u6eda\u52a8\u4f4d\u7f6e<\/span><br \/>\n<span class=\"token keyword\">const<\/span> scrollPositions <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u5728\u8def\u7531\u5207\u6362\u524d\u4fdd\u5b58\u5f53\u524d\u6eda\u52a8\u4f4d\u7f6e<\/span><br \/>\nrouter<span class=\"token punctuation\">.<\/span><span class=\"token function\">beforeEach<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span><span class=\"token parameter\">to<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">from<\/span><span class=\"token punctuation\">,<\/span> next<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  scrollPositions<span class=\"token punctuation\">[<\/span><span class=\"token keyword\">from<\/span><span class=\"token punctuation\">.<\/span>fullPath<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> window<span class=\"token punctuation\">.<\/span>scrollY <span class=\"token operator\">||<\/span> window<span class=\"token punctuation\">.<\/span>pageYOffset<br \/>\n  <span class=\"token function\">next<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u8def\u7531\u5207\u6362\u540e\u6062\u590d\u6eda\u52a8\u4f4d\u7f6e<\/span><br \/>\nrouter<span class=\"token punctuation\">.<\/span><span class=\"token function\">afterEach<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span><span class=\"token parameter\">to<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token keyword\">const<\/span> pos <span class=\"token operator\">&#061;<\/span> scrollPositions<span class=\"token punctuation\">[<\/span>to<span class=\"token punctuation\">.<\/span>fullPath<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">||<\/span> <span class=\"token number\">0<\/span><br \/>\n  window<span class=\"token punctuation\">.<\/span><span class=\"token function\">scrollTo<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> pos<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u7684\u610f\u601d\u662f&#xff1a;<\/p>\n<ul>\n<li>\u5207\u6362\u8def\u7531\u65f6&#xff0c;\u5148\u628a\u79bb\u5f00\u9875\u9762\u7684\u6eda\u52a8\u4f4d\u7f6e\u4fdd\u5b58\u5230 scrollPositions \u5bf9\u8c61\u91cc&#xff0c;\u952e\u662f\u9875\u9762\u8def\u5f84\u3002<\/li>\n<li>\u8df3\u8f6c\u5230\u65b0\u9875\u9762\u540e&#xff0c;\u68c0\u67e5\u4e4b\u524d\u662f\u5426\u6709\u4fdd\u5b58\u7684\u6eda\u52a8\u4f4d\u7f6e&#xff0c;\u5982\u679c\u6709\u5c31\u6eda\u56de\u53bb&#xff0c;\u5426\u5219\u9ed8\u8ba4\u6eda\u5230\u9876\u90e8\u3002<\/li>\n<\/ul>\n<h2>\u5b9e\u9645\u5e94\u7528\u573a\u666f\u89e3\u6790\u4e0e\u4ee3\u7801\u793a\u4f8b<\/h2>\n<h3>\u573a\u666f1&#xff1a;\u7535\u5546\u5217\u8868\u9875\u4e0e\u8be6\u60c5\u9875\u5207\u6362<\/h3>\n<p>\u7528\u6237\u5728\u5546\u54c1\u5217\u8868\u9875\u6d4f\u89c8&#xff0c;\u6eda\u52a8\u4e00\u534a\u540e\u70b9\u51fb\u8fdb\u5165\u5546\u54c1\u8be6\u60c5\u3002\u8be6\u60c5\u9875\u770b\u5b8c\u540e\u8fd4\u56de\u5217\u8868\u9875\u65f6&#xff0c;\u5e0c\u671b\u5217\u8868\u80fd\u56de\u5230\u4e4b\u524d\u7684\u6eda\u52a8\u4f4d\u7f6e&#xff0c;\u800c\u4e0d\u662f\u8df3\u56de\u9876\u90e8\u3002<\/p>\n<p>\u793a\u4f8b\u4ee3\u7801&#xff1a;<\/p>\n<p><span class=\"token keyword\">const<\/span> scrollPositions <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><\/p>\n<p>router<span class=\"token punctuation\">.<\/span><span class=\"token function\">beforeEach<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span><span class=\"token parameter\">to<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">from<\/span><span class=\"token punctuation\">,<\/span> next<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">from<\/span><span class=\"token punctuation\">.<\/span>name <span class=\"token operator\">&#061;&#061;&#061;<\/span> <span class=\"token string\">&#039;ProductList&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    scrollPositions<span class=\"token punctuation\">[<\/span><span class=\"token keyword\">from<\/span><span class=\"token punctuation\">.<\/span>fullPath<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> window<span class=\"token punctuation\">.<\/span>scrollY<br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token function\">next<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>router<span class=\"token punctuation\">.<\/span><span class=\"token function\">afterEach<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span><span class=\"token parameter\">to<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>to<span class=\"token punctuation\">.<\/span>name <span class=\"token operator\">&#061;&#061;&#061;<\/span> <span class=\"token string\">&#039;ProductList&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">const<\/span> pos <span class=\"token operator\">&#061;<\/span> scrollPositions<span class=\"token punctuation\">[<\/span>to<span class=\"token punctuation\">.<\/span>fullPath<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">||<\/span> <span class=\"token number\">0<\/span><br \/>\n    window<span class=\"token punctuation\">.<\/span><span class=\"token function\">scrollTo<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> pos<span class=\"token punctuation\">)<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">else<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    window<span class=\"token punctuation\">.<\/span><span class=\"token function\">scrollTo<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u4ee3\u7801\u8bf4\u660e&#xff1a;<br \/>\n\u53ea\u9488\u5bf9\u5546\u54c1\u5217\u8868\u9875\u4fdd\u5b58\u6eda\u52a8\u4f4d\u7f6e&#xff0c;\u907f\u514d\u5185\u5b58\u5360\u7528\u8fc7\u5927\u3002\u5207\u6362\u5230\u5176\u4ed6\u9875\u9762\u9ed8\u8ba4\u6eda\u9876\u90e8\u3002<\/p>\n<h3>\u573a\u666f2&#xff1a;\u957f\u6587\u7ae0\u9605\u8bfb\u4e0e\u76ee\u5f55\u5207\u6362<\/h3>\n<p>\u7528\u6237\u9605\u8bfb\u957f\u7bc7\u6587\u7ae0\u65f6&#xff0c;\u70b9\u51fb\u76ee\u5f55\u5bfc\u822a\u8df3\u8f6c\u5230\u4e0d\u540c\u7ae0\u8282\u3002\u5e0c\u671b\u76ee\u5f55\u5207\u6362\u65f6\u4fdd\u7559\u6bcf\u4e2a\u7ae0\u8282\u7684\u6eda\u52a8\u4f4d\u7f6e&#xff0c;\u65b9\u4fbf\u56de\u770b\u3002<\/p>\n<p>\u793a\u4f8b\u601d\u8def&#xff1a;<\/p>\n<ul>\n<li>\u6bcf\u4e2a\u7ae0\u8282\u5bf9\u5e94\u4e00\u4e2a\u8def\u7531\u3002<\/li>\n<li>\u4fdd\u5b58\u6bcf\u4e2a\u7ae0\u8282\u7684\u6eda\u52a8\u4f4d\u7f6e\u3002<\/li>\n<li>\u8def\u7531\u5207\u6362\u65f6\u6062\u590d\u5bf9\u5e94\u7ae0\u8282\u7684\u4f4d\u7f6e\u3002<\/li>\n<\/ul>\n<p><span class=\"token keyword\">const<\/span> chapterScrollPositions <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><\/p>\n<p>router<span class=\"token punctuation\">.<\/span><span class=\"token function\">beforeEach<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span><span class=\"token parameter\">to<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">from<\/span><span class=\"token punctuation\">,<\/span> next<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  chapterScrollPositions<span class=\"token punctuation\">[<\/span><span class=\"token keyword\">from<\/span><span class=\"token punctuation\">.<\/span>fullPath<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> window<span class=\"token punctuation\">.<\/span>scrollY<br \/>\n  <span class=\"token function\">next<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>router<span class=\"token punctuation\">.<\/span><span class=\"token function\">afterEach<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span><span class=\"token parameter\">to<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token keyword\">const<\/span> pos <span class=\"token operator\">&#061;<\/span> chapterScrollPositions<span class=\"token punctuation\">[<\/span>to<span class=\"token punctuation\">.<\/span>fullPath<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">||<\/span> <span class=\"token number\">0<\/span><br \/>\n  window<span class=\"token punctuation\">.<\/span><span class=\"token function\">scrollTo<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> pos<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<h3>\u573a\u666f3&#xff1a;\u4f7f\u7528\u81ea\u5b9a\u4e49\u6eda\u52a8\u5bb9\u5668\u7684\u60c5\u51b5<\/h3>\n<p>\u6709\u4e9b SPA \u5e76\u4e0d\u4f7f\u7528\u5168\u5c40 window \u6eda\u52a8&#xff0c;\u800c\u662f\u5728\u67d0\u4e2a\u6307\u5b9a\u5bb9\u5668\u5185\u6eda\u52a8&#xff0c;\u6bd4\u5982\u4e00\u4e2a\u56fa\u5b9a\u9ad8\u5ea6\u7684\u5185\u5bb9\u533a\u3002<\/p>\n<p>\u8fd9\u65f6\u6eda\u52a8\u4f4d\u7f6e\u9700\u8981\u83b7\u53d6\u548c\u8bbe\u7f6e\u5bb9\u5668\u7684 scrollTop&#xff0c;\u800c\u4e0d\u662f window.scrollY\u3002<\/p>\n<p><span class=\"token keyword\">const<\/span> scrollPositions <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token keyword\">const<\/span> scrollContainer <span class=\"token operator\">&#061;<\/span> document<span class=\"token punctuation\">.<\/span><span class=\"token function\">getElementById<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;scroll-container&#039;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>router<span class=\"token punctuation\">.<\/span><span class=\"token function\">beforeEach<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span><span class=\"token parameter\">to<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">from<\/span><span class=\"token punctuation\">,<\/span> next<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  scrollPositions<span class=\"token punctuation\">[<\/span><span class=\"token keyword\">from<\/span><span class=\"token punctuation\">.<\/span>fullPath<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;<\/span> scrollContainer<span class=\"token punctuation\">.<\/span>scrollTop<br \/>\n  <span class=\"token function\">next<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>router<span class=\"token punctuation\">.<\/span><span class=\"token function\">afterEach<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span><span class=\"token parameter\">to<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token keyword\">const<\/span> pos <span class=\"token operator\">&#061;<\/span> scrollPositions<span class=\"token punctuation\">[<\/span>to<span class=\"token punctuation\">.<\/span>fullPath<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">||<\/span> <span class=\"token number\">0<\/span><br \/>\n  scrollContainer<span class=\"token punctuation\">.<\/span>scrollTop <span class=\"token operator\">&#061;<\/span> pos<br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<h2>Q&amp;A<\/h2>\n<p>Q1: \u6709\u6ca1\u6709\u73b0\u6210\u7684\u8def\u7531\u5e93\u914d\u7f6e\u652f\u6301\u81ea\u52a8\u4fdd\u5b58\u6eda\u52a8\u4f4d\u7f6e&#xff1f;<br \/>\nVue Router \u6709\u81ea\u5e26\u7684 scrollBehavior \u51fd\u6570&#xff0c;\u53ef\u4ee5\u81ea\u52a8\u5904\u7406&#xff0c;\u4f46\u6709\u4e9b\u573a\u666f\u9700\u8981\u624b\u52a8\u4fdd\u5b58\u590d\u6742\u4f4d\u7f6e\u3002React Router \u9700\u8981\u81ea\u5df1\u5b9e\u73b0\u3002<\/p>\n<p>Q2: \u4e3a\u4ec0\u4e48\u4e0d\u76f4\u63a5\u7528\u6d4f\u89c8\u5668\u7684 history.state \u4fdd\u5b58\u6eda\u52a8\u4f4d\u7f6e&#xff1f;<br \/>\n\u6709\u7684\u6d4f\u89c8\u5668\u652f\u6301&#xff0c;\u4f46\u517c\u5bb9\u6027\u4e0d\u7edf\u4e00&#xff0c;\u4e14 SPA \u81ea\u5b9a\u4e49\u6e32\u67d3\u5bfc\u81f4\u72b6\u6001\u7ba1\u7406\u66f4\u7075\u6d3b&#xff0c;\u81ea\u5df1\u63a7\u5236\u66f4\u53ef\u9760\u3002<\/p>\n<p>Q3: \u5207\u6362\u8def\u7531\u540e\u6062\u590d\u6eda\u52a8\u4f1a\u6709\u95ea\u70c1\u5417&#xff1f;<br \/>\n\u6709\u53ef\u80fd&#xff0c;\u5c24\u5176\u5185\u5bb9\u8fd8\u6ca1\u52a0\u8f7d\u5b8c\u65f6\u6062\u590d\u4f4d\u7f6e\u4f1a\u5931\u8d25\u3002\u53ef\u4ee5\u8003\u8651\u5728\u5185\u5bb9\u52a0\u8f7d\u5b8c\u6210\u540e\u518d\u6062\u590d&#xff0c;\u6216\u8005\u7528\u5360\u4f4d\u7b26\u51cf\u5c11\u95ea\u70c1\u3002<\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u8def\u7531\u5207\u6362\u65f6\u4fdd\u7559\u6eda\u52a8\u4f4d\u7f6e&#xff0c;\u662f\u63d0\u5347 SPA \u7528\u6237\u4f53\u9a8c\u7684\u91cd\u8981\u7ec6\u8282\u3002<br \/>\n\u57fa\u672c\u601d\u8def\u5c31\u662f\u4fdd\u5b58\u5207\u6362\u524d\u7684\u6eda\u52a8\u503c&#xff0c;\u5207\u6362\u540e\u6062\u590d\u3002<br \/>\n\u5b9e\u9645\u9879\u76ee\u4e2d\u53ef\u4ee5\u6839\u636e\u9875\u9762\u7c7b\u578b\u3001\u6eda\u52a8\u5bb9\u5668\u4e0d\u540c\u7075\u6d3b\u8c03\u6574\u3002<br \/>\n\u5404\u5927\u6846\u67b6\u548c\u8def\u7531\u5e93\u90fd\u63d0\u4f9b\u4e86\u76f8\u5173\u94a9\u5b50\u6216\u914d\u7f6e&#xff0c;\u53ef\u4ee5\u7ed3\u5408\u4f7f\u7528\u3002<\/p>\n<p>\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u5e2e\u4f60\u5feb\u901f\u7406\u89e3\u548c\u5b9e\u73b0\u6eda\u52a8\u4f4d\u7f6e\u7684\u4fdd\u5b58\u4e0e\u6062\u590d&#xff0c;\u8ba9\u4f60\u7684 SPA \u5e94\u7528\u66f4\u6d41\u7545\u81ea\u7136&#xff01;\u5982\u679c\u4f60\u6709\u5176\u4ed6\u95ee\u9898&#xff0c;\u6b22\u8fce\u968f\u65f6\u4ea4\u6d41\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2\u6b21\u3002\u6458\u8981 \u5355\u9875\u5e94\u7528\uff08SPA\uff09\u56e0\u8def\u7531\u5207\u6362\u6d41\u7545\u800c\u5e7f\u6cdb\u5e94\u7528\uff0c\u4f46\u9ed8\u8ba4\u4f1a\u91cd\u7f6e\u6eda\u52a8\u4f4d\u7f6e\uff0c\u5f71\u54cd\u7528\u6237\u4f53\u9a8c\u3002\u672c\u6587\u63a2\u8ba8\u5982\u4f55\u5728SPA\u4e2d\u4fdd\u5b58\u548c\u6062\u590d\u6eda\u52a8\u4f4d\u7f6e\uff0c\u4ee5Vue Router\u4e3a\u4f8b\uff0c\u4ecb\u7ecd\u6838\u5fc3\u5b9e\u73b0\u601d\u8def\uff1a\u5728\u8def\u7531\u5207\u6362\u524d\u8bb0\u5f55\u5f53\u524d\u6eda\u52a8\u4f4d\u7f6e\uff08\u5982window.scrollY\uff09\uff0c\u5207\u6362\u540e\u901a\u8fc7scrollTo\u8fd8\u539f\u3002\u9488\u5bf9\u4e0d\u540c\u573a\u666f\uff08\u5982\u7535\u5546\u5217\u8868\u3001\u957f\u6587\u7ae0\u9605\u8bfb\u3001\u81ea\u5b9a\u4e49\u6eda\u52a8\u5bb9\u5668\uff09\u63d0\u4f9b\u4ee3\u7801\u793a\u4f8b\uff0c\u5e76\u89e3\u7b54\u5e38\u89c1\u95ee\u9898\u3002\u8be5\u4f18\u5316\u53ef\u663e\u8457\u63d0\u5347\u7528\u6237\u6d4f\u89c8\u8fde\u8d2f\u6027\uff0c\u9002\u7528\u4e8e\u5404\u7c7bSPA\u6846\u67b6\u3002<\/p>\n","protected":false},"author":2,"featured_media":51404,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1205,585],"topic":[],"class_list":["post-51405","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-js","tag-ux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6df1\u5ea6\u63ed\u79d8\uff1a\u5982\u4f55\u5728\u5355\u9875\u5e94\u7528\uff08SPA\uff09\u4e2d\u5b8c\u7f8e\u4fdd\u7559\u8def\u7531\u5207\u6362\u6eda\u52a8\u4f4d\u7f6e\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\uff01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/51405.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6df1\u5ea6\u63ed\u79d8\uff1a\u5982\u4f55\u5728\u5355\u9875\u5e94\u7528\uff08SPA\uff09\u4e2d\u5b8c\u7f8e\u4fdd\u7559\u8def\u7531\u5207\u6362\u6eda\u52a8\u4f4d\u7f6e\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\uff01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2\u6b21\u3002\u6458\u8981 \u5355\u9875\u5e94\u7528\uff08SPA\uff09\u56e0\u8def\u7531\u5207\u6362\u6d41\u7545\u800c\u5e7f\u6cdb\u5e94\u7528\uff0c\u4f46\u9ed8\u8ba4\u4f1a\u91cd\u7f6e\u6eda\u52a8\u4f4d\u7f6e\uff0c\u5f71\u54cd\u7528\u6237\u4f53\u9a8c\u3002\u672c\u6587\u63a2\u8ba8\u5982\u4f55\u5728SPA\u4e2d\u4fdd\u5b58\u548c\u6062\u590d\u6eda\u52a8\u4f4d\u7f6e\uff0c\u4ee5Vue Router\u4e3a\u4f8b\uff0c\u4ecb\u7ecd\u6838\u5fc3\u5b9e\u73b0\u601d\u8def\uff1a\u5728\u8def\u7531\u5207\u6362\u524d\u8bb0\u5f55\u5f53\u524d\u6eda\u52a8\u4f4d\u7f6e\uff08\u5982window.scrollY\uff09\uff0c\u5207\u6362\u540e\u901a\u8fc7scrollTo\u8fd8\u539f\u3002\u9488\u5bf9\u4e0d\u540c\u573a\u666f\uff08\u5982\u7535\u5546\u5217\u8868\u3001\u957f\u6587\u7ae0\u9605\u8bfb\u3001\u81ea\u5b9a\u4e49\u6eda\u52a8\u5bb9\u5668\uff09\u63d0\u4f9b\u4ee3\u7801\u793a\u4f8b\uff0c\u5e76\u89e3\u7b54\u5e38\u89c1\u95ee\u9898\u3002\u8be5\u4f18\u5316\u53ef\u663e\u8457\u63d0\u5347\u7528\u6237\u6d4f\u89c8\u8fde\u8d2f\u6027\uff0c\u9002\u7528\u4e8e\u5404\u7c7bSPA\u6846\u67b6\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/51405.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-10T14:19:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810141917-6898aa655b4bb.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/51405.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/51405.html\",\"name\":\"\u6df1\u5ea6\u63ed\u79d8\uff1a\u5982\u4f55\u5728\u5355\u9875\u5e94\u7528\uff08SPA\uff09\u4e2d\u5b8c\u7f8e\u4fdd\u7559\u8def\u7531\u5207\u6362\u6eda\u52a8\u4f4d\u7f6e\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\uff01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-10T14:19:27+00:00\",\"dateModified\":\"2025-08-10T14:19:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/51405.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/51405.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/51405.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6df1\u5ea6\u63ed\u79d8\uff1a\u5982\u4f55\u5728\u5355\u9875\u5e94\u7528\uff08SPA\uff09\u4e2d\u5b8c\u7f8e\u4fdd\u7559\u8def\u7531\u5207\u6362\u6eda\u52a8\u4f4d\u7f6e\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\uff01\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u6df1\u5ea6\u63ed\u79d8\uff1a\u5982\u4f55\u5728\u5355\u9875\u5e94\u7528\uff08SPA\uff09\u4e2d\u5b8c\u7f8e\u4fdd\u7559\u8def\u7531\u5207\u6362\u6eda\u52a8\u4f4d\u7f6e\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\uff01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/51405.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6df1\u5ea6\u63ed\u79d8\uff1a\u5982\u4f55\u5728\u5355\u9875\u5e94\u7528\uff08SPA\uff09\u4e2d\u5b8c\u7f8e\u4fdd\u7559\u8def\u7531\u5207\u6362\u6eda\u52a8\u4f4d\u7f6e\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\uff01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2\u6b21\u3002\u6458\u8981 \u5355\u9875\u5e94\u7528\uff08SPA\uff09\u56e0\u8def\u7531\u5207\u6362\u6d41\u7545\u800c\u5e7f\u6cdb\u5e94\u7528\uff0c\u4f46\u9ed8\u8ba4\u4f1a\u91cd\u7f6e\u6eda\u52a8\u4f4d\u7f6e\uff0c\u5f71\u54cd\u7528\u6237\u4f53\u9a8c\u3002\u672c\u6587\u63a2\u8ba8\u5982\u4f55\u5728SPA\u4e2d\u4fdd\u5b58\u548c\u6062\u590d\u6eda\u52a8\u4f4d\u7f6e\uff0c\u4ee5Vue Router\u4e3a\u4f8b\uff0c\u4ecb\u7ecd\u6838\u5fc3\u5b9e\u73b0\u601d\u8def\uff1a\u5728\u8def\u7531\u5207\u6362\u524d\u8bb0\u5f55\u5f53\u524d\u6eda\u52a8\u4f4d\u7f6e\uff08\u5982window.scrollY\uff09\uff0c\u5207\u6362\u540e\u901a\u8fc7scrollTo\u8fd8\u539f\u3002\u9488\u5bf9\u4e0d\u540c\u573a\u666f\uff08\u5982\u7535\u5546\u5217\u8868\u3001\u957f\u6587\u7ae0\u9605\u8bfb\u3001\u81ea\u5b9a\u4e49\u6eda\u52a8\u5bb9\u5668\uff09\u63d0\u4f9b\u4ee3\u7801\u793a\u4f8b\uff0c\u5e76\u89e3\u7b54\u5e38\u89c1\u95ee\u9898\u3002\u8be5\u4f18\u5316\u53ef\u663e\u8457\u63d0\u5347\u7528\u6237\u6d4f\u89c8\u8fde\u8d2f\u6027\uff0c\u9002\u7528\u4e8e\u5404\u7c7bSPA\u6846\u67b6\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/51405.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-10T14:19:27+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810141917-6898aa655b4bb.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/51405.html","url":"https:\/\/www.wsisp.com\/helps\/51405.html","name":"\u6df1\u5ea6\u63ed\u79d8\uff1a\u5982\u4f55\u5728\u5355\u9875\u5e94\u7528\uff08SPA\uff09\u4e2d\u5b8c\u7f8e\u4fdd\u7559\u8def\u7531\u5207\u6362\u6eda\u52a8\u4f4d\u7f6e\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\uff01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-10T14:19:27+00:00","dateModified":"2025-08-10T14:19:27+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/51405.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/51405.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/51405.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6df1\u5ea6\u63ed\u79d8\uff1a\u5982\u4f55\u5728\u5355\u9875\u5e94\u7528\uff08SPA\uff09\u4e2d\u5b8c\u7f8e\u4fdd\u7559\u8def\u7531\u5207\u6362\u6eda\u52a8\u4f4d\u7f6e\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\uff01"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/51405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=51405"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/51405\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/51404"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=51405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=51405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=51405"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=51405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}