{"id":33133,"date":"2024-11-25T14:19:48","date_gmt":"2024-11-25T06:19:48","guid":{"rendered":"https:\/\/fwq.ai\/blog\/33133\/"},"modified":"2024-11-25T14:19:48","modified_gmt":"2024-11-25T06:19:48","slug":"%e5%b0%8f%e7%a8%8b%e5%ba%8f%e5%bc%80%e5%8f%91%e9%a1%b5%e9%9d%a2%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e8%b7%b3%e8%bd%ac%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/33133\/","title":{"rendered":"\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u9875\u9762\u5982\u4f55\u5b9e\u73b0\u8df3\u8f6c\uff1f"},"content":{"rendered":"<p><strong><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/024\/5ea94438bea36367.jpg\" class=\"aligncenter\" title=\"\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u9875\u9762\u5982\u4f55\u5b9e\u73b0\u8df3\u8f6c\uff1f\u63d2\u56fe\" alt=\"\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u9875\u9762\u5982\u4f55\u5b9e\u73b0\u8df3\u8f6c\uff1f\u63d2\u56fe\" \/><\/strong><\/p>\n<p>\u5728\u4ee5\u5f80\u7684APP\u6216\u7f51\u9875\u4ea7\u54c1\u4e2d\uff0c\u7528\u6237\u4f7f\u7528\u65f6\u53ef\u4ee5\u6d4f\u89c8\u591a\u4e2a\u9875\u9762\uff0c\u8fd9\u4e9b\u4ea7\u54c1\u7684\u670d\u52a1\u5668\u53ef\u4ee5\u627f\u8f7d\u8db3\u591f\u591a\u7684\u6570\u636e\u3002\u800c\u5c0f\u7a0b\u5e8f\u7684\u7279\u70b9\u5c31\u662f\u89c4\u6a21\u5c0f\uff0c\u4e3a\u4e86\u4e0d\u8ba9\u7528\u6237\u5728\u4f7f\u7528\u5c0f\u7a0b\u5e8f\u65f6\u9020\u6210\u56f0\u6270\uff0c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u89c4\u5b9a\u9875\u9762\u8def\u5f84\u53ea\u80fd\u662f\u4e94\u5c42\uff0c\u8bf7\u5c3d\u91cf\u907f\u514d\u591a\u5c42\u7ea7\u7684\u4ea4\u4e92\u65b9\u5f0f\u3002&nbsp;<\/p>\n<p><strong>\u9875\u9762\u8df3\u8f6c<\/strong>\u7684\u8bdd\u5c31\u6d89\u53ca\u5230\u4e86\u591a\u4e2a\u9875\u9762\u5c42\u7ea7<\/p>\n<p><strong>\u7b2c\u4e00\u79cd\uff1awx.navigateTo(OBJECT)&nbsp;<\/strong><\/p>\n<p>\u4fdd\u7559\u5f53\u524d\u9875\u9762\uff0c\u8df3\u8f6c\u5230\u5e94\u7528\u5185\u7684\u67d0\u4e2a\u9875\u9762\uff0c\u4f7f\u7528wx.navigateBack\u53ef\u4ee5\u8fd4\u56de\u5230\u539f\u9875\u9762\u3002<\/p>\n<p>OBJECT\u53c2\u6570\u8bf4\u660e\uff1a<\/p>\n<p>url String \u9700\u8981\u8df3\u8f6c\u7684\u5e94\u7528\u5185\u9875\u9762\u7684\u8def\u5f84&nbsp;,&nbsp;\u8def\u5f84\u540e\u53ef\u4ee5\u5e26\u53c2\u6570\u3002\u53c2\u6570\u4e0e\u8def\u5f84\u4e4b\u95f4\u4f7f\u7528?\u5206\u9694\uff0c\u53c2\u6570\u952e\u4e0e\u53c2\u6570\u503c\u7528=\u76f8\u8fde\uff0c\u4e0d\u540c\u53c2\u6570\u7528&amp;\u5206\u9694\uff1b\u5982 \u2018path?key=value&amp;key2=value2\u2019&nbsp;<\/p>\n<p>success Function \u63a5\u53e3\u8c03\u7528\u6210\u529f\u7684\u56de\u8c03\u51fd\u6570&nbsp;<\/p>\n<p>fail Function \u63a5\u53e3\u8c03\u7528\u5931\u8d25\u7684\u56de\u8c03\u51fd\u6570&nbsp;<\/p>\n<p>complete Function \u63a5\u53e3\u8c03\u7528\u7ed3\u675f\u7684\u56de\u8c03\u51fd\u6570\uff08\u8c03\u7528\u6210\u529f\u3001\u5931\u8d25\u90fd\u4f1a\u6267\u884c\uff09<\/p>\n<pre>onLoad:function(options)&nbsp;{\nwx.navigateTo({\nurl:'..\/index\/index'&nbsp;})}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u7b2c\u4e8c\u79cd\uff1awx.redirectTo(OBJECT)&nbsp;<\/strong><\/p>\n<p>\u5173\u95ed\u5f53\u524d\u9875\u9762\uff0c\u8df3\u8f6c\u5230\u5e94\u7528\u5185\u7684\u67d0\u4e2a\u9875\u9762\u3002<\/p>\n<p>OBJECT\u53c2\u6570\u8bf4\u660e\uff1a<\/p>\n<p>url String &nbsp;\u9700\u8981\u8df3\u8f6c\u7684\u5e94\u7528\u5185\u9875\u9762\u7684\u8def\u5f84&nbsp;<\/p>\n<p>success Function &nbsp;\u63a5\u53e3\u8c03\u7528\u6210\u529f\u7684\u56de\u8c03\u51fd\u6570&nbsp;<\/p>\n<p>fail Function &nbsp;\u63a5\u53e3\u8c03\u7528\u5931\u8d25\u7684\u56de\u8c03\u51fd\u6570&nbsp;<\/p>\n<p>complete Function &nbsp;\u63a5\u53e3\u8c03\u7528\u7ed3\u675f\u7684\u56de\u8c03\u51fd\u6570\uff08\u8c03\u7528\u6210\u529f\u3001\u5931\u8d25\u90fd\u4f1a\u6267\u884c\uff09<\/p>\n<pre>onLoad:function(options)&nbsp;{\n&nbsp;wx.redirectTo({\nurl:'..\/index\/index'&nbsp;})&nbsp;}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u7b2c\u4e09\u79cd\uff1awx.navigateBack(OBJECT)<\/strong><\/p>\n<p>\u5173\u95ed\u5f53\u524d\u9875\u9762\uff0c\u8fd4\u56de\u4e0a\u4e00\u9875\u9762\u6216\u591a\u7ea7\u9875\u9762\u3002\u53ef\u901a\u8fc7&nbsp;getCurrentPages())&nbsp;\u83b7\u53d6\u5f53\u524d\u7684\u9875\u9762\u6808\uff0c\u51b3\u5b9a\u9700\u8981\u8fd4\u56de\u51e0\u5c42\u3002&nbsp;<\/p>\n<p>OBJECT\u53c2\u6570\u8bf4\u660e\uff1a<\/p>\n<p>delta Number &nbsp;\u8fd4\u56de\u7684\u9875\u9762\u6570\uff0c\u5982\u679c&nbsp;delta&nbsp;\u5927\u4e8e\u73b0\u6709\u9875\u9762\u6570\uff0c\u5219\u8fd4\u56de\u5230\u9996\u9875\u3002<\/p>\n<pre>onLoad:function(options)&nbsp;{\nvar&nbsp;pages&nbsp;=getCurrentPages()\nvar&nbsp;num&nbsp;=pages.length\nnavigateBack:function(){\n&nbsp;wx.navigateBack({\n&nbsp;delta:&nbsp;num\n})}}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u63a8\u8350\uff1a\u300a\u300b<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u9875\u9762\u5982\u4f55\u5b9e\u73b0\u8df3\u8f6c\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>\u5728\u4ee5\u5f80\u7684APP\u6216\u7f51\u9875\u4ea7\u54c1\u4e2d\uff0c\u7528\u6237\u4f7f\u7528\u65f6\u53ef\u4ee5\u6d4f\u89c8\u591a\u4e2a\u9875\u9762\uff0c\u8fd9\u4e9b\u4ea7\u54c1\u7684\u670d\u52a1\u5668\u53ef\u4ee5\u627f\u8f7d\u8db3\u591f\u591a\u7684\u6570\u636e\u3002\u800c\u5c0f\u7a0b\u5e8f\u7684\u7279\u70b9\u5c31\u662f\u89c4\u6a21\u5c0f\uff0c\u4e3a\u4e86\u4e0d\u8ba9\u7528\u6237\u5728\u4f7f\u7528\u5c0f\u7a0b\u5e8f\u65f6\u9020\u6210\u56f0\u6270\uff0c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u89c4\u5b9a\u9875\u9762\u8def\u5f84\u53ea\u80fd\u662f\u4e94\u5c42\uff0c\u8bf7\u5c3d\u91cf\u907f\u514d\u591a\u5c42\u7ea7\u7684\u4ea4\u4e92\u65b9\u5f0f\u3002&nbsp; \u9875\u9762\u8df3\u8f6c\u7684\u8bdd\u5c31\u6d89\u53ca\u5230\u4e86\u591a\u4e2a\u9875\u9762\u5c42\u7ea7 \u7b2c\u4e00\u79cd\uff1awx.navigateTo(OBJECT)&nbsp; \u4fdd\u7559\u5f53\u524d\u9875\u9762\uff0c\u8df3\u8f6c\u5230\u5e94\u7528\u5185\u7684\u67d0\u4e2a\u9875\u9762\uff0c\u4f7f\u7528wx.navigateBack\u53ef\u4ee5\u8fd4\u56de\u5230\u539f\u9875\u9762\u3002 OBJECT\u53c2\u6570\u8bf4\u660e\uff1a url String \u9700\u8981\u8df3\u8f6c\u7684\u5e94\u7528\u5185\u9875\u9762\u7684\u8def\u5f84&nbsp;,&nbsp;\u8def\u5f84\u540e\u53ef\u4ee5\u5e26\u53c2\u6570\u3002\u53c2\u6570\u4e0e\u8def\u5f84\u4e4b\u95f4\u4f7f\u7528?\u5206\u9694\uff0c\u53c2\u6570\u952e\u4e0e\u53c2\u6570\u503c\u7528=\u76f8\u8fde\uff0c\u4e0d\u540c\u53c2\u6570\u7528&amp;\u5206\u9694\uff1b\u5982 \u2018path?key=value&amp;key2=value2\u2019&nbsp; success Function \u63a5\u53e3\u8c03\u7528\u6210\u529f\u7684\u56de\u8c03\u51fd\u6570&nbsp; fail Function \u63a5\u53e3\u8c03\u7528\u5931\u8d25\u7684\u56de\u8c03\u51fd\u6570&nbsp; complete Function \u63a5\u53e3\u8c03\u7528\u7ed3\u675f\u7684\u56de\u8c03\u51fd\u6570\uff08\u8c03\u7528\u6210\u529f\u3001\u5931\u8d25\u90fd\u4f1a\u6267\u884c\uff09 onLoad:function(options)&nbsp;{ wx.navigateTo({ url:&#8217;..\/index\/index&#8217;&nbsp;})} \u767b\u5f55\u540e\u590d\u5236 \u7b2c\u4e8c\u79cd\uff1awx.redirectTo(OBJECT)&nbsp; \u5173\u95ed\u5f53\u524d\u9875\u9762\uff0c\u8df3\u8f6c\u5230\u5e94\u7528\u5185\u7684\u67d0\u4e2a\u9875\u9762\u3002 OBJECT\u53c2\u6570\u8bf4\u660e\uff1a url String &nbsp;\u9700\u8981\u8df3\u8f6c\u7684\u5e94\u7528\u5185\u9875\u9762\u7684\u8def\u5f84&nbsp; success Function &nbsp;\u63a5\u53e3\u8c03\u7528\u6210\u529f\u7684\u56de\u8c03\u51fd\u6570&nbsp; fail Function &nbsp;\u63a5\u53e3\u8c03\u7528\u5931\u8d25\u7684\u56de\u8c03\u51fd\u6570&nbsp; complete Function &nbsp;\u63a5\u53e3\u8c03\u7528\u7ed3\u675f\u7684\u56de\u8c03\u51fd\u6570\uff08\u8c03\u7528\u6210\u529f\u3001\u5931\u8d25\u90fd\u4f1a\u6267\u884c\uff09 onLoad:function(options)&nbsp;{ &nbsp;wx.redirectTo({ url:&#8217;..\/index\/index&#8217;&nbsp;})&nbsp;} \u767b\u5f55\u540e\u590d\u5236 \u7b2c\u4e09\u79cd\uff1awx.navigateBack(OBJECT) \u5173\u95ed\u5f53\u524d\u9875\u9762\uff0c\u8fd4\u56de\u4e0a\u4e00\u9875\u9762\u6216\u591a\u7ea7\u9875\u9762\u3002\u53ef\u901a\u8fc7&nbsp;getCurrentPages())&nbsp;\u83b7\u53d6\u5f53\u524d\u7684\u9875\u9762\u6808\uff0c\u51b3\u5b9a\u9700\u8981\u8fd4\u56de\u51e0\u5c42\u3002&nbsp; OBJECT\u53c2\u6570\u8bf4\u660e\uff1a delta Number &nbsp;\u8fd4\u56de\u7684\u9875\u9762\u6570\uff0c\u5982\u679c&nbsp;delta&nbsp;\u5927\u4e8e\u73b0\u6709\u9875\u9762\u6570\uff0c\u5219\u8fd4\u56de\u5230\u9996\u9875\u3002 onLoad:function(options)&nbsp;{ var&nbsp;pages&nbsp;=getCurrentPages() var&nbsp;num&nbsp;=pages.length navigateBack:function(){ &nbsp;wx.navigateBack({ &nbsp;delta:&nbsp;num })}} \u767b\u5f55\u540e\u590d\u5236 [&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-33133","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/33133","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=33133"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/33133\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=33133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=33133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=33133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}