{"id":31561,"date":"2024-11-25T17:21:00","date_gmt":"2024-11-25T09:21:00","guid":{"rendered":"https:\/\/fwq.ai\/blog\/31561\/"},"modified":"2024-11-25T17:21:00","modified_gmt":"2024-11-25T09:21:00","slug":"%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f%e5%bc%80%e5%8f%91%e8%b7%af%e7%94%b1%e7%9a%84%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/31561\/","title":{"rendered":"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8def\u7531\u7684\u4f7f\u7528"},"content":{"rendered":"<p style=\"margin-top: 0px;margin-bottom: 16px;font-size: 15px;line-height: 1.7em;overflow: auto;font-family:\"><span style=\"font-style: italic;letter-spacing: 0.2px\">\u6211\u4eec\u901a\u5e38\u7406\u89e3\u7684\u8def\u7531\u6307\u5206\u7ec4\u6570\u636e\u5305\u4ece\u6e90\u5230\u76ee\u7684\u5730\u65f6\uff0c\u51b3\u5b9a\u7aef\u5230\u7aef\u8def\u5f84\u7684\u7f51\u7edc\u8303\u56f4\u7684\u8fdb\u7a0b\uff1b<\/span><\/p>\n<p style=\"margin-top: 0px;margin-bottom: 16px;font-size: 15px;line-height: 1.7em;overflow: auto;font-family:\">\u501f\u7528\u4e0a\u9762\u7684\u5b9a\u4e49\uff0c\u6211\u4eec\u53ef\u4ee5\u7406\u89e3\u5c0f\u7a0b\u5e8f\u9875\u9762\u8def\u7531\uff0c\u6839\u636e<span style=\"font-weight: 700\">\u8def\u7531\u89c4\u5219<\/span>\uff08\u8def\u5f84\uff09\u4ece\u4e00\u4e2a\u9875\u9762\u8df3\u8f6c\u5230\u53e6\u4e00\u4e2a\u9875\u9762\u7684\u7684\u89c4\u5219\u3002<\/p>\n<p style=\"margin-top: 0px;margin-bottom: 16px;font-size: 15px;line-height: 1.7em;overflow: auto;font-family:\">\u901a\u8fc7\u672c\u7bc7\u6587\u7ae0\uff0c\u4f60\u53ef\u4ee5\u5b66\u4e60\u5230\uff1a<\/p>\n<ol>\n<li>\n<p>\u54ea\u4e9b\u60c5\u51b5\u4f1a\u89e6\u53d1\u9875\u9762\u8df3\u8f6c<\/p>\n<\/li>\n<li>\n<p>\u5982\u4f55\u8df3\u8f6c\u9875\u9762<\/p>\n<\/li>\n<li>\n<p>\u9875\u9762\u4f20\u53c2<\/p>\n<\/li>\n<li>\n<p>\u9875\u9762\u6808<\/p>\n<\/li>\n<\/ol>\n<h4> \u300b\u300b\u300b\u54ea\u4e9b\u60c5\u51b5\u4f1a\u89e6\u53d1\u9875\u9762\u8df3\u8f6c<\/h4>\n<ol>\n<li>\n<p>\u5c0f\u7a0b\u5e8f\u542f\u52a8\uff0c\u521d\u59cb\u5316\u7b2c\u4e00\u4e2a\u9875\u9762<\/p>\n<\/li>\n<li>\n<p>\u6253\u5f00\u65b0\u9875\u9762\uff0c\u8c03\u7528 API wx.navigateTo \u6216\u4f7f\u7528\u7ec4\u4ef6 <\/p>\n<\/li>\n<li>\n<p>\u9875\u9762\u91cd\u5b9a\u5411\uff0c\u8c03\u7528 API wx.redirectTo \u6216\u4f7f\u7528\u7ec4\u4ef6 <\/p>\n<\/li>\n<li>\n<p>\u9875\u9762\u8fd4\u56de\uff0c\u8c03\u7528 API wx.navigateBack\u6216\u7528\u6237\u6309\u5de6\u4e0a\u89d2\u8fd4\u56de\u6309\u94ae<\/p>\n<\/li>\n<li>\n<p>tarbar\u5207\u6362<\/p>\n<\/li>\n<\/ol>\n<p style=\"margin-top: 0px;margin-bottom: 16px;font-size: 15px;line-height: 1.7em;overflow: auto;font-family:\">\u6240\u6709\u9875\u9762\u90fd\u5fc5\u987b\u5728app.json\u4e2d\u6ce8\u518c,\u4f8b\u5982\uff1a<\/p>\n<pre>{\n&nbsp;&nbsp;&nbsp;\"pages\":&nbsp;[\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"pages\/index\/index\",\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"pages\/logs\/index\"\n&nbsp;&nbsp;&nbsp;]\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h4>\u5982\u4f55\u8df3\u8f6c\u9875\u9762<\/h4>\n<ol>\n<li>\n<p>\u4f7f\u7528wx.navigateTo\u63a5\u53e3\u8df3\u8f6c,<span style=\"font-weight: 700\">\u539f\u9875\u9762\u4fdd\u7559<\/span>\u3002<\/p>\n<\/li>\n<\/ol>\n<pre>wx.navigateTo({\n&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u76ee\u7684\u9875\u9762\u5730\u5740\n&nbsp;&nbsp;&nbsp;&nbsp;url:&nbsp;'pages\/logs\/index',\n&nbsp;&nbsp;&nbsp;&nbsp;success:&nbsp;function(res){},\n&nbsp;&nbsp;&nbsp;&nbsp;...\n})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ol>\n<li>\n<p>\u4f7f\u7528wx.redirectTo\u63a5\u53e3\u8df3\u8f6c\uff0c<span style=\"font-weight: 700\">\u5173\u95ed\u539f\u9875\u9762,\u4e0d\u80fd\u8fd4\u56de<\/span>\u3002<\/p>\n<\/li>\n<\/ol>\n<pre>wx.redirectTo({\n&nbsp;&nbsp;&nbsp;&nbsp;\/\/\u76ee\u7684\u9875\u9762\u5730\u5740\n&nbsp;&nbsp;&nbsp;&nbsp;url:&nbsp;'pages\/logs\/index',\n&nbsp;&nbsp;&nbsp;&nbsp;success:&nbsp;function(res){},\n&nbsp;&nbsp;&nbsp;&nbsp;...\n})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ol>\n<li>\n<p>3.\u4f7f\u7528\u7ec4\u4ef6 \u8df3\u8f6c\u3002<\/p>\n<\/li>\n<\/ol>\n<pre>&lt;navigator&gt;\u8df3\u8f6c&lt;\/navigator&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ol>\n<li>\n<p>\u5f53\u8be5\u7ec4\u4ef6\u6dfb\u52a0redirect\u5c5e\u6027\u65f6\uff0c\u7b49\u540c\u4e8ewx.redirectTo\u63a5\u53e3\uff1b\u9ed8\u8ba4redirect\u5c5e\u6027\u4e3afalse\uff0c\u7b49\u540c\u4e8ewx.navigateTo\u63a5\u53e3\u3002<\/p>\n<\/li>\n<li>\n<p>\u7528\u6237\u70b9\u51fb\u5de6\u4e0a\u89d2\u8fd4\u56de\u6309\u94ae\uff0c\u6216\u8c03\u7528wx.navigateBack\u63a5\u53e3\u8fd4\u56de\u4e0a\u4e00\u9875\u3002<\/p>\n<\/li>\n<\/ol>\n<pre>wx.navigateBack({\ndelta:&nbsp;1\n})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ol>\n<li>\n<p>delta\u4e3a1\u65f6\u8868\u793a\u8fd4\u56de\u4e0a\u4e00\u9875\uff0c\u4e3a2\u65f6\u8868\u793a\u4e0a\u4e0a\u4e00\u9875\uff0c\u4ee5\u6b64\u7c7b\u63a8\uff1b\u5982\u679cdalta\u5927\u4e8e\u5df2\u6253\u5f00\u7684\u9875\u9762\u603b\u6570\uff0c\u5219\u8fd4\u56de\u5230\u9996\u9875\u3002\u8fd4\u56de\u540e\uff0c\u5143\u754c\u9762\u4f1a\u9500\u6bc1\u3002<\/p>\n<\/li>\n<\/ol>\n<h3> \u9875\u9762\u8df3\u8f6c\u4f20\u503c<\/h3>\n<p style=\"margin-top: 0px;margin-bottom: 16px;font-size: 15px;line-height: 1.7em;overflow: auto;font-family:\">\u5176\u5b9e\u8fd9\u4e2a\u5f88\u7b80\u5355,\u5f62\u5982\uff1a<\/p>\n<pre>url?key=value&amp;amp;key1=value1<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"margin-top: 0px;margin-bottom: 16px;font-size: 15px;line-height: 1.7em;overflow: auto;font-family:\">\u7ecf\u8fc7\u6d4b\u8bd5\uff0c\u4f20\u9012\u7684\u53c2\u6570\u6ca1\u6709\u88abURIEncode,\u4f20\u9012\u4e2d\u6587\u6ca1\u6709\u4e71\u7801\u3002\u53c2\u6570\u957f\u5ea6\u672a\u6d4b\u8bd5\u3002<\/p>\n<h3> \u5982\u4f55\u6b63\u786e\u4f7f\u7528\u9875\u9762\u8df3\u8f6c<\/h3>\n<p style=\"margin-top: 0px;margin-bottom: 16px;font-size: 15px;line-height: 1.7em;overflow: auto;font-family:\">\u5b98\u65b9\u89c4\u5b9a\u5c0f\u7a0b\u5e8f\u6700\u591a\u53ea\u80fd\u6709<span style=\"font-weight: 700\">\u4e94\u4e2a\u9875\u9762<\/span>\u540c\u65f6\u5b58\u5728\uff0c\u610f\u601d\u662f\u5728\u4e0d\u5173\u95ed\u9875\u9762\u7684\u60c5\u51b5\uff0c\u6700\u591a\u65b0\u5f00\u4e94\u4e2a\u9875\u9762\uff0c<span style=\"font-weight: 700\">\u9875\u9762\u6df1\u5ea6\u4e3a5<\/span>\u3002<\/p>\n<ol>\n<li>\n<p>\u5bf9\u4e8e\u53ef\u9006\u64cd\u4f5c\uff0c\u4f7f\u7528wx.navigateTo,\u6bd4\u5982\u4ece\u9996\u9875\u8df3\u8f6c\u5230\u4e8c\u7ea7\u9875\u9762\uff0c\u4ece\u4e8c\u7ea7\u9875\u9762\u8fd4\u56de\u662f\u4e0d\u9700\u8981\u91cd\u65b0\u6e32\u67d3\u9996\u9875<\/p>\n<\/li>\n<li>\n<p>\u5bf9\u4e8e\u4e0d\u53ef\u9006\u64cd\u4f5c\uff0c\u4f7f\u7528wx.redirectTo,\u6bd4\u5982\u7528\u6237\u767b\u5f55\u6210\u529f\u540e\uff0c\u5173\u95ed\u767b\u5f55\u9875\u9762\uff0c\u4e0d\u80fd\u8fd4\u56de\u5230\u767b\u5f55\u754c\u9762\u3002<\/p>\n<\/li>\n<li>\n<p>\u5bf9\u4e8e\u4e00\u4e9b\u4ecb\u7ecd\u6027\u7b49\u4e0d\u5e38\u7528\u9875\u9762wx.redirectTo\u6216wx.navigatrBack<\/p>\n<\/li>\n<li>\n<p>\u5bf9\u4e8e\u7c7b\u4f3c\u4e5d\u5bab\u683c\u3001\u5217\u8868\u9879\uff0c\u4f7f\u7528 \u8df3\u8f6c<\/p>\n<\/li>\n<li>\n<p>\u4e0d\u8981\u5728\u9996\u9875\u4f7f\u7528wx.redirectTo\uff0c\u8fd9\u6837\u4f1a\u5bfc\u81f4\u5e94\u7528\u65e0\u6cd5\u8fd4\u56de\u9996\u9875<\/p>\n<\/li>\n<li>\n<p>\u7b80\u5316\u9700\u6c42\u3001\u7b80\u5316\u6d41\u7a0b\uff1b\u6838\u5fc3\u529f\u80fd\u5728\u4e24\u4e09\u4e2a\u9875\u9762\u5b8c\u6210\u4fbf\u662f\u5f20\u5c0f\u9f99\u8ffd\u6c42\u300e\u5c0f\u800c\u7f8e\u300f\u7684\u4f53\u73b0<\/p>\n<\/li>\n<\/ol>\n<h3> \u9875\u9762\u6808<\/h3>\n<p style=\"margin-top: 0px;margin-bottom: 16px;font-size: 15px;line-height: 1.7em;overflow: auto;font-family:\">\u9875\u9762\u6808\u4ee5\u6808\uff08\u5148\u8fdb\u540e\u51fa\uff09\u7684\u5f62\u5f0f\u7ef4\u62a4\u9875\u9762\u4e0e\u9875\u9762\u4e4b\u95f4\u7684\u5173\u7cfb\uff1b<br \/>\u5c0f\u7a0b\u5e8f\u63d0\u4f9b\u4e86getCurrentPages()\u51fd\u6570\u83b7\u53d6\u9875\u9762\u6808\uff0c<span style=\"font-weight: 700\">\u7b2c\u4e00\u4e2a\u5143\u7d20\u4e3a\u9996\u9875\uff0c\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u4e3a\u5f53\u524d\u9875\u9762\u3002<\/span><\/p>\n<ol>\n<li>\n<p>\u4f7f\u7528wx.navigateTo\u6bcf\u65b0\u5f00\u4e00\u4e2a\u9875\u9762\uff0c\u9875\u9762\u6808\u5927\u5c0f\u52a01,\u76f4\u5230\u9875\u9762\u6808\u5927\u5c0f\u4e3a5\u4e3a\u6b62\uff1b<br \/><img decoding=\"async\" src=\"http:\/\/www.wxappclub.com\/upload\/2847d8a1-abfd-464d-97bc-5532643b6c13.png\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8def\u7531\u7684\u4f7f\u7528\u63d2\u56fe\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8def\u7531\u7684\u4f7f\u7528\u63d2\u56fe\" \/><\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528wx.navigateTo\u91cd\u590d\u6253\u5f00\u754c\u9762<br \/><img decoding=\"async\" src=\"http:\/\/www.wxappclub.com\/upload\/bd4eb917-ca60-4f29-ba45-947cb3934b31.png\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8def\u7531\u7684\u4f7f\u7528\u63d2\u56fe1\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8def\u7531\u7684\u4f7f\u7528\u63d2\u56fe1\" \/><br \/>\u4e0a\u56fe\u4e2d\uff0c\u5047\u5982\u4f7f\u7528wx.navigateTo\u4ece\u56db\u7ea7\u9875\u9762\u8df3\u8f6c\u5230\u4e8c\u7ea7\u9875\u9762\uff0c\u6b64\u65f6\u4f1a\u5728\u9875\u9762\u6808\u9876\u6dfb\u52a0\u4e00\u4e2a\u4e0e\u4e8c\u7ea7\u9875\u9762\u521d\u59cb\u72b6\u6001\u4e00\u6837\u7684\u754c\u9762\uff0c\u4f46\u4e24\u4e2a\u9875\u9762\u72b6\u6001\u662f<span style=\"max-width:90%\">\u72ec\u7acb<\/span>\u7684\u3002<span style=\"font-weight: 700\">\u9875\u9762\u6808\u5927\u5c0f\u4f1a\u52a01<\/span>\uff0c\u5982\u679c\u9875\u9762\u6808\u5927\u5c0f\u4e3a5\uff0c\u5219wx.navigateTo\u65e0\u6548<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528wx.redirectTo\u91cd\u5b9a\u5411<br \/><img decoding=\"async\" src=\"http:\/\/www.wxappclub.com\/upload\/8af3771b-6f71-4346-82e5-3faa6eaadb41.png\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8def\u7531\u7684\u4f7f\u7528\u63d2\u56fe2\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8def\u7531\u7684\u4f7f\u7528\u63d2\u56fe2\" \/><br \/>\u4e0a\u56fe\u4e2d\uff0c\u5047\u5982\u4f7f\u7528wx.redirectTo\u4ece\u56db\u7ea7\u9875\u9762\u91cd\u5b9a\u5411\u5230\u4e8c\u7ea7\u9875\u9762\uff0c\u6b64\u65f6\u4f1a\u5c06\u5173\u95ed\u56db\u7ea7\u9875\u9762\uff0c\u5e76\u4f7f\u7528\u4e8c\u7ea7\u9875\u9762\u66ff\u6362\u56db\u7ea7\u9875\u9762\uff0c\u4f46\u4e24\u4e2a\u9875\u9762\u72b6\u6001\u662f\u72ec\u7acb\u7684\u3002<span style=\"max-width:90%\">\u6b64\u65f6\u7684\u9875\u9762\u6808\u5927\u5c0f\u4e0d\u53d8\uff0c\u8bf7\u6ce8\u610f\u548c\u4f7f\u7528wx.navigateTo\u7684\u533a\u522b\u3002<\/span><\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528wx.navigateBack\u8fd4\u56de<br \/><img decoding=\"async\" src=\"http:\/\/www.wxappclub.com\/upload\/86f5dfe8-da99-4a06-af1a-e3cf81682399.png\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8def\u7531\u7684\u4f7f\u7528\u63d2\u56fe3\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8def\u7531\u7684\u4f7f\u7528\u63d2\u56fe3\" \/><br \/>\u4e0a\u56fe\u4e2d\uff0c\u5047\u5982\u5f53\u524d\u9875\u9762\u4e3a\u4e94\u7ea7\u9875\u9762\uff0c\u4f7f\u7528wx.navigateBack\uff1a<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>\u5f53delta\u4e3a1\uff0c\u5173\u95ed\u4e94\u7ea7\u9875\u9762\uff0c\u5f53\u524d\u9875\u9762\u4e3a\u56db\u7ea7\u9875\u9762\uff0c\u9875\u9762\u6808\u5927\u5c0f\u51cf1\uff1b<\/p>\n<\/li>\n<li>\n<p>\u5f53delta\u4e3a2\uff0c\u5173\u95ed\u4f9d\u6b21\u4e94\u7ea7\u9875\u9762\u548c\u56db\u7ea7\u9875\u9762\uff0c\u5f53\u524d\u9875\u9762\u4e3a\u4e09\u7ea7\u9875\u9762\uff0c\u9875\u9762\u6808\u5927\u5c0f\u51cf2\uff1b<\/p>\n<\/li>\n<li>\n<p>\u4ee5\u6b64\u7c7b\u63a8\uff0c\u76f4\u5230\u6808\u5e95\u4e3a\u6b62\uff0c\u4e5f\u5c31\u662f\u9996\u9875\u3002<\/p>\n<\/li>\n<\/ul>\n<p style=\"margin-top: 0px;margin-bottom: 16px;font-size: 15px;line-height: 1.7em;overflow: auto;font-family:\">\u4ee5\u4e0a\u4f7f\u7528wx.navigateTo\u3001wx.redirectTo\u3001wx.navigateBack\u9875\u9762\u51fa\u5165\u6808\u64cd\u4f5c\u5bf9\u9875\u9762\u6808\u7684\u5f71\u54cd\uff0c\u5e73\u65f6\u4e0d\u4e00\u5b9a\u7528\u5f97\u4e0a\uff0c\u4f46\u662f\u8fd8\u662f\u6709\u5fc5\u8981\u4e86\u89e3\u80cc\u540e\u7684\u539f\u7406\u3002<\/p>\n<p style=\"margin-top: 0px;margin-bottom: 16px;font-size: 15px;line-height: 1.7em;overflow: auto;font-family:\">\u901a\u8fc7\u5b66\u4e60\u9875\u9762\u6808\uff0c\u4f60\u81f3\u5c11\u53ef\u4ee5\u77e5\u9053\uff1a<\/p>\n<ul>\n<li>\n<p>\u5c0f\u7a0b\u5e8f\u8fd0\u884c\u65f6\u4f60\u53ef\u4ee5\u83b7\u53d6\u5230\u5df2\u7ecf\u521d\u59cb\u5316\u4e86\u7684\u9875\u9762\u7684<span style=\"font-weight: 700\">\u5c5e\u6027\u548c\u65b9\u6cd5<\/span><\/p>\n<\/li>\n<li>\n<p>\u52a8\u6001\u83b7\u53d6\u5f53\u524d\u9875\u9762\u8def\u5f84<\/p>\n<\/li>\n<li>\n<p>\u9875\u9762\u81ea\u52a8\u8df3\u8f6c<\/p>\n<\/li>\n<li>\n<p>\u4f60\u53ef\u4ee5\u901a\u8fc7getCurrentPages()\u83b7\u53d6\u9875\u9762page\u5bf9\u8c61\uff0c\u6267\u884c\u975e\u5f53\u524d\u9875js\u91cc\u7684\u65b9\u6cd5<\/p>\n<\/li>\n<\/ul>\n<p style=\"margin-top: 0px;margin-bottom: 16px;font-size: 15px;line-height: 1.7em;overflow: auto;font-family:\">\u603b\u7ed3<\/p>\n<ul>\n<li>\n<p>wx.navigateTo\u4f1a\u589e\u52a0\u9875\u9762\u6808\u5927\u5c0f\uff0c\u76f4\u5230\u9875\u9762\u6808\u5927\u5c0f\u4e3a5<\/p>\n<\/li>\n<li>\n<p>wx.redirectTo\u4e0d\u4f1a\u589e\u52a0\u9875\u9762\u6808\u5927\u5c0f<\/p>\n<\/li>\n<li>\n<p>wx.navigateBack\u4f1a\u51cf\u5c11\u9875\u9762\u6808\u5927\u5c0f\uff0c\u76f4\u5230\u9875\u9762\u6808\u5927\u5c0f\u4e3a1<\/p>\n<\/li>\n<\/ul>\n<p>\u76f8\u4fe1\u770b\u4e86\u672c\u6587\u6848\u4f8b\u4f60\u5df2\u7ecf\u638c\u63e1\u4e86\u65b9\u6cd5\uff0c\u66f4\u591a\u7cbe\u5f69\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n<p>\u63a8\u8350\u9605\u8bfb\uff1a<\/p>\n<p><\/p>\n<p><\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8def\u7531\u7684\u4f7f\u7528\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>\u6211\u4eec\u901a\u5e38\u7406\u89e3\u7684\u8def\u7531\u6307\u5206\u7ec4\u6570\u636e\u5305\u4ece\u6e90\u5230\u76ee\u7684\u5730\u65f6\uff0c\u51b3\u5b9a\u7aef\u5230\u7aef\u8def\u5f84\u7684\u7f51\u7edc\u8303\u56f4\u7684\u8fdb\u7a0b\uff1b \u501f\u7528\u4e0a\u9762\u7684\u5b9a\u4e49\uff0c\u6211\u4eec\u53ef\u4ee5\u7406\u89e3\u5c0f\u7a0b\u5e8f\u9875\u9762\u8def\u7531\uff0c\u6839\u636e\u8def\u7531\u89c4\u5219\uff08\u8def\u5f84\uff09\u4ece\u4e00\u4e2a\u9875\u9762\u8df3\u8f6c\u5230\u53e6\u4e00\u4e2a\u9875\u9762\u7684\u7684\u89c4\u5219\u3002 \u901a\u8fc7\u672c\u7bc7\u6587\u7ae0\uff0c\u4f60\u53ef\u4ee5\u5b66\u4e60\u5230\uff1a \u54ea\u4e9b\u60c5\u51b5\u4f1a\u89e6\u53d1\u9875\u9762\u8df3\u8f6c \u5982\u4f55\u8df3\u8f6c\u9875\u9762 \u9875\u9762\u4f20\u53c2 \u9875\u9762\u6808 \u300b\u300b\u300b\u54ea\u4e9b\u60c5\u51b5\u4f1a\u89e6\u53d1\u9875\u9762\u8df3\u8f6c \u5c0f\u7a0b\u5e8f\u542f\u52a8\uff0c\u521d\u59cb\u5316\u7b2c\u4e00\u4e2a\u9875\u9762 \u6253\u5f00\u65b0\u9875\u9762\uff0c\u8c03\u7528 API wx.navigateTo \u6216\u4f7f\u7528\u7ec4\u4ef6 \u9875\u9762\u91cd\u5b9a\u5411\uff0c\u8c03\u7528 API wx.redirectTo \u6216\u4f7f\u7528\u7ec4\u4ef6 \u9875\u9762\u8fd4\u56de\uff0c\u8c03\u7528 API wx.navigateBack\u6216\u7528\u6237\u6309\u5de6\u4e0a\u89d2\u8fd4\u56de\u6309\u94ae tarbar\u5207\u6362 \u6240\u6709\u9875\u9762\u90fd\u5fc5\u987b\u5728app.json\u4e2d\u6ce8\u518c,\u4f8b\u5982\uff1a { &nbsp;&nbsp;&nbsp;&#8220;pages&#8221;:&nbsp;[ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8220;pages\/index\/index&#8221;, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8220;pages\/logs\/index&#8221; &nbsp;&nbsp;&nbsp;] } \u767b\u5f55\u540e\u590d\u5236 \u5982\u4f55\u8df3\u8f6c\u9875\u9762 \u4f7f\u7528wx.navigateTo\u63a5\u53e3\u8df3\u8f6c,\u539f\u9875\u9762\u4fdd\u7559\u3002 wx.navigateTo({ &nbsp;&nbsp;&nbsp;&nbsp;\/\/\u76ee\u7684\u9875\u9762\u5730\u5740 &nbsp;&nbsp;&nbsp;&nbsp;url:&nbsp;&#8216;pages\/logs\/index&#8217;, &nbsp;&nbsp;&nbsp;&nbsp;success:&nbsp;function(res){}, &nbsp;&nbsp;&nbsp;&nbsp;&#8230; }) \u767b\u5f55\u540e\u590d\u5236 \u4f7f\u7528wx.redirectTo\u63a5\u53e3\u8df3\u8f6c\uff0c\u5173\u95ed\u539f\u9875\u9762,\u4e0d\u80fd\u8fd4\u56de\u3002 wx.redirectTo({ &nbsp;&nbsp;&nbsp;&nbsp;\/\/\u76ee\u7684\u9875\u9762\u5730\u5740 &nbsp;&nbsp;&nbsp;&nbsp;url:&nbsp;&#8216;pages\/logs\/index&#8217;, &nbsp;&nbsp;&nbsp;&nbsp;success:&nbsp;function(res){}, &nbsp;&nbsp;&nbsp;&nbsp;&#8230; }) \u767b\u5f55\u540e\u590d\u5236 3.\u4f7f\u7528\u7ec4\u4ef6 \u8df3\u8f6c\u3002 &lt;navigator&gt;\u8df3\u8f6c&lt;\/navigator&gt; \u767b\u5f55\u540e\u590d\u5236 \u5f53\u8be5\u7ec4\u4ef6\u6dfb\u52a0redirect\u5c5e\u6027\u65f6\uff0c\u7b49\u540c\u4e8ewx.redirectTo\u63a5\u53e3\uff1b\u9ed8\u8ba4redirect\u5c5e\u6027\u4e3afalse\uff0c\u7b49\u540c\u4e8ewx.navigateTo\u63a5\u53e3\u3002 \u7528\u6237\u70b9\u51fb\u5de6\u4e0a\u89d2\u8fd4\u56de\u6309\u94ae\uff0c\u6216\u8c03\u7528wx.navigateBack\u63a5\u53e3\u8fd4\u56de\u4e0a\u4e00\u9875\u3002 wx.navigateBack({ delta:&nbsp;1 }) [&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-31561","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31561","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=31561"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31561\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=31561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=31561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=31561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}