{"id":33666,"date":"2024-11-25T09:42:11","date_gmt":"2024-11-25T01:42:11","guid":{"rendered":"https:\/\/fwq.ai\/blog\/33666\/"},"modified":"2024-11-25T09:42:11","modified_gmt":"2024-11-25T01:42:11","slug":"%e6%94%be%e5%bf%83%ef%bc%8c%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0%e5%86%99%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/33666\/","title":{"rendered":"\u653e\u5fc3\uff0c\u624b\u628a\u624b\u6559\u4f60\u5199\u5fae\u4fe1\u5c0f\u7a0b\u5e8f"},"content":{"rendered":"<h1> <span style=\"font-size: 18px\">\u680f\u76ee\u4eca\u5929\u8be6\u7ec6\u6559\u5927\u5bb6\u5199\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u3002<\/span> <\/h1>\n<p><span style=\"font-size: 18px\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/5f9164f6d4303152.jpg\" class=\"aligncenter\" title=\"\u653e\u5fc3\uff0c\u624b\u628a\u624b\u6559\u4f60\u5199\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u63d2\u56fe\" alt=\"\u653e\u5fc3\uff0c\u624b\u628a\u624b\u6559\u4f60\u5199\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u63d2\u56fe\" \/><\/span><\/p>\n<h1>\u5c0f\u7a0b\u5e8f\u7684\u5386\u53f2\u4ecb\u7ecd<\/h1>\n<h2>\u4ec0\u4e48\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\uff1f<\/h2>\n<p>\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\uff0c\u7b80\u79f0\u5c0f\u7a0b\u5e8f\u3002\u82f1\u6587\u540dmini program\uff0c\u662f\u4e00\u79cd\u4e0d\u9700\u8981\u4e0b\u8f7d\u5b89\u88c5\u5c31\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u7684\u5e94\u7528\u3002\u4ed6\u5b9e\u73b0\u4e86\u89e6\u624b\u53ef\u53ca\u7684\u68a6\u60f3\u3002\u7528\u6237\u626b\u4e00\u626b\u6216\u641c\u4e00\u4e0b\u5c31\u53ef\u4ee5\u76f4\u63a5\u6253\u5f00\u5e94\u7528\u3002<\/p>\n<h2>\u4e3a\u4ec0\u4e48\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f<\/h2>\n<ol>\n<li>\u5fae\u4fe1\u6709\u6d77\u91cf\u7528\u6237<\/li>\n<li>\u63a8\u5e7fapp\u6216\u516c\u4f17\u53f7\u6210\u672c\u592a\u9ad8<\/li>\n<li>\u5f00\u53d1\u9002\u914d\u6210\u672c\u4f4e<\/li>\n<li>\u5bb9\u6613\u5c0f\u89c4\u6a21\u8bd5\u9519\uff0c\u7136\u540e\u5feb\u901f\u8fed\u4ee3<\/li>\n<li>\u8de8\u5e73\u53f0<\/li>\n<\/ol>\n<h2>\u5386\u53f2<\/h2>\n<ol>\n<li>2016\u5e741\u670811\u65e5\uff0c\u5f20\u5c0f\u9f99\uff0c\u5fae\u4fe1\u5185\u90e8\u7814\u7a76\u65b0\u7684\u5f62\u6001\uff0c\u5e94\u7528\u53f7\uff0c\u540e\u6539\u540d\u5c0f\u7a0b\u5e8f\u3002<\/li>\n<li>2016\u5e748\u670812\u65e5\uff0c\u5f00\u59cb\u5185\u6d4b<\/li>\n<li>2017\u5e741\u67089\u65e5\uff0c\u4e0a\u7ebf<\/li>\n<\/ol>\n<p>#\u73af\u5883\u89c4\u8303<\/p>\n<ol>\n<li>\n<p>\u6ce8\u518c\u8d26\u53f7<\/p>\n<p>mp.weixin.qq.com\/ &nbsp;(\u5e10\u53f7\u4fe1\u606f &#8212; \u90ae\u7bb1\u6fc0\u6d3b &#8212; \u4fe1\u606f\u767b\u8bb0)<\/p>\n<\/li>\n<li>\n<p>\u83b7\u53d6id<\/p>\n<pre>APPID \uff08[\u767b\u5f55\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0](https:\/\/mp.weixin.qq.com\/wxamp\/devprofile\/get_profile?token=942994743&amp;lang=zh_CN) ---&gt; \u5f00\u53d1 ---&gt; \u5f00\u53d1\u8bbe\u7f6e\uff09\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><img style=\"max-width:90%\">&#8221; class=&#8221;lazyload&#8221; src=&#8221;\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/25d7088598ce45b3a304a999018c1fe9~tplv-k3u1fbpfcp-zoom-1.image&#8221; data-width=&#8221;800&#8243; data- style=&#8221;max-width:90%&#8221;\/&gt;<\/p>\n<\/li>\n<li>\n<p>\u5f00\u53d1\u8005\u5de5\u5177<\/p>\n<p>\u5fae\u4fe1\u5f00\u53d1\u8005\u5de5\u5177\u4e0b\u8f7d<\/p>\n<\/li>\n<\/ol>\n<h1>\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8005\u5de5\u5177<\/h1>\n<p>&nbsp; &nbsp; \u5f00\u53d1\u8005\u5de5\u5177\u4ecb\u7ecd<\/p>\n<p>&nbsp; &nbsp; \u5feb\u6377\u952e\uff1a<\/p>\n<pre>1. ctrl + shift + F (\u641c\u7d22)\n2. alt + shift + F (\u4ee3\u7801\u683c\u5f0f\u5316---VSCode)\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><img style=\"max-width:90%\">&#8221; class=&#8221;lazyload&#8221; src=&#8221;\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/6e8eee16d0ca4e529f078e6ef2b553e9~tplv-k3u1fbpfcp-zoom-1.image&#8221; data-width=&#8221;800&#8243; data- style=&#8221;max-width:90%&#8221;\/&gt;<\/p>\n<h1>\u5c0f\u7a0b\u5e8f\u539f\u751f\u6846\u67b6<\/h1>\n<p>\u5c0f\u7a0b\u5e8f\u7684\u539f\u751f\u6846\u67b6\uff0cmina\u6846\u67b6 &nbsp; \u6846\u67b6\u8be6\u60c5<\/p>\n<h2>\u5c0f\u7a0b\u5e8f\u914d\u7f6e\u6587\u4ef6\uff08\u5199\u914d\u7f6e\u6587\u4ef6\u5728\u5fae\u4fe1\u5f00\u53d1\u8005\u5de5\u5177\u5de5\u5177\u5199\uff0c\u6709\u63d0\u793a\uff09<\/h2>\n<ol>\n<li>\n<p>app.json &nbsp; \u5168\u5c40\u914d\u7f6e\u6587\u4ef6<\/p>\n<pre>\u914d\u7f6e\u5168\u5c40\u6587\u4ef6\n\n* pages\uff1a\u6dfb\u52a0\u8981\u521b\u5efa\u7684\u6587\u4ef6\u9879\uff0c\u4fdd\u5b58\u540e\u5c31\u4f1a\u81ea\u52a8\u751f\u6210\u6587\u4ef6\n\n* [windows](https:\/\/developers.weixin.qq.com\/miniprogram\/dev\/reference\/configuration\/page.html)\uff1a\u8bbe\u7f6e\u5c0f\u7a0b\u5e8f\u7684\u72b6\u6001\u680f\uff0c\u5bfc\u822a\u6761\uff0c\u6807\u9898\u7a97\u53e3\u989c\u8272\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><img style=\"max-width:90%\">&#8221; class=&#8221;lazyload&#8221; src=&#8221;\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/920738a3ebb54b7aae722ee957f01039~tplv-k3u1fbpfcp-zoom-1.image&#8221; data-width=&#8221;800&#8243; data- style=&#8221;max-width:90%&#8221;\/&gt;<\/p>\n<pre>* [tabBar](https:\/\/developers.weixin.qq.com\/miniprogram\/dev\/reference\/configuration\/app.html)\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><img style=\"max-width:90%\">&#8221; class=&#8221;lazyload&#8221; src=&#8221;\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/4e4e475460ba4aa3b039a57c34700913~tplv-k3u1fbpfcp-zoom-1.image&#8221; data-width=&#8221;800&#8243; data- style=&#8221;max-width:90%&#8221;\/&gt;<\/p>\n<\/li>\n<li>\n<p>page.json &nbsp; \u9875\u9762\u914d\u7f6e\u6587\u4ef6<\/p>\n<\/li>\n<li>\n<p>sitemap<\/p>\n<\/li>\n<\/ol>\n<h1>\u5c0f\u7a0b\u5e8f\u7684\u6a21\u677f\u8bed\u6cd5<\/h1>\n<p>WXML &nbsp; &#8212;&gt; &nbsp; HTML &nbsp; (\u7ed3\u5408\u57fa\u7840\u7ec4\u4ef6\uff0c\u4e8b\u4ef6\u7cfb\u7edf\uff0c\u6784\u4ef6\u51fa\u9875\u9762\u7ed3\u6784)<\/p>\n<ol>\n<li>\u76f8\u5f53\u4e8e \uff0c\u884c\u5185\u6807\u7b7e\uff0c\u4e0d\u4f1a\u6362\u884c<\/li>\n<li>\u76f8\u5f53\u4e8e\uff0c\u5757\u7ea7\u5143\u7d20\uff0c\u4f1a\u6362\u884c<\/li>\n<\/ol>\n<h2>\u6570\u636e\u7ed1\u5b9a<\/h2>\n<p>{{ \u6570\u636e }}<\/p>\n<ol>\n<li>\n<p>\u8fd0\u7b97 &#8211;&gt; \u8868\u8fbe\u5f0f\uff08 \u6570\u503c\u8ba1\u7b97\uff0c\u5b57\u7b26\u4e32\u62fc\u63a5\uff0c\u4e09\u5143\u8868\u8fbe\u5f0f\uff09<\/p>\n<\/li>\n<li>\n<p>\u5217\u8868\u5faa\u73af \uff08wx:for\uff09<\/p>\n<p>wx:key\u7ed1\u5b9a\u7684\u662f\u6570\u7ec4\u4e2d\u7684\u4e3a\u552f\u4e00\u5c5e\u6027\uff0cwx:key=<em>this\u8868\u793a\u6570\u7ec4\u662f\u666e\u901a\u6570\u7ec4\uff0c`<\/em>this`\u662f\u5faa\u73af\u9879<\/p>\n<pre>&lt;view wx:for=\"{{ person }}\" wx:for-item=\"item\" wx:for-index=\"index\"wx:key=\"id\"&gt;\n    \u7d22\u5f15\uff1a {{ index }}\n    \u540d\u79f0\uff1a {{ item.name }}&lt;\/view&gt;\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p>\u6807\u7b7e &nbsp; &#8212;&gt; &nbsp; \u5360\u4f4d\u6807\u7b7e<\/p>\n<\/li>\n<li>\n<p>\u6761\u4ef6\u6e32\u67d3\uff08wx:if\uff09\uff08wx:if, wx:elif, wx:else\uff09 (hidden &nbsp;\u5c5e\u6027\u662f\u901a\u8fc7\u6dfb\u52a0\u6837\u5f0f\u7684\u65b9\u5f0f\u6765\u5448\u73b0\u7684)<\/p>\n<p>\u5f53\u6807\u7b7e\u4e0d\u662f\u9891\u7e41\u7684\u5207\u6362\u4f7f\u7528if\uff0c\u9891\u7e41\u5207\u6362\u4f7f\u7528hidden<\/p>\n<\/li>\n<\/ol>\n<h2>\u4e8b\u4ef6\u7ed1\u5b9a<\/h2>\n<p>\u5173\u952e\u5b57\uff1abind \uff08bindinput\uff0cbindtap\u3010\u70b9\u51fb\u4e8b\u4ef6\u3011\uff09<\/p>\n<p>\u83b7\u53d6\u4e8b\u4ef6\u6e90\u5bf9\u8c61\u7684\u503c\uff1a<\/p>\n<pre> e.detail.value\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u83b7\u53d6data\u4e2d\u6570\u636e\u7684\u503c\uff1a<\/p>\n<pre> this.data.\u5c5e\u6027\u540d\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5c06\u4e8b\u4ef6\u6e90\u5bf9\u8c61\u7684\u503c\u8bbe\u7f6e\u56dedata\u4e2d\uff1a<\/p>\n<pre> this.setData({\n        num: this.data.num + operation\n});\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4e8b\u4ef6\u7ed1\u5b9a\u662f\u4e0d\u80fd\u76f4\u63a5\u4f20\u53c2\uff0c\u8981\u901a\u8fc7\u81ea\u5b9a\u4e49\u5c5e\u6027\u7684\u65b9\u5f0f\u4f20\u53c2\uff08 {{ \u4f20\u9012\u7684\u53c2\u6570}} \uff09\uff1a<\/p>\n<pre> &lt;button bindtap=\"bandletap\" data-operation=\"{{ 1 }}\"&gt;+&lt;\/button&gt;\n \n bandletap(e) {\n    \/\/ console.log(e);\n    const operation = e.currentTarget.dataset.operation;\n    this.setData({\n        num: this.data.num + operation\n    });\n  },\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u6837\u5f0f<\/h2>\n<h3>\u5c3a\u5bf8\u5355\u4f4d<\/h3>\n<p>\u5f53\u5c4f\u5e55\u5bbd\u5ea6\u7b49\u4e8e 750px \u65f6\uff0c1px = 1rpx<\/p>\n<p>\u5f53\u5c4f\u5e55\u5bbd\u5ea6\u7b49\u4e8e375px\u65f6\uff0c 1px =0.5rpx<\/p>\n<h3>\u6837\u5f0f\u5bfc\u5165\u53ea\u652f\u6301\u76f8\u5bf9\u8def\u5f84<\/h3>\n<h3>\u9009\u62e9\u5668\uff08\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u4e0d\u652f\u6301\u901a\u914d\u7b26\uff09<\/h3>\n<h1>\u5c0f\u7a0b\u5e8f\u7684\u5185\u7f6e\u7ec4\u4ef6<\/h1>\n<p>\u5c0f\u7a0b\u5e8f\u4e2d\u5e38\u7528\u7684\u5e03\u5c40\u7ec4\u4ef6\uff1a<\/p>\n<pre>view,text,rich-text,button,image,icon,swiper,radio,checkbox\u7b49\u3002\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ol>\n<li>\n<p>view\u6807\u7b7e &nbsp;\u76f8\u5f53\u4e8e &nbsp;p\u6807\u7b7e<\/p>\n<\/li>\n<li>\n<p>text\u6807\u7b7e \u53ea\u80fd\u5d4c\u5957text\u6807\u7b7e &nbsp;\u957f\u6309\u6587\u5b57\u53ef\u4ee5\u590d\u5236\u3010selectable\u3011\uff08\u53ea\u6709\u8fd9\u4e2a\u6807\u7b7e\u6709\u8fd9\u4e2a\u529f\u80fd\uff09 \u53ef\u4ee5\u5bf9\u56de\u8f66,\u7a7a\u683c\u8fdb\u884c\u7f16\u7801 (decode)<\/p>\n<\/li>\n<li>\n<p>image\u6807\u7b7e \uff08\u6253\u5305\u4e0a\u7ebf\u7684\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc72M\uff0c\u4f7f\u7528\u56fe\u7247\u7684\u65f6\u5019\u7edf\u4e00\u4f7f\u7528\u5916\u7f51\u56fe\u7247\uff09<\/p>\n<ol>\n<li>\n<p>\u56fe\u7247\u5b58\u5728\u9ed8\u8ba4\u7684\u5bbd\u9ad8\uff08320px * 240px\uff09<\/p>\n<\/li>\n<li>\n<p>mode \u51b3\u5b9a \u56fe\u7247\u5185\u5bb9 \u548c \u56fe\u7247\u6807\u7b7e \u505a\u9002\u914d<\/p>\n<p>scaleToFill &nbsp;\u9ed8\u8ba4\u503c &nbsp; \u4e0d\u4fdd\u6301\u7eb5\u6a2a\u6bd4\uff0c\u62c9\u4f38\u81f3\u6807\u7b7e\u5b9a\u4e49\u7684\u5bbd\u9ad8<\/p>\n<p>aspectFit &nbsp;\u4fdd\u6301\u5bbd\u9ad8\u6bd4\uff0c\u4fdd\u8bc1\u56fe\u7247\u7684\u957f\u8fb9\u5b8c\u5168\u663e\u793a\uff08\u5e38\u7528 \u8f6e\u64ad\u56fe\uff09<\/p>\n<p>aspectFill &nbsp; &nbsp;\u77ed\u8fb9\u5b8c\u5168\u663e\u793a<\/p>\n<p>widthFix &nbsp; \u5bbd\u5ea6\u4e0d\u53d8\uff0c\u9ad8\u5ea6\u81ea\u52a8\u53d8\u5316\uff0c\u4fdd\u6301\u539f\u5bbd\u9ad8\u6bd4\u4e0d\u53d8<\/p>\n<p>top\uff0cleft\uff0cbottom\uff0cright &nbsp; \u80cc\u666f\u56fe\u5b9a\u4f4d<\/p>\n<\/li>\n<li>\n<p>\u5c0f\u7a0b\u5e8f\u4e2d\u7684\u56fe\u7247 &nbsp;\u76f4\u63a5\u652f\u6301 \u61d2\u52a0\u8f7d<\/p>\n<p>lazy-load \u4f1a\u81ea\u5df1\u5224\u65ad &nbsp;\u5f53\u56fe\u7247\u51fa\u73b0\u5728\u89c6\u53e3\u7684\u4e0a\u4e0b\u4e09\u5c4f\u4e4b\u5185\u7684\u65f6\u5019\uff0c\u81ea\u5df1\u5f00\u59cb\u52a0\u8f7d\u56fe\u7247<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p>swiper\u6807\u7b7e &nbsp; &#8212;\u300b \u8f6e\u64ad\u56fe<\/p>\n<p>swiper\u9ad8\u5ea6 &nbsp;= &nbsp;swiper\u7684\u5bbd\u5ea6 &nbsp;* &nbsp;\u56fe\u7247\u7684\u9ad8\u5ea6 &nbsp;\/ &nbsp;\u539f\u56fe\u7684\u5bbd\u5ea6<\/p>\n<pre>&lt;swiper autoplay interval=\"1000\" circular indicator-dots&gt;\n    \/\/ \u56fe\u7247\u5b58\u5728\u9ed8\u8ba4\u5bbd\u9ad8  320 * 240    &lt;swiper-item&gt;&lt;image model=\"widthFix\" src=\"\" \/&gt;&lt;\/image&gt;&lt;\/swiper-item&gt;&lt;\/swiper&gt;\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p>navigator &nbsp;\u5bfc\u822a\u7ec4\u4ef6 (\u5757\u7ea7\u5143\u7d20\uff0c\u9ed8\u8ba4\u6362\u884c)<\/p>\n<pre>&lt;navigator url=\"\/pages\/homepage\/index\" open-type=\"navigate\"&gt;&lt;\/navigator&gt;\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p>rich-text(\u5bcc\u6587\u672c\u6807\u7b7e\uff0c\u5c06\u5b57\u7b26\u4e32\u89e3\u6790\u6210\u5bf9\u5e94\u6807\u7b7e\uff0c\u76f8\u5f53\u4e8ev-html)<\/p>\n<pre>\/\/ 1 \u6807\u7b7e\u5b57\u7b26\u4e32&lt;rich-text nodes=\"{{ html }}\"&gt;&lt;\/rich-text&gt;\/\/ 2 \u5bf9\u8c61\u6570\u7ec4&lt;rich-text nodes=\"{{ html.model }}\"&gt;&lt;\/rich-text&gt;\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p>button &nbsp;\u6309\u94ae<\/p>\n<p>\u5927\u5c0f\uff08size:mini\/default\uff09\uff0c\u989c\u8272(type:default\/primary\/warn)\uff0c\u662f\u5426\u9542\u7a7a\uff08plain\uff09\uff0c\u662f\u5426\u5728\u6587\u5b57\u524d\u6709\u52a0\u8f7dloading\uff08loading\uff09\uff0c\u5f00\u53d1\u80fd\u529b\uff08opentype\uff09<\/p>\n<\/li>\n<\/ol>\n<p>\u5f00\u653e\u80fd\u529b\uff08opentype\uff09:<\/p>\n<ol>\n<li>\n<p>concat \u76f4\u63a5\u6253\u5f00 &nbsp;\u5ba2\u670d\u5bf9\u8bdd &nbsp;\u529f\u80fd\uff0c\u9700\u8981\u5728\u5c0f\u7a0b\u5e8f\u7684\u540e\u53f0\u914d\u7f6e<\/p>\n<ol>\n<li>\u5c06\u5c0f\u7a0b\u5e8f\u7684appid\u7531\u6d4b\u8bd5\u53f7\u6539\u4e3a\u81ea\u5df1\u7684appid<\/li>\n<li>\u767b\u5f55\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5b98\u7f51\uff0c\u6dfb\u52a0 &nbsp;\u5ba2\u670d &nbsp;&#8211; &nbsp; \u5fae\u4fe1<\/li>\n<\/ol>\n<\/li>\n<li>\n<p>share \u8f6c\u53d1\u5f53\u524d\u5c0f\u7a0b\u5e8f\u5230\u5fae\u4fe1\u670b\u53cb\u4e2d \uff0c\u4e0d\u80fd\u628a\u5c0f\u7a0b\u5e8f\u8f6c\u53d1\u5230\u670b\u53cb\u5708\u4e2d<\/p>\n<\/li>\n<li>\n<p>getPhoneNumber \u83b7\u53d6\u5f53\u524d\u7528\u6237\u7684\u624b\u673a\u53f7\u7801\uff0c\u7ed3\u5408\u4e8b\u4ef6\u6765\u4f7f\u7528\uff0c\u4e0d\u662f\u4f01\u4e1a\u7684\u5c0f\u7a0b\u5e8f\u8d26\u53f7 \u6ca1\u6709\u6743\u9650\u6765\u83b7\u53d6\u7528\u6237\u7684\u624b\u673a\u53f7\u7801<\/p>\n<\/li>\n<li>\n<p>getUserInfo\u83b7\u53d6\u7528\u6237\u7684\u4e2a\u4eba\u4fe1\u606f<\/p>\n<\/li>\n<li>\n<p>launchApp\u5728 &nbsp;\u5c0f\u7a0b\u5e8f &nbsp; \u4e2d\u76f4\u63a5\u6253\u5f00 app<\/p>\n<\/li>\n<li>\n<p>openSetting \u6253\u5f00\u5c0f\u7a0b\u5e8f\u5185\u7f6e\u7684\u6388\u6743\u9875\u9762<\/p>\n<p>\u53ea\u4f1a\u51fa\u73b0\u7528\u6237\u70b9\u51fb\u8fc7\u7684\u6743\u9650<\/p>\n<\/li>\n<li>\n<p>feedback &nbsp; \u6253\u5f00\u5c0f\u7a0b\u5e8f\u5185\u7f6e\u7684\u610f\u89c1\u53cd\u9988\u9875\u9762<\/p>\n<\/li>\n<li>\n<p>icon<\/p>\n<p>type\uff1a\u7c7b\u578b success\uff0csuccess_no_circle,info,warn,wating.success_no_circle,info,warn,waiting\uff0ccancel,downkload\uff0csearch\uff0cclear<\/p>\n<p>size\uff1a\u5927\u5c0f &nbsp; number \/ &nbsp;string<\/p>\n<p>color\uff1a\u989c\u8272<\/p>\n<\/li>\n<li>\n<p>radio \u5355\u9009\u6846<\/p>\n<pre>&lt;radio-group bindchange=\"handleChange\"&gt;\n    &lt;radio color=\"red\" value=\"male\"&gt;\u7537&lt;\/radio&gt;\n    &lt;radio color=\"red\" value=\"female\"&gt;\u5973&lt;\/radio&gt;&lt;\/radio-group&gt;&lt;view&gt;\u9009\u4e2d\u7684\u662f\uff1a {{ gender }} &lt;\/view&gt;data\uff1a{\n    gender: \"\"\n},\nhandleChange(e) {\n    \/\/ \u83b7\u53d6\u5355\u9009\u6846\u9009\u4e2d\u7684\u503c\n    let gender = e.detail.value;\n    \/\/ \u628a\u503c\u8d4b\u503c\u7ed9data\u4e2d\u7684\u6570\u636e\n    this.setData({\n        gender \/\/ \u76f8\u5f53\u4e8e gender\uff1agender\n    })\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p>checkbox &nbsp;\u591a\u9009\u6846<\/p>\n<pre>&lt;checkbox-group bindchange=\"handleChange\"&gt;\n    &lt;checkbox value=\"{{ item.value }}\" wx:for=\"{{ list }}\" wx:key=\"id\"&gt;{{ item.name }}           &lt;\/checkbox&gt;&lt;\/checkbox-group&gt;&lt;view&gt;\u9009\u4e2d\u7684\u662f\uff1a {{ checkedList }} &lt;\/view&gt;checkedList:[]\nhandleChange(e) {\n    let checkedList = e.detail.value;\n    this.setData({\n        checkedList\n    })\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ol>\n<h1>\u5c0f\u7a0b\u5e8f\u7684\u751f\u547d\u5468\u671f<\/h1>\n<h2>\u5e94\u7528\u751f\u547d\u5468\u671f<\/h2>\n<p>\u89e6\u53d1\u8fc7\u7a0b\uff1a<\/p>\n<p>onLaunch &nbsp; &nbsp;-\u300b onShow<\/p>\n<pre>App({    \/\/ 1 \u5e94\u7528 \u7b2c\u4e00\u6b21\u542f\u7528\u7684\u65f6\u5019\u89e6\u53d1\n    onLaunch() {        \/\/ \u5728\u5e94\u7528\u7b2c\u4e00\u6b21\u542f\u52a8\u7684\u65f6\u5019 \u83b7\u53d6\u7528\u6237\u4fe1\u606f\n    }    \n    \/\/ 2 \u5e94\u7528 \u88ab\u7528\u6237\u770b\u5230\u7684\u65f6\u5019\u89e6\u53d1\n    onShow() {        \/\/ \u5e38\u7528\u4e8e\u5c0f\u7a0b\u5e8f\u754c\u9762\u4e4b\u95f4\u7684\u5207\u6362\n        \/\/ \u5bf9\u5e94\u7528\u7684\u6570\u636e\u6216\u8005\u9875\u9762\u7684\u6548\u679c\u8fdb\u884c\u91cd\u7f6e\n    }    \/\/ 3 \u5e94\u7528 \u88ab\u9690\u85cf\u7684\u65f6\u5019\u89e6\u53d1\n    onHide() {        \/\/ \u6682\u505c\u6216\u8005\u6e05\u695a\u5b9a\u65f6\u5668\n    }    \/\/ 4 \u5e94\u7528 \u4ee3\u7801\u53d1\u751f\u62a5\u9519\u7684\u65f6\u5019  \u6267\u884c\n    onError() {        \/\/ \u5728\u5e94\u7528\u53d1\u751f\u4ee3\u7801\u62a5\u9519\u7684\u65f6\u5019\uff0c\u6536\u96c6\u7528\u6237\u7684\u9519\u8bef\u4fe1\u606f\uff0c\u901a\u8fc7\u5f02\u6b65\u8bf7\u6c42\uff0c\u5c06\u9519\u8bef\u4fe1\u606f\u53d1\u9001\u5230\u540e\u53f0\u53bb\n    }    \/\/ 5 \u9875\u9762\u627e\u4e0d\u5230\u7684\u65f6\u5019\u5c31\u4f1a\u89e6\u53d1\n    \/\/ \u5e94\u7528\u7b2c\u4e00\u6b21\u542f\u52a8\u7684\u65f6\u5019\uff0c\u5982\u679c\u627e\u4e0d\u5230\u7b2c\u4e00\u4e2a\u5165\u53e3\u9875\u9762\uff0c\u624d\u4f1a\u89e6\u53d1\n    onPageNotFound() {        \/\/ \u5982\u679c\u9875\u9762\u4e0d\u5b58\u5728\u4e86  \u901a\u8fc7js\u7684\u65b9\u5f0f\u6765\u91cd\u65b0\u8df3\u8f6c\u9875\u9762  \u91cd\u65b0\u8df3\u8f6c\u5230\u7b2c\u4e8c\u4e2a\u9996\u9875\n        \/\/ \u4e0d\u80fd\u8df3\u8f6c\u5230tabbar\u9875\u9762  \u5bfc\u822a\u7ec4\u4ef6\u7c7b\u4f3c\n        wx.navigateTo({            url: \"\/pages\/demo02\/index\"\n        })\n    }\n})\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u9875\u9762\u751f\u547d\u5468\u671f<\/h2>\n<p>onLoad &nbsp; -&gt; &nbsp;onShow &nbsp;-&gt; &nbsp;onReady<\/p>\n<pre>Page({    data: {\n        \n    },    onLoad: function(options) {        \/\/ onload\u53d1\u9001\u5f02\u6b65\u8bf7\u6c42\u6765\u521d\u59cb\u5316\u9875\u9762\u6570\u636e\n    },    onShow: function() {        \/\/ \u9875\u9762\u663e\u793a\u52a0\u8f7d\n    },    onReady: function() {        \/\/ \u9875\u9762\u521d\u6b21\u6e32\u67d3\u5b8c\u6210\n    },    onHide: function() {        \/\/ \u9875\u9762\u9690\u85cf\u65f6\u52a0\u8f7d  \u4e00\u4e2a\u9875\u9762\u8df3\u8f6c\u5230\u53e6\u5916\u4e00\u4e2a\u9875\u9762\u4e5f\u4f1a\u89e6\u53d1onHide\u4e8b\u4ef6\n    },    onUnload: function() {        \/\/ \u9875\u9762\u5378\u8f7d  \u4e5f\u53ef\u4ee5\u901a\u8fc7\u8d85\u94fe\u63a5   \u5173\u95ed\u5f53\u524d\u9875\u9762\u5c31\u4f1a\u89e6\u53d1onUnload\u4e8b\u4ef6\n        \/\/ &lt;navigator url=\"\/pages\/demo01\/demo01\" open-typr-redirect&gt;demo01&lt;\/navigator&gt;\n        \n        \/\/ \u5173\u95ed\u5f53\u524d\u9875\u9762\u5c31\u4ee3\u8868\u7740\u5378\u8f7d\u9875\u9762\n    },    onPullDownRefresh: function() {        \/\/ \u76d1\u542c\u7528\u6237\u4e0b\u62c9\u4e8b\u4ef6  \"enablePullDownRefresh\":true\n        \/\/  \u9875\u9762\u6548\u679c\u7684\u91cd\u65b0\u52a0\u8f7d\n    },    onReachBotton: function() {        \/\/ \u76d1\u542c\u7528\u6237\u4e0a\u62c9\u89e6\u5e95\u4e8b\u4ef6   \u3010\u9700\u8981\u8ba9\u9875\u9762\u51fa\u73b0\u4e0a\u4e0b\u7684\u6eda\u52a8\u624d\u884c\u3011\n        \/\/ \u5e38\u7528\u4e8e  \u4e0a\u62c9\u52a0\u8f7d\u4e0b\u4e00\u9875\u64cd\u4f5c\n    },    onShareAppMessage: function() {        \/\/ \u7528\u6237\u70b9\u51fb\u53f3\u4e0a\u89d2\u8f6c\u53d1\n    },    onPageScroll: function() {        \/\/ \u9875\u9762\u6eda\u52a8\u5c31\u89e6\u53d1\n    },    onResize: function() {        \/\/ \u9875\u9762\u5c3a\u5bf8\u53d1\u751f\u53d8\u5316\u7684\u65f6\u5019\u89e6\u53d1   \n        \/\/ \u5e38\u6307 \u624b\u673a\u6a2a\u5c4f\u7ad6\u5c4f\u7684\u65f6\u5019  \u89e6\u53d1    \n        \/\/  app.json\u4e2d\u6dfb\u52a0   \"pageOrientation\":\"auto\"\n    },    onTabItemTap: function() {        \/\/ 1. \u5f53\u524d\u9875\u9762\u5fc5\u987b\u4e3atabbar\u9875\u9762\n        \/\/ 2. \u70b9\u51fb\u7684\u662f\u81ea\u5df1\u7684tab  item\u7684\u65f6\u5019\u624d\u89e6\u53d1\n    }\n})\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h1>\u5c0f\u7a0b\u5e8f\u81ea\u5b9a\u4e49\u7ec4\u4ef6<\/h1>\n<p>\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\n<p>\u521b\u5efa<\/p>\n<\/li>\n<li>\n<p>\u58f0\u660e\uff08\u90a3\u4e2a\u9875\u9762\u8981\u4f7f\u7528\u81ea\u5b9a\u4e49\u7ec4\u4ef6\uff0c\u5c31\u5728\u90a3\u4e2a\u9875\u9762\u7684json\u6587\u4ef6\u4e2d\u58f0\u660e\uff09<\/p>\n<pre>{    \"usingComponents\": {        \"Tabs\": \"..\/..\/components\/Tabs\/Tabs\"\n    }\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p>\u4f7f\u7528<\/p>\n<pre>&lt;Tabs&gt;&lt;\/Tabs&gt;\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ol>\n<p>\u6ce8\u610f\uff1a<\/p>\n<ul>\n<li>\n<p>\u9875\u9762\u7684.js\u6587\u4ef6\u4e2d\uff0c\u5b58\u653e\u4e8b\u4ef6\u56de\u8c03\u51fd\u6570\u7684\u65f6\u5019\uff0c\u5b58\u653e\u5728data\u540c\u5c42\u7ea7\u4e0b<\/p>\n<\/li>\n<li>\n<p>\u7ec4\u4ef6\u7684.js\u6587\u4ef6\u4e2d\uff0c\u5b58\u653e\u65f6\u95f4\u7684\u56de\u8c03\u51fd\u6570\u7684\u65f6\u5019\uff0c\u5b58\u653e\u5728methods\u4e2d<\/p>\n<\/li>\n<li>\n<p>\u5728\u5c0f\u7a0b\u5e8f\u4e2d\u4e0d\u8981\u76f4\u63a5\u901a\u8fc7this.data.x.\u6765\u4fee\u6539\u6570\u7ec4\u7684\u503c\uff08\u5efa\u8bae\u5148\u62f7\u8d1d\u4e00\u4efd\u6570\u7ec4\uff0c\u7136\u540e\u518d\u5bf9\u62f7\u8d1d\u7684\u6570\u7ec4\u8fdb\u884c\u4fee\u6539\uff09<\/p>\n<pre>let tabs = JSON.parse(JSON.stringify(this.data.tabs));let tabs = this.data;\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<h2>\u7ec4\u4ef6\u4e4b\u95f4\u7684\u4f20\u503c<\/h2>\n<h3>\u7236\u7ec4\u4ef6\u5411\u5b50\u7ec4\u4ef6\u4f20\u503c<\/h3>\n<p>\u901a\u8fc7 \u6807\u7b7e\u7684\u5c5e\u6027\u6765\u4f20\u9012\u7684\uff1a<\/p>\n<ol>\n<li>\n<p>\u7236\u7ec4\u4ef6\u4f20\u9012<\/p>\n<pre>&lt;Tabs aaa=\"123\"&gt;&lt;\/Tabs&gt;\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p>\u5b50\u7ec4\u4ef6\u63a5\u6536<\/p>\n<pre>Component({    \/\/ \u91cc\u9762\u5b58\u653e\u7684\u662f\u8981\u4ece\u7236\u7ec4\u4ef6\u4e2d\u63a5\u6536\u7684\u6570\u636e\n    properties: {        \/\/ \u8981\u63a5\u53d7\u7684\u6570\u636e\u7684\u540d\u79f0\n        aaa:{            \/\/type \u63a5\u6536\u6570\u636e\u7684\u7c7b\u578b\n            type: String,            \/\/value \u9ed8\u8ba4\u503c\n            value: \"\"\n        }\n    }\n});\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p>\u5b50\u7ec4\u4ef6\u4f7f\u7528\u7236\u7ec4\u4ef6\u4e2d\u4f20\u9012\u8fc7\u6765\u7684\u6570\u636e<\/p>\n<p>\u5c06\u63a5\u6536\u8fc7\u6765\u7684\u6570\u636e\u5f53\u4f5c\u672c\u8eabdata\u4e2d\u7684\u6570\u636e\u6765\u4f7f\u7528<\/p>\n<pre>&lt;view&gt;{{ aaa }}&lt;\/view&gt;\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ol>\n<h3>\u5b50\u7ec4\u4ef6\u5411\u7236\u7ec4\u4ef6\u4f20\u503c<\/h3>\n<p>\u901a\u8fc7\u4e8b\u4ef6\u6765\u4f20\u9012\u7684\u3002<\/p>\n<p>tab\u5207\u6362\u680f\uff0c\u70b9\u51fb\u5207\u6362\u3002<\/p>\n<ol>\n<li>\u7ed1\u5b9a\u70b9\u51fb\u4e8b\u4ef6 &nbsp; \u9700\u8981\u5728methods\u4e2d\u7ed1\u5b9a<\/li>\n<li>\u83b7\u53d6\u88ab\u70b9\u51fb\u7684\u7d22\u5f15<\/li>\n<li>\u83b7\u53d6\u539f\u6570\u7ec4<\/li>\n<li>\u5bf9\u6570\u7ec4\u5faa\u73af\n<ol>\n<li>\u7ed9\u6bcf\u4e00\u4e2a\u5faa\u73af\u9879 &nbsp;\u9009\u4e2d\u5c5e\u6027 &nbsp; \u6539\u4e3a &nbsp;false<\/li>\n<li>\u7ed9 &nbsp; \u5f53\u524d\u7684\u7d22\u5f15 &nbsp;\u7684 &nbsp; \u9879 &nbsp;\u6dfb\u52a0\u6fc0\u6d3b\u9009\u4e2d\u6548\u679c<\/li>\n<\/ol>\n<\/li>\n<li>\u70b9\u51fb\u4e8b\u4ef6\u89e6\u53d1\u7684\u65f6\u5019\uff0c\u89e6\u53d1\u7236\u7ec4\u4ef6\u4e2d\u7684\u81ea\u5b9a\u4e49\u4e8b\u4ef6\u540c\u65f6\u4f20\u9012\u7ed9\u7236\u7ec4\u4ef6\n<ol>\n<li>this.triggerEvent(&#8220;\u7236\u7ec4\u4ef6\u81ea\u5b9a\u4e49\u4e8b\u4ef6\u7684\u540d\u79f0&#8221;\uff0c\u8981\u4f20\u9012\u7684\u53c2\u6570)<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>Tabs\u9875\u9762\u4e2d\uff1a<\/p>\n<pre>&lt;view \n      wx:for=\"{{tabs}}\" \n      wx:key=\"id\" \n      class=\"title_item {{item.isActive?'active':''}}\"\n      bindtap=\"hanldeItemTap\"\n      data-index=\"{{index}}\"&gt;{{ item.name }}&lt;\/view&gt;&lt;view class=\"tabs_content\"&gt;\n    \/\/ \u5360\u4f4d\u7b26  \u4f20\u9012\u7684\u53c2\u6570\u4f1a\u66ff\u6362\u6389 \n    &lt;slot&gt;&lt;\/slot&gt;&lt;\/view&gt;\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5b50\u7ec4\u4ef6\u7684js\u6587\u4ef6\u4e2d\uff1a(\u8fd9\u6837\u5199\u4e0d\u80fd\u6539\u53d8\u7ec4\u4ef6\u5185\u90e8\u7684\u6570\u636e\uff0c\u53ea\u662f\u57fa\u4e8e\u6837\u5f0f\u7684\u6539\u53d8\uff0c\u4e0d\u662f\u57fa\u4e8e\u529f\u80fd)<\/p>\n<pre>methods: {\n    hanldeItemTap(e) {        \/\/ \u83b7\u53d6\u7d22\u5f15\n        const {index} = e.currentTarget.dataset;        \/\/ let {tabs} = this.data;\n        \/\/ tabs.forEach((v,i) =&gt; i===index?v.isActive=true:v.isActive=false);\n        \/\/ \u4fee\u6539data\u4e2d\u7684\u6570\u636e\n        \/\/ this.setData({\n        \/\/    tabs\n        \/\/ })\n        \n        \/\/ \u89e6\u53d1\u7236\u7ec4\u4ef6\u4e2d\u7684\u81ea\u5b9a\u4e49\u4e8b\u4ef6\u540c\u65f6\u4f20\u9012\u7ed9\u7236\u7ec4\u4ef6\n        this.triggerEvent(\"itemChange\", {\n            index\n        })\n    }\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5728<strong>\u7236\u7ec4\u4ef6<\/strong>\u4e2d\u7684\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u4e2d\u6dfb\u52a0\u81ea\u5b9a\u4e49\u4e8b\u4ef6\uff1a<\/p>\n<pre>&lt;Tabs binditemChange=\"handleItemChange\"&gt;\n    &lt;block wx:if=\"{{tabs[0].isActive}}\"&gt;1&lt;\/block&gt;\n    &lt;block wx:if=\"{{tabs[1].isActive}}\"&gt;2&lt;\/block&gt;\n    &lt;block wx:else&gt;3&lt;\/block&gt;&lt;\/Tabs&gt;\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u7236\u7ec4\u4ef6<\/strong>\u7684js\u4e2d\uff1a<\/p>\n<pre>data: {    tabs: [\n        {            id: 1,            name: \"\u9996\u9875\",            isActive: true\n        },\n        {            id: 2,            name: \"\u5f85\u53d1\u8d27\",            isActive: false\n        },\n        {            id: 3,            name: \"\u5f85\u4ed8\u6b3e\",            isActive: false\n        }\n    ]\n}\/\/ \u81ea\u5b9a\u4e49\u4e8b\u4ef6   \u63a5\u6536\u5b50\u7ec4\u4ef6\u4f20\u9012\u7684\u6570\u636e\u7684handleItemChange(e) {    \/\/ \u63a5\u6536\u4f20\u9012\u8fc7\u6765\u7684\u53c2\u6570\n    const {index} = e.detail;    \/\/ \u62ff\u5230\u539f\u6570\u7ec4\n    let {tabs} = this.data;\n    tabs.forEach((v,i) =&gt; i===index?v.isActive=true:v.isActive=false);    \/\/ \u4fee\u6539data\u4e2d\u7684\u6570\u636e\n    this.setData({\n        tabs\n    })\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u5176\u4ed6\u5c5e\u6027<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u5b9a\u4e49\u6bb5<\/th>\n<th>\u7c7b\u578b<\/th>\n<th><\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>properties<\/td>\n<td>Object Map<\/td>\n<td><\/td>\n<td>\u7ec4\u4ef6\u7684\u5bf9\u5916\u5c5e\u6027\uff0c\u662f\u5c5e\u6027\u540d\uff0c\u662f\u5c5e\u6027\u8bbe\u7f6e\u7684\u6620\u5c04\u8868<\/td>\n<\/tr>\n<tr>\n<td>data<\/td>\n<td>Object<\/td>\n<td><\/td>\n<td>\u5e38\u7528\u4e8e\u7236\u7ec4\u4ef6\u5411\u5b50\u7ec4\u4ef6\u4f20\u503c\uff0c\u5b50\u7ec4\u4ef6\u63a5\u6536\u7236\u7ec4\u4ef6\u7684\u503c<\/td>\n<\/tr>\n<tr>\n<td>observers<\/td>\n<td>Object<\/td>\n<td><\/td>\n<td>\u76d1\u542cproperties\u548cdata\u7684\u6570\u636e\u53d8\u5316<\/td>\n<\/tr>\n<tr>\n<td>methods<\/td>\n<td>Object<\/td>\n<td><\/td>\n<td>\u7ec4\u4ef6\u7684\u65b9\u6cd5<\/td>\n<\/tr>\n<tr>\n<td>created<\/td>\n<td>Function<\/td>\n<td><\/td>\n<td>\u7ec4\u4ef6\u7684\u751f\u547d\u5468\u671f\u51fd\u6570\uff08\u7ec4\u4ef6\u5b9e\u4f8b\u521a\u521a\u88ab\u88ab\u521b\u5efa\u65f6\u6267\u884c\uff09\u6b64\u65f6\u4e0d\u80fd\u8c03\u7528setData<\/td>\n<\/tr>\n<tr>\n<td>attached<\/td>\n<td>Function<\/td>\n<td><\/td>\n<td>\u7ec4\u4ef6\u5b9e\u4f8b\u8fdb\u5165\u9875\u9762\u8282\u70b9\u6811\u65f6\u6267\u884c<\/td>\n<\/tr>\n<tr>\n<td>ready<\/td>\n<td>Function<\/td>\n<td><\/td>\n<td>\u7ec4\u4ef6\u5e03\u5c40\u5b8c\u6210\u65f6\u6267\u884c<\/td>\n<\/tr>\n<tr>\n<td>moved<\/td>\n<td>Function<\/td>\n<td><\/td>\n<td>\u79fb\u52a8\u6267\u884c<\/td>\n<\/tr>\n<tr>\n<td>detached<\/td>\n<td>Function<\/td>\n<td><\/td>\n<td>\u79fb\u9664\u6267\u884c<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>\u9879\u76ee<\/h1>\n<ol>\n<li>\u9996\u9875<\/li>\n<li>\u5546\u54c1\u5217\u8868<\/li>\n<li>\u8d2d\u7269\u8f66<\/li>\n<li>\u6388\u6743\u9875\u9762<\/li>\n<li>\u5546\u54c1\u641c\u7d22<\/li>\n<li>\u5546\u54c1\u6536\u85cf<\/li>\n<li>\u5546\u54c1\u5206\u7c7b<\/li>\n<li>\u5546\u54c1\u8be6\u60c5<\/li>\n<li>\u7ed3\u7b97<\/li>\n<li>\u8ba2\u5355\u5217\u8868<\/li>\n<li>\u4e2a\u4eba\u4e2d\u5fc3<\/li>\n<li>\u610f\u89c1\u53cd\u9988<\/li>\n<\/ol>\n<h2>\u5c0f\u7a0b\u5e8f\u7684\u7b2c\u4e09\u65b9\u6846\u67b6<\/h2>\n<ol>\n<li>\u817e\u8baf wepy &nbsp;\u7c7b\u4f3c\u4e8e &nbsp;vue<\/li>\n<li>\u7f8e\u56e2 &nbsp;mpvue &nbsp;\u7c7b\u4f3c\u4e8e &nbsp;vue<\/li>\n<li>\u4eac\u4e1c taro &nbsp;\u7c7b\u4f3c\u4e8e &nbsp;react<\/li>\n<li>\u6ef4\u6ef4 &nbsp; chameleon<\/li>\n<li>uni-app &nbsp;\u7c7b\u4f3c\u4e8e &nbsp;vue<\/li>\n<li>\u539f\u751f\u6846\u67b6 MINA<\/li>\n<\/ol>\n<h2>\u4f7f\u7528\u963f\u91cc\u5b57\u4f53\u56fe\u6807\u5e93<\/h2>\n<ol>\n<li>\n<p>\u5728\u963f\u91cc\u56fe\u6807\u5b98\u7f51\uff0c\u5c06\u8981\u4f7f\u7528\u7684\u56fe\u6807\uff0c\u52a0\u5165\u8d2d\u7269\u8f66<\/p>\n<\/li>\n<li>\n<p>\u5c06\u56fe\u6807\uff0c\u52a0\u5165\u9879\u76ee<\/p>\n<\/li>\n<li>\n<p>\u5c0f\u7a0b\u5e8f pyg &nbsp; &#8212;\u300b &nbsp; &nbsp;Font class\uff08\u901a\u8fc7\u7c7b\u7684\u65b9\u5f0f\u6765\u4f7f\u7528\u56fe\u6807\uff09 &nbsp; &#8212;\u300b &nbsp; \u67e5\u770b\u5728\u7ebf\u94fe\u63a5<\/p>\n<\/li>\n<li>\n<p>\u5728\u9879\u76ee\u7684styles\u6587\u4ef6\u5939\u4e2d\uff0c\u521b\u5efaiconfont.wxss\u6587\u4ef6<\/p>\n<\/li>\n<li>\n<p>\u6253\u5f00\u94fe\u63a5\uff0c\u5c06\u94fe\u63a5\u4e2d\u7684\u5185\u5bb9\u590d\u5236\u5230iconfont.wxss\u6587\u4ef6\u4e2d<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u5b57\u4f53\u56fe\u6807\u5e93\u4e2d\u7684\u5b57\u4f53<\/p>\n<ol>\n<li>\n<p>\u5728\u5168\u5c40wxss\u6587\u4ef6\u4e2d\uff0c\u5f15\u5165wxss\u6587\u4ef6<\/p>\n<pre>@import \".\/styles\/iconfont.wxss\"\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p>\u4f7f\u7528<\/p>\n<pre>&lt;text class=\"iconfont icon-shoucang\"&gt;&lt;\/text&gt;\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h2>tabBar<\/h2>\n<p><strong>\u5728app.json\u4e2d\u914d\u7f6e<\/strong><\/p>\n<pre>tbaBar: {    \"color\": \"\",    \/\/\u672a\u9009\u4e2d\u7684\u5b57\u4f53\u7684\u989c\u8272\n    \"selectedColor\": \"\",    \/\/\u9009\u4e2d\u540e\u7684\u5b57\u4f53\u7684\u989c\u8272\n    \"backgroundColor\": \"\",  \/\/ \u80cc\u666f\u8272\n    \"position\": \"\", \/\/\u5b9a\u4f4d\n    \"borderStyle\": \"\",   \/\/\u8fb9\u6846\u6837\u5f0f \n    \"list\": [\n        {            \"pagePath\": \"\",   \/\/ \u9875\u9762\u7684\u8def\u5f84\n            \"text\": \"\",   \/\/ \u6807\u9898\u7684\u540d\u79f0\n            \"iconPath\": \"\",   \/\/ \u672a\u9009\u4e2d\u7684\u56fe\u6807\u8def\u5f84\n            \"selectedIconPath\": \"\"   \/\/ \u9009\u4e2d\u540e\u7684\u56fe\u6807\u7684\u8def\u5f84\n        }\n    ]\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u9875\u9762\u6837\u5f0f\u7684\u521d\u59cb\u5316<\/h2>\n<p><strong>\u6ce8\u610f\uff1a\u5728\u5c0f\u7a0b\u5e8f\u4e2d\u662f\u4e0d\u652f\u6301 \u901a\u914d\u7b26\uff08*\uff09\u7684<\/strong><\/p>\n<p>\u5728app.wxss\u6587\u4ef6\u4e2d<\/p>\n<pre>page,view,text,swiper,swiper-item,image,navigator {\n    padding: 0;\n    margin: 0;\n    box-sizing: border-box;\n}\n\n\n\/*\n    \u4e3b\u9898\u989c\u8272\n    1. less \u4e2d\u662f\u5b58\u5728  \u53d8\u91cf  \u7684\n    2. \u539f\u751f\u7684css\u548cwxss \u4e5f\u662f\u652f\u6301 css\u7684\n*\/\npage {\n    --themeColor: #eb4500;\n    \/\/ \u8bbe\u8ba1\u7a3f\u5927\u5c0f\u4e3a 375px \u65f6,1px = 2rpx,14px = 28rpx\n    font-size: 28rpx;\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4f7f\u7528\u4e3b\u9898\u989c\u8272:<\/strong><\/p>\n<pre>view {\n    color: var(--themeColor);\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u5934\u90e8<\/h2>\n<p>\u8bbe\u7f6e\u4e3b\u9898\u8272:<\/p>\n<pre>\"window\": {    \"backgroundTextStyle\": \"light\",   \/\/ \u5b57\u4f53\u989c\u8272\n    \"navigatorBarBackgroundColor\": \"#2b4500\",  \/\/ \u80cc\u666f\u8272\n    \"navigatorBarText\": \"\u552f\u54c1\u4f1a\",  \/\/ \u5b57\u4f53\u63d0\u793a\n    \"navigatorBarTextStyle\": \"white\",  \/\/ \u5b57\u4f53\u6837\u5f0f    }\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u4f7f\u7528\u63a5\u53e3\u6570\u636e<\/h2>\n<pre>Page({    data: {        swiperList: []\n    },    \/\/ \u9875\u9762\u52a0\u8f7d\u4e8b\u4ef6\n    onLoad: function() {        \/*\n            1. \u53d1\u9001\u5f02\u6b65\u8bf7\u6c42 \u83b7\u53d6\u4f7f\u7528\u7684\u6570\u636e\n        *\/\n        wx.request({            url: '',  \/\/ \u63a5\u53e3\u5730\u5740\n            success: (result) =&gt; {                \/\/ \u8bf7\u6c42\u6210\u529f \u7ed9swiperList\u6570\u7ec4\u8d4b\u503c\n                this.setData({                    swiperList: result.data.message\n                })\n            }\n            \n        });        \/*\n            wx.request\u5f02\u6b65\u8bf7\u6c42\u592a\u591a\u4e86\u5c31\u4f1a\u4ea7\u751f   \u56de\u8c03\u5730\u72f1   \u7684\u95ee\u9898\n            \n            \u89e3\u51b3\u65b9\u6cd5:  es6\u4e2d\u7684promise\n        *\/\n    }\n})\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u8bf7\u6c42\u62a5\u9519(\u4e24\u79cd\u89e3\u51b3\u65b9\u6cd5):<\/strong><\/p>\n<ol>\n<li>\u5728\u5c0f\u7a0b\u5e8f \u8be6\u60c5 \u754c\u9762 &nbsp;\u52fe\u9009\u4e0a &nbsp;\u4e0d\u6821\u9a8c\u5408\u6cd5\u57df\u540d,web-view(\u4e1a\u52a1\u57df\u540d),TLS\u7248\u672c\u4ee5\u53caHTTPS\u8bc1\u4e66<\/li>\n<li>\u914d\u7f6e\u8bf7\u6c42\u63a5\u53e3 &nbsp;\u89c1 &nbsp;<strong>8.7.\u5c06\u5c0f\u7a0b\u5e8f\u8bf7\u6c42\u7684\u57df\u540d\u6dfb\u52a0\u5230\u540e\u53f0<\/strong> <\/li>\n<\/ol>\n<h2>\u89e3\u51b3\u56de\u8c03\u5730\u72f1\u7684\u95ee\u9898(es6\u7684promise)<\/h2>\n<p>\u5728\u9879\u76ee\u7684request\u6587\u4ef6\u5939\u4e2d\u521b\u5efaindex.js\u6587\u4ef6<\/p>\n<p><strong>\u901a\u8fc7\u5c01\u88c5\u65b9\u6cd5,\u7136\u540e\u8c03\u7528\u51fd\u6570\u4f20\u9012\u53c2\u6570\u7684\u65b9\u5f0f\u6765\u4f7f\u7528<\/strong><\/p>\n<pre>\/\/ \u540c\u65f6\u53d1\u9001\u5f02\u6b65\u4ee3\u7801\u7684\u6b21\u6570let ajaxTime=0;export const request=(params) =&gt; {\n    ajaxTime++;    \/\/ \u6570\u636e\u52a0\u8f7d\u6548\u679c\n    wx.showLoding({       title: \"\u52a0\u8f7d\u4e2d\",        mask: true\n    });    return new Promise((resolve, reject) =&gt; {\n        wx.request({            \/\/ \u89e3\u6784\u4f20\u9012\u7684\u53c2\u6570\n            ...params,            success: (result) =&gt; {\n                resolve(result);\n            },            faile: (err) =&gt; {\n                reject(err);\n            },            \/\/ \u4e0d\u7ba1\u662f\u6210\u529f\u8fd8\u662f\u5931\u8d25\u90fd\u4f1a\u8c03\u7528\u8fd9\u4e2a\u51fd\u6570\n            complete: () =&gt; {\n                ajaxTime--;                if(ajaxTime === 0) {                   \/\/ \u5173\u95ed\u6b63\u5728\u7b49\u5f85\u7684\u56fe\u6807\n                    wx.hideLoading();\n                }                \n            }\n        });\n    });\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4f7f\u7528\u5c01\u88c5\u597d\u7684\u8bf7\u6c42\u65b9\u6cd5:<\/strong><\/p>\n<pre>\/\/  \u5f15\u5165\u5c01\u88c5\u6587\u4ef6 (\u6ce8\u610f: \u4e00\u5b9a\u8981\u628a\u8def\u5f84\u8865\u5168)import { request } from '..\/..\/request\/index.js';  \/\/ \u8fd9\u91cc\u5f15\u5165\u7684\u662f\u5c01\u88c5\u7684request\u51fd\u6570Page({    data: {        swiperList: []\n    },    \/\/ \u9875\u9762\u52a0\u8f7d\u4e8b\u4ef6\n    onLoad: function() {        \/*\n            1. \u53d1\u9001\u5f02\u6b65\u8bf7\u6c42 \u83b7\u53d6\u4f7f\u7528\u7684\u6570\u636e\n        *\/\n        \/*\n            wx.request({\n                url: '',  \/\/ \u63a5\u53e3\u5730\u5740\n                success: (result) =&gt; {\n                    \/\/ \u8bf7\u6c42\u6210\u529f \u7ed9swiperList\u6570\u7ec4\u8d4b\u503c\n                    this.setData({\n                        swiperList: result.data.message\n                    })\n                }\n\n            });\n        *\/\n        \/*\n            wx.request\u5f02\u6b65\u8bf7\u6c42\u592a\u591a\u4e86\u5c31\u4f1a\u4ea7\u751f   \u56de\u8c03\u5730\u72f1   \u7684\u95ee\u9898\n            \n            \u89e3\u51b3\u65b9\u6cd5:  es6\u4e2d\u7684promise\n        *\/\n        \n        \/\/ \u8c03\u7528\u65b9\u6cd5\n        this.getSwiperList();\n        \n    },    \/\/ \u8c03\u7528\u5c01\u88c5\u597d\u7684\u65b9\u6cd5\n    getSwiperList() {        \/\/  \u8fd9\u91cc\u586b\u5145\u7684\u6570\u636e\u4f1a\u66ff\u6362\u6389request\u65b9\u6cd5\u4e2d\u7684...params,\n        request({ url: 'htltps:\/\/api\/zbtbs\/home\/swiperList'}); \n        \/\/  \u6570\u636e\u83b7\u53d6\u6210\u529f\n        .then (result =&gt; {            this.setData({                swiperList: result.data.message\n            })\n        });\n    }\n})\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u5c06\u5c0f\u7a0b\u5e8f\u8bf7\u6c42\u7684\u57df\u540d\u6dfb\u52a0\u5230\u540e\u53f0<\/h2>\n<ol>\n<li>\u8fdb\u5165 &nbsp; &nbsp;\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0<\/li>\n<li>\u5f00\u53d1<\/li>\n<li>\u5f00\u53d1\u8bbe\u7f6e<\/li>\n<li>\u670d\u52a1\u5668\u57df\u540d<\/li>\n<li>\u6dfb\u52a0request\u5408\u6cd5\u57df\u540d<\/li>\n<\/ol>\n<h2>\u83b7\u53d6\u672c\u5730\u5b58\u50a8\u7684\u6570\u636e<\/h2>\n<p><strong>web\u4e2d\u7684\u672c\u5730\u5b58\u50a8 &nbsp;\u548c &nbsp; &nbsp;\u5c0f\u7a0b\u5e8f\u4e2d\u7684\u672c\u5730\u5b58\u50a8\u7684\u533a\u522b\uff1a<\/strong><\/p>\n<ol>\n<li>\u5199\u4ee3\u7801\u7684\u65b9\u5f0f\u4e0d\u4e00\u6837\n<ol>\n<li>web\u4e2d\uff1a\n<ol>\n<li>\u5b58\u50a8\u65b9\u5f0f\uff1alocalStorage.setItem(&#8220;key&#8221;, &nbsp;&#8220;value&#8221;);<\/li>\n<li>\u83b7\u53d6\u65b9\u5f0f\uff1a localStorage.getItem(&#8220;key&#8221;);<\/li>\n<\/ol>\n<\/li>\n<li>\u5c0f\u7a0b\u5e8f\u4e2d\uff1a\n<ol>\n<li>\u5b58\u50a8\u65b9\u5f0f\uff1awx.setStorageSync(&#8220;key&#8221;, &nbsp;&#8220;value&#8221;);<\/li>\n<li>\u83b7\u53d6\u65b9\u5f0f\uff1awx.getStorageSync(&#8220;key&#8221;, &nbsp;&#8220;value&#8221;);<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<li>\u5b58\u7684\u65f6\u5019 &nbsp; \u6709\u6ca1\u6709\u505a\u7c7b\u578b\u8f6c\u6362\n<ol>\n<li>web\uff1a\u4e0d\u7ba1\u5b58\u7684\u6570\u636e\u662f\u4ec0\u4e48\u7c7b\u578b\u7684\u6570\u636e\uff0c\u6700\u540e\u90fd\u4f1a\u901a\u8fc7toString\uff08\uff09\u65b9\u6cd5\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u7c7b\u578b\u7684\u6570\u636e<\/li>\n<li>\u5c0f\u7a0b\u5e8f\uff1a\u4e0d\u5b58\u5728\u6570\u636e\u7684\u7c7b\u578b\u8f6c\u6362<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<pre>\/\/ \u63a5\u53e3\u8fd4\u56de\u7684\u6570\u636eCates: [],onLoad: function(options) {    \/\/ \u83b7\u53d6\u672c\u5730\u5b58\u50a8\u4e2d\u6709\u6ca1\u6709\u65e7\u6570\u636e\n    const Cates = wx.getStorageSync(\"cate\");    \/\/ \u5224\u65ad\u672c\u5730\u662f\u5426\u5b58\u5728\n    if(!Case) {        \/\/ \u4e0d\u5b58\u5728  \u53d1\u9001\u8bf7\u6c42\u6570\u636e\n        this.setCates();\n    }else {        \/\/ \u6709\u65e7\u7684\u6570\u636e\n        \/\/ \u5b9a\u4e49\u6570\u636e\u8fc7\u671f\u7684\u65f6\u95f4\n        if(Date.now() - Cates.time &gt; 1000 * 10) {           \/\/ \u91cd\u65b0\u53d1\u9001\u8bf7\u6c42\n            this.getCates();\n        } else {            this.Cates = Cates.data;            \/\/ \u6e32\u67d3\u6570\u636e\n        }\n    }\n}\/\/ \u83b7\u53d6\u8bf7\u6c42\u7684\u6570\u636egetCates() {    \/\/ \u628a\u63a5\u53e3\u7684\u6570\u636e\u5b58\u50a8\u5230\u672c\u5730\u5b58\u50a8\u4e2d\n    wx.setStorageSync(\"cates\", {time\uff1aDate.now(),data: this.Cates});\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u5b9a\u4e49\u516c\u5171\u7684url<\/h2>\n<p>\u5728request.js\u6587\u4ef6\u4e2d\uff0c\u5c01\u88c5\u8bf7\u6c42\u65b9\u6cd5<\/p>\n<pre>export const request=(params) =&gt; {    \/\/ \u5b9a\u4e49\u516c\u5171\u7684url\n    const baseUrl = \"https:\/\/api.zbsb.cn\/api\/public\"\n    return new Promise((resolve, reject) =&gt; {\n        wx.request({            \/\/ \u89e3\u6784\u4f20\u9012\u7684\u53c2\u6570\n            ...params,            url: baseUrl + params.url;\n            success: (result) =&gt; {\n                resolve(result);\n            },            faile: (err) =&gt; {\n                reject(err);\n            }\n        });\n    });\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u5c0f\u7a0b\u5e8f\u652f\u6301es7\u7684async\u8bed\u6cd5<\/h2>\n<ol>\n<li>\n<p>\u5728\u5fae\u4fe1\u5f00\u53d1\u8005\u5de5\u5177\u4e2d\u52fe\u9009es6\u8f6ces5\u8bed\u6cd5<\/p>\n<\/li>\n<li>\n<p>\u5728github\u91cc\u9762\u4e0b\u8f7dregenerator\u5e93\u4e2d\u7684runtime.js<\/p>\n<\/li>\n<li>\n<p>\u5728\u5c0f\u7a0b\u5e8f\u76ee\u5f55\u6587\u4ef6\u4e0b\u65b0\u5efa\u6587\u4ef6\u5939\/lib\/runtime\/runtime.js\uff0c\u5c06\u4ee3\u7801\u62f7\u8d1d\u8fdb\u53bb<\/p>\n<\/li>\n<li>\n<p>\u5728\u6bcf\u4e00\u4e2a\u9700\u8981\u4f7f\u7528async\u8bed\u6cd5\u7684\u9875\u9762js\u6587\u4ef6\u4e2d\uff0c\u5f15\u5165\u6587\u4ef6<\/p>\n<pre>import regeneratorRuntime from '..\/lib\/runtime\/runtime';\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f7f\u7528asyn\u8bed\u6cd5\uff1a<\/p>\n<pre>async getCates() {    \/\/ 1 \u4f7f\u7528es7\u7684async await\u6765\u53d1\u9001\u8bf7\u6c42\n    const res=await request({url:\"\/categories\"});\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ol>\n<h2>\u5c0f\u7a0b\u5e8furl\u4f20\u53c2<\/h2>\n<pre>\/\/ \u4f20\u9012\u53c2\u6570&lt;navigator wx:for=\"Cates\" wx:for-item=\"item\" wx:for-index=\"index\" wx:key=\"id\" url=\"\/pages\/goods\/index?cid={{item.cid}}\"&gt;&lt;\/navigator&gt;\/\/ \u62ff\u53d6\u53c2\u6570\nonLoad\uff1afunction(options) {\n    consol.log(options);  \/\/ \u6253\u5370\u8f93\u51faoptions\u7684\u503c\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u5c01\u88c5tab\u5207\u6362\u7ec4\u4ef6<\/h2>\n<p>\u5c01\u88c5\u7684Tab\u7ec4\u4ef6\u4e2d\uff1a<\/p>\n<pre>properties: {    tabs: Array,    value: []\n}\n\n&lt;style&gt;\n    .tabs-title {        display: flex;\n        padding: 15rpx 0;\n    }\n    .title-item {        display: flex;\n        justify-content: center;\n        align-item: center;\n        flex: 1;\n    }\n    .active {        color: red;\n        border-bottom: 1rpx solid red;\n    }\n&lt;\/style&gt;&lt;view class=\"tabs\"&gt;\n    &lt;view class=\"tabs-title\"&gt;\n        &lt;view wx:for=\"{{ tabs }}\" wx:key=\"id\" \n        class=\"title-item {{item.isActive?'active':''}}\"\n        bindtap=\"handleItemTap\"  data-index=\"{{ index }}\"\n        &gt;   \n            {{ item.value }}         &lt;\/view&gt;\n    &lt;\/view&gt;\n    \/\/ \u5207\u6362\u5185\u5bb9    &lt;view class=\"tabs-content\"&gt;\n        &lt;slot&gt;&lt;\/slot&gt;\n    &lt;\/view&gt;&lt;\/view&gt;methods: {    \/\/ \u70b9\u51fb\u4e8b\u4ef6\n    handleItemTap(e) {        \/\/ \u83b7\u53d6\u70b9\u51fb\u7684\u7d22\u5f15\n        const {index} = e.currentTarget.dataset;        \/\/ \u89e6\u53d1\u7236\u7ec4\u4ef6\u4e2d\u7684\u4e8b\u4ef6\n        this.triggerEvent(\"tabsItemChange\", {index});\n    }\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f7f\u7528\u5c01\u88c5\u7684Tab\u7ec4\u4ef6\uff1a<\/p>\n<pre>\/\/bindtabsItemChange \u76d1\u542c\u81ea\u5b9a\u4e49\u4e8b\u4ef6&lt;Tab tabs=\"{{ tabs }}\" bindtabsItemChange=\"handelTabsItemChange\"&gt;\n    &lt;block wx:if=\"{{tabs[0].isActive}}\"&gt;1&lt;\/block&gt;\n    &lt;block wx:if=\"{{tabs[1].isActive}}\"&gt;2&lt;\/block&gt;\n    &lt;block wx:if=\"{{tabs[2].isActive}}\"&gt;3&lt;\/block&gt;&lt;\/Tab&gt;\/\/ \u6807\u9898\u7684\u70b9\u51fb\u4e8b\u4ef6\nbindtabsItemChange(e) {\n  \/\/ \u83b7\u53d6\u88ab\u70b9\u51fb\u7684\u6807\u9898\u7684\u7d22\u5f15\n  const {index} = e.detail;\n  \/\/ \u4fee\u6539\u539f\u6570\u7ec4\n  let {tabs} = this.data;\n  tabs.forEach((v,i)=&gt;i===index?v.isActive=true:v.isActive=false);\n  \/\/ \u8d4b\u503c\u5230data\u4e2d\n  this.setData({\n    tabs\n  });\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u6eda\u52a8\u6761\u89e6\u5e95\u4e8b\u4ef6\uff08\u9875\u9762\u4e0a\u6ed1\u4e8b\u4ef6\uff09<\/h2>\n<p>\u6eda\u52a8\u6761\u89e6\u5e95\uff0c\u52a0\u8f7d\u4e0b\u4e00\u9875\u6570\u636e<\/p>\n<p>\u603b\u9875\u6570 = &nbsp;Math.ceil(\u603b\u6761\u6570 \/ &nbsp;\u6bcf\u9875\u663e\u793a\u7684\u6570\u636e\u6570)<\/p>\n<pre>\/\/ \u83b7\u53d6\u5546\u54c1\u6570\u636e\u5217\u8868async getGoodsList() {    const res=await request({url:\"\/goods\/search\",data:this.QueryParams});    \/\/ \u83b7\u53d6\u603b\u6761\u6570\n    const total = res.total;    \/\/ \u8ba1\u7b97\u603b\u9875\u6570\n    this.totalPage = Math.ceil(total \/ this.QueryParams.pagesize);    \/\/ \u62fc\u63a5\u6570\u7ec4\n    this.setData({        goodsList: [...this.data.goodsList,...res.goods]\n    });    \/\/ \u5173\u95ed\u4e0b\u62c9\u5237\u65b0\u7684\u7a97\u53e3\n    wx-stopDownRefresh();\n}\/\/ \u6eda\u52a8\u6761\u89e6\u5e95\u4e8b\u4ef6onReachBottom() {    \/\/ \u5224\u65ad\u8fd8\u6709\u6ca1\u6709\u4e0b\u4e00\u9875\u6570\u636e\n    if(this.QueryParams.pagenum &gt;= this.totalPage) {        \/\/ \u5f53\u524d\u9875\u7801 &gt; \u603b\u9875\u6570    \u6ca1\u6709\u4e0b\u4e00\u9875\n        \n    }    else {        \/\/ \u8fd8\u6709\u4e0b\u4e00\u9875  \u5f53\u524d\u9875\u7801++ \u91cd\u65b0\u53d1\u9001\u8bf7\u6c42  \u6570\u636e\u8bf7\u6c42\u56de\u6765\u540e\u8981\u5bf9data\u4e2d\u7684\u6570\u7ec4\u8fdb\u884c\u62fc\u63a5\n        this.QueryParams.pagenum++\uff1b        this.getGoodsList();\n    }\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u4e0b\u62c9\u5237\u65b0\u9875\u9762<\/h2>\n<ol>\n<li>\u89e6\u53d1\u4e0b\u62c9\u5237\u65b0\u4e8b\u4ef6\uff08\u9700\u8981\u5728\u9875\u9762\u7684json\u6587\u4ef6\u4e2d\u5f00\u542f\u4e00\u4e2a\u914d\u7f6e\u9879\uff09\u3010enablePullDownRefresh: true,backgroundTextStyle: dark\u3011<\/li>\n<li>\u91cd\u7f6e &nbsp;\u6570\u636e &nbsp;\u6570\u7ec4<\/li>\n<li>\u91cd\u7f6e\u9875\u7801 &nbsp; \u8bbe\u7f6e\u4e3a1<\/li>\n<li>\u91cd\u65b0\u53d1\u9001\u8bf7\u6c42<\/li>\n<li>\u6570\u636e\u8bf7\u6c42\u6210\u529f\uff0c\u624b\u52a8\u5173\u95ed\u7b49\u5f85\u6548\u679c<\/li>\n<\/ol>\n<pre>onPullDownRefresh() {    \/\/ \u91cd\u7f6e  \u6570\u636e  \u6570\u7ec4\n    this.setData({        goodsList: []\n    });    \/\/ \u91cd\u7f6e\u9875\u7801   \u8bbe\u7f6e\u4e3a1\n     this.QueryParams.pagenum=1;    \/\/ \u91cd\u65b0\u53d1\u9001\u8bf7\u6c42\n    this.getGoodsList();\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>wx.showModel\u6539\u53d8this\u7684\u6307\u5411\u95ee\u9898<\/h2>\n<pre>wx.showModel({    title: '\u63d0\u793a',    content: '\u60a8\u662f\u5426\u8981\u5220\u9664\uff1f',    success :(res) =&gt; {\n        ...\n    }\n})\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>js\u4e2d\u7684\u5220\u9664<\/h2>\n<pre>cart.splice(index, 1);  \/\/ \u5220\u9664\u7d22\u5f15\u4e3aindex\u7684\u5143\u7d20cart.filter(v =&gt; v.checked);  \/\/ \u6311\u9009\u51facart\u6570\u7ec4\u4e2dchecked\u4e3atrue\u7684\u503c\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u5f39\u7a97\u7684\u5c01\u88c5<\/h2>\n<p><strong>\u5728asyncWX.js\u6587\u4ef6\u4e2d<\/strong><\/p>\n<pre>export const showModel=({content}) =&gt; {    return new Promise((resolve,reject) =&gt; {\n        wx.showModel({            title: '\u63d0\u793a',            content: content,            success :(res) &gt; {\n                resolve(res);\n            },            fail :(err) =&gt; {\n                reject(err);\n            }\n        })\n    })\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4f7f\u7528<\/strong><\/p>\n<pre>import {showModel} from '..\/..\/utils\/asyncWx.js';async showTips() {    const res=await showModel({content: '\u60a8\u662f\u5426\u8981\u5220\u9664\uff1f'})    if(res.confirm) {\n       cart.splice(index, 1);        this.setData(cart);\n    }\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u83b7\u53d6\u7f13\u5b58\u4e2d\u7684\u6570\u636e<\/h2>\n<pre>wx.getStorageSync(\"address\");\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h2>\u5fae\u4fe1\u652f\u4ed8<\/h2>\n<ol>\n<li>\u4f01\u4e1a\u8d26\u53f7<\/li>\n<li>\u5728\u4f01\u4e1a\u8d26\u53f7\u7684\u5c0f\u7a0b\u5e8f\u540e\u53f0\u4e2d &nbsp;\u5fc5\u987b &nbsp;\u7ed9 &nbsp;\u5f00\u53d1\u8005\u6dfb\u52a0\u4e0a\u767d\u540d\u5355\n<ol>\n<li>\u4e00\u4e2aAppID\u53ef\u4ee5\u7ed1\u5b9a\u591a\u4e2a\u5f00\u53d1\u8005<\/li>\n<li>\u7ed1\u5b9a\u4e4b\u540e\u7684\u5f00\u53d1\u8005\u5c31\u62e5\u6709\u4e86\u5f00\u53d1\u8005\u7684\u6743\u9650\u4e86<\/li>\n<\/ol>\n<\/li>\n<li>\u652f\u4ed8\u6309\u94ae\n<ol>\n<li>\u5148\u5224\u65ad\u7f13\u5b58\u4e2d\u6709\u6ca1\u6709token<\/li>\n<li>\u6ca1\u6709 &nbsp;\u8df3\u8f6c\u5230\u6388\u6743\u9875\u9762 &nbsp; \u83b7\u53d6\u7528\u6237\u7684 token \u503c<\/li>\n<li>\u6709 &nbsp;\u6267\u884c\u652f\u4ed8\u64cd\u4f5c<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><strong>\u6d41\u7a0b\uff1a\u521b\u5efa\u8ba2\u5355\uff0c\u51c6\u5907\u9884\u652f\u4ed8\uff0c\u53d1\u8d77\u5fae\u4fe1\u652f\u4ed8\uff0c\u67e5\u8be2\u8ba2\u5355<\/strong><\/p>\n<p><strong>\u4e00\uff0c\u83b7\u53d6token<\/strong><\/p>\n<pre>handleOrderPay() {   try {        \/\/ 1. \u5224\u65ad\u7f13\u5b58\u4e2d\u6709\u6ca1\u6709token\u503c\n        const token = wx.getStorageSync(\"token\");        \/\/ 2. \u5224\u65ad\n        if(!token) {            \/\/ \u8df3\u8f6c\u5230  \u6388\u6743 \u9875\u9762\n            wx.navigateTo({                url: \"\/page\/auth\/index\"\n            })            return;\n        }        \/\/ 3. \u521b\u5efa\u8ba2\u5355\n        \/\/ \u51c6\u5907\u521b\u5efa\u8ba2\u5355\u9700\u8981\u7684\u53c2\u6570\n        const header = {Authorization:token};        \/\/ \u51c6\u5907\u8bf7\u6c42\u4f53\u53c2\u6570\n        const order_price = this.data.totalPrice;   \/\/ \u8ba2\u5355\u603b\u4ef7\u683c\n        const consignee = this.data.address.all;  \/\/ \u8be6\u7ec6\u5730\u5740\n        let goods = [];        const cart = this.data.cart;\n        goods.forEach(v =&gt; goods.push({            goods_Id: v.goods_Id, \/\/ \u5546\u54c1\u7684id\n            goods_number: v.goods_number, \/\/\u5546\u54c1\u6570\u91cf\n            goods_price: v.goods_price  \/\/ \u5546\u54c1\u7684\u5355\u4ef7\n        }))        const orderParams = {order_price,consignee,goods}        \/\/ 4. \u51c6\u5907\u53d1\u9001\u8bf7\u6c42  \u521b\u5efa\u8ba2\u5355  \u83b7\u53d6\u8ba2\u5355\u7f16\u53f7\n        const {order_number}=await request({url:                     \"\/order\/create\"},method:\"POST\",data:orderParams,head:head});        \/\/ 5. \u53d1\u8d77 \u9884\u652f\u4ed8\u63a5\u53e3\n        const {pay}=await request({url:\"\/order\/req_unifiedorder\",method:\"POST\",head,data:{order_number}});        \/\/ 6. \u53d1\u8d77\u5fae\u4fe1\u652f\u4ed8\n        await requestPayment(pay);        \/\/ 7. \u67e5\u8be2\u540e\u53f0  \u8ba2\u5355\u72b6\u6001\u662f\u5426\u6210\u529f\n        const res=await request(url:\"\/orders\/chkOrder\",method:\"POST\",head,data:{order_number}});        \/\/ \u63d0\u793a\u652f\u4ed8\u6210\u529f\n        await showToast({title:\"\u652f\u4ed8\u6210\u529f\"});        \/\/ \u624b\u52a8\u5220\u9664 \u7f13\u5b58\u4e2d\u652f\u4ed8\u6210\u529f\u8d2d\u7269\u8f66\u7684\u6570\u636e\n        let newCart = wx.getStorageSync(\"cart\");        \/\/ \u8fc7\u6ee4\u51fa\u6ca1\u6709\u88ab\u9009\u4e2d\u7684\u6570\u636e\n        newCart = newCart.filter(v =&gt; !v.checked);\n        wx.setStorageSync(\"cart\",newCart);        \/\/ 8.\u652f\u4ed8\u6210\u529f  \u8df3\u8f6c\u5230\u8ba2\u5355\u9875\u9762\n        wx.navigateTo({            url: '\/page\/order\/index'\n        })\n   } catch(err) {       await showToast({title:\"\u652f\u4ed8\u5931\u8d25\"});\n   }\n    \n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>page\/autn\/index\u9875\u9762\u4e2d\uff1a<\/p>\n<pre>&lt;button open-type=\"getUserInfo\" bindgetUserInfo=\"handleGetUserInfo\"&gt;\n    \u83b7\u53d6\u6388\u6743&lt;\/button&gt;\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre>\/\/ \u83b7\u53d6\u7528\u6237\u4fe1\u606f\/\/ encryptedData  \/\/ rawData\/\/ iv\/\/ signatureasync handleGetUserInfo(e) {    try {        \/\/ \u83b7\u53d6\u7528\u6237\u4fe1\u606f\n        const { encryptedData,rawData,iv,signature } = e.detail;        \/\/ \u83b7\u53d6\u5c0f\u7a0b\u5e8f\u767b\u5f55\u4e4b\u540e\u7684token\u503c  \u5728asyncWX.js\u4e2d\u5c01\u88c5token\u8bf7\u6c42\u65b9\u6cd5\n        \/\/ wx.login({\n        \/\/     timeout: 1000,\n        \/\/    success: (result) =&gt; {\n        \/\/      cost { code } = result;   \n        \/\/    }\n        \/\/ })\n        const {code} = await login();        const loginParams = { encryptedData, rawData, iv, signature, code }        \/\/ \u53d1\u9001\u8bf7\u6c42  \u83b7\u53d6\u7528\u6237\u7684token\n        const {token}=await request(url: '\/user\/wxlogin',data: loginParams,methods:         \"post\");        \/\/ \u5c06\u83b7\u53d6\u5230\u7684token\u5b58\u50a8\u5230\u7f13\u5b58\u4e2d\uff0c\u540c\u65f6\u8df3\u8f6c\u56de\u4e0a\u4e00\u4e2a\u754c\u9762\n        wx.getStroageSync(\"token\", token);\n        wx.navigateBack({            data: 1 \/\/ \u8fd4\u56de\u4e0a\u4e00\u5c42\n        })    \n    } catch(err) {        console.log(err);\n    }\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5728asyncWX.js\u6587\u4ef6\u4e2d\u5c01\u88c5\u652f\u4ed8\u65b9\u6cd5\uff1a<\/p>\n<pre>export const requestPayment=(pay) =&gt; {    return new Promise((resolve,reject){\n        wx.request({\n           ...pay,           success: (result) =&gt; {\n                resolve(result);\n           },           fail: (err) =&gt; {\n               reject(err);\n           }\n        })                   \n    })\n}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u4e8c\uff0c\u51c6\u5907\u9884\u652f\u4ed8\uff08\u83b7\u53d6\u53c2\u6570 pay\uff09<\/strong><\/p>\n<p><strong>\u4e09\uff0c\u53d1\u8d77\u5fae\u4fe1\u652f\u4ed8\uff08\u63d0\u4ea4pay\u53c2\u6570\uff09<\/strong><\/p>\n<p><strong>\u56db\uff0c\u67e5\u8be2\u8ba2\u5355<\/strong><\/p>\n<p><strong>\u4e94\uff0c\u5220\u9664\u7f13\u5b58\u4e2d\u5df2\u7ecf\u88ab\u9009\u4e2d\u8d2d\u4e70\u7684\u5546\u54c1<\/strong><\/p>\n<p><strong>\u516d\uff0c\u5220\u9664\u540e\u7684\u8d2d\u7269\u8f66\u6570\u636e \u586b\u5145\u4f1a\u7f13\u5b58<\/strong><\/p>\n<p><strong>\u4e03\uff0c\u8df3\u8f6c\u9875\u9762<\/strong><\/p>\n<h2>\u56fe\u7247\u4e0a\u4f20\uff08wx.uploadFile\uff09<\/h2>\n<p>\u56fe\u7247\u4e0a\u4f20\u7684\u65f6\u5019\uff0c\u5b58\u50a8\u4e0a\u4f20\u7684\u56fe\u7247\u7684\u65f6\u5019\uff0c\u8981\u5148\u62fc\u63a5\u4e0a\u4e4b\u524d\u7684\u56fe\u7247\u3002<\/p>\n<p>chooseImage\uff1a[],<\/p>\n<p>this.setData({<\/p>\n<p>&nbsp; &nbsp;<em>chooseImage: [\u4e0a\u4f20\u4e4b\u524d\u7684\u56fe\u7247\u7ec4, \u4e0a\u4f20\u7684\u56fe\u7247\u7ec4]<\/em><\/p>\n<p>&nbsp; &nbsp; chooseImage: [&#8230;this.data.chooseImage, &#8230;chooseImage]<\/p>\n<p>})<\/p>\n<p><strong>\u4e0a\u4f20\u6587\u4ef6\u7684api\u4e0d\u652f\u6301\u591a\u4e2a\u6587\u4ef6\u540c\u65f6\u4e0a\u4f20<\/strong><\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5\uff1a\u904d\u5386\u6570\u7ec4 &nbsp;\u6328\u4e2a\u4e0a\u4f20<\/strong><\/p>\n<pre>wx.uploadFile({    url: '', \/\/ \u56fe\u7247\u8981\u4e0a\u4f20\u5230\u54ea\u91cc\n    filePath: '', \/\/ \u88ab\u4e0a\u4f20\u6587\u4ef6\u7684\u8def\u5f84\n    name: '',  \/\/ \u4e0a\u4f20\u7684\u6587\u4ef6\u7684\u540d\u79f0  \u540e\u53f0\u901a\u8fc7\u5b9a\u4e49\u7684\u4e0a\u4f20\u7684\u540d\u79f0\u6765\u83b7\u53d6\u540d\u79f0\n    formData: {}, \/\/ \u987a\u5e26\u7684\u6587\u672c\u4fe1\u606f})\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h1>\u9879\u76ee\u53d1\u5e03<\/h1>\n<p><strong>\u6ce8\u610f\uff1a\u53d1\u5e03\u4e4b\u524d\u8bb0\u5f97\u5173\u95ed\u8be6\u60c5\u754c\u9762\u7684 &nbsp;<em>\u4e0d\u6821\u9a8c\u5408\u6cd5\u57df\u540d<\/em> <\/strong><\/p>\n<p>\u4e0a\u4f20\u7684\u6bcf\u4e2a\u6587\u4ef6\u5927\u5c0f\u4e0d\u8d85\u8fc72M\uff0c\u603b\u5927\u5c0f\u4e0d\u8d85\u8fc710M\u3002<\/p>\n<p>\u4e0a\u4f20\uff1a<\/p>\n<ol>\n<li>\u7248\u672c\u53f7\n<ol>\n<li>\u7b2c\u4e00\u4e2a\u6570\u5b57\uff08\u5927\u7248\u672c\u7684\u66f4\u65b0\uff09<\/li>\n<li>\u7b2c\u4e8c\u4e2a\u6570\u5b57\uff08\u91cd\u8981\u529f\u80fd\u66f4\u65b0\uff09<\/li>\n<li>\u7b2c\u4e09\u4e2a\u6570\u5b57\uff08\u6700\u5c0f\u529f\u80fd\uff0c\u5c0fbug\uff0c\u5c0f\u8865\u4e01\uff09<\/li>\n<\/ol>\n<\/li>\n<li>less\u6587\u4ef6\u662f\u4e0d\u4f1a\u88ab\u6253\u5305\u4e0a\u4f20\u7684<\/li>\n<li>\u4e0a\u4f20\u6210\u529f\u540e\u7684\u5c0f\u7a0b\u5e8f\u8fd8\u662f\u4e00\u4e2a\u4f53\u9a8c\u7248\u672c\u7684\u5c0f\u7a0b\u5e8f\uff0c\u5982\u679c\u9700\u8981\u5c06\u4f53\u9a8c\u7248\u672c\u7684\u5c0f\u7a0b\u5e8f\u53d8\u6210\u7ebf\u4e0a\u7248\u672c\u7684\u5c0f\u7a0b\u5e8f\uff0c\u5c31\u5728 <strong>\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0<\/strong>\u5c06\u63d0\u4ea4\u7684\u4f53\u9a8c\u672c\u7684\u5c0f\u7a0b\u5e8f\uff0c<strong>\u63d0\u4ea4\u5ba1\u6838<\/strong>\uff08\u5ba1\u6838\u7684\u65f6\u95f4\u5927\u6982\u662f\u4e00\u4e2a\u5c0f\u65f6\uff09\u3002<\/li>\n<\/ol>\n<h1>\u5c0f\u7a0b\u5e8f\u63d2\u4ef6<\/h1>\n<ol>\n<li>\n<p>\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u52a9\u624b<img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/a44104ea9aa35e5cb89a9306c2060764-4.png\" style=\"max-width:90%\" title=\"\u653e\u5fc3\uff0c\u624b\u628a\u624b\u6559\u4f60\u5199\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u63d2\u56fe1\" alt=\"\u653e\u5fc3\uff0c\u624b\u628a\u624b\u6559\u4f60\u5199\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u63d2\u56fe1\" \/><\/p>\n<\/li>\n<li>\n<p>\u5b89\u88c5easy less\u63d2\u4ef6<img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/052\/ec4bd01fc964a4240fe607c31543d491-5.png\" style=\"max-width:90%\" title=\"\u653e\u5fc3\uff0c\u624b\u628a\u624b\u6559\u4f60\u5199\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u63d2\u56fe2\" alt=\"\u653e\u5fc3\uff0c\u624b\u628a\u624b\u6559\u4f60\u5199\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u63d2\u56fe2\" \/>\u5728vscode\u4e2d\u914d\u7f6e(ctrl + shift + p \u7136\u540e\u8f93\u5165 setting\uff0c\u7136\u540e\u6dfb\u52a0\u4e0a\u5982\u4e0b\u914d\u7f6e)\uff1a<\/p>\n<pre>\"less.compile\": {    \"outExit\": \".wxss\"}\u590d\u5236\u4ee3\u7801<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ol>\n<blockquote><p>\n  \u76f8\u5173\u514d\u8d39\u5b66\u4e60\u63a8\u8350\uff1a\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\n<\/p><\/blockquote>\n<p>\u4ee5\u4e0a\u5c31\u662f\u653e\u5fc3\uff0c\u624b\u628a\u624b\u6559\u4f60\u5199\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\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>\u680f\u76ee\u4eca\u5929\u8be6\u7ec6\u6559\u5927\u5bb6\u5199\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u3002 \u5c0f\u7a0b\u5e8f\u7684\u5386\u53f2\u4ecb\u7ecd \u4ec0\u4e48\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\uff1f \u5fae\u4fe1\u5c0f\u7a0b\u5e8f\uff0c\u7b80\u79f0\u5c0f\u7a0b\u5e8f\u3002\u82f1\u6587\u540dmini program\uff0c\u662f\u4e00\u79cd\u4e0d\u9700\u8981\u4e0b\u8f7d\u5b89\u88c5\u5c31\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u7684\u5e94\u7528\u3002\u4ed6\u5b9e\u73b0\u4e86\u89e6\u624b\u53ef\u53ca\u7684\u68a6\u60f3\u3002\u7528\u6237\u626b\u4e00\u626b\u6216\u641c\u4e00\u4e0b\u5c31\u53ef\u4ee5\u76f4\u63a5\u6253\u5f00\u5e94\u7528\u3002 \u4e3a\u4ec0\u4e48\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f \u5fae\u4fe1\u6709\u6d77\u91cf\u7528\u6237 \u63a8\u5e7fapp\u6216\u516c\u4f17\u53f7\u6210\u672c\u592a\u9ad8 \u5f00\u53d1\u9002\u914d\u6210\u672c\u4f4e \u5bb9\u6613\u5c0f\u89c4\u6a21\u8bd5\u9519\uff0c\u7136\u540e\u5feb\u901f\u8fed\u4ee3 \u8de8\u5e73\u53f0 \u5386\u53f2 2016\u5e741\u670811\u65e5\uff0c\u5f20\u5c0f\u9f99\uff0c\u5fae\u4fe1\u5185\u90e8\u7814\u7a76\u65b0\u7684\u5f62\u6001\uff0c\u5e94\u7528\u53f7\uff0c\u540e\u6539\u540d\u5c0f\u7a0b\u5e8f\u3002 2016\u5e748\u670812\u65e5\uff0c\u5f00\u59cb\u5185\u6d4b 2017\u5e741\u67089\u65e5\uff0c\u4e0a\u7ebf #\u73af\u5883\u89c4\u8303 \u6ce8\u518c\u8d26\u53f7 mp.weixin.qq.com\/ &nbsp;(\u5e10\u53f7\u4fe1\u606f &#8212; \u90ae\u7bb1\u6fc0\u6d3b &#8212; \u4fe1\u606f\u767b\u8bb0) \u83b7\u53d6id APPID \uff08[\u767b\u5f55\u5fae\u4fe1\u516c\u4f17\u5e73\u53f0](https:\/\/mp.weixin.qq.com\/wxamp\/devprofile\/get_profile?token=942994743&amp;lang=zh_CN) &#8212;&gt; \u5f00\u53d1 &#8212;&gt; \u5f00\u53d1\u8bbe\u7f6e\uff09\u590d\u5236\u4ee3\u7801 \u767b\u5f55\u540e\u590d\u5236 &#8221; class=&#8221;lazyload&#8221; src=&#8221;\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/25d7088598ce45b3a304a999018c1fe9~tplv-k3u1fbpfcp-zoom-1.image&#8221; data-width=&#8221;800&#8243; data- style=&#8221;max-width:90%&#8221;\/&gt; \u5f00\u53d1\u8005\u5de5\u5177 \u5fae\u4fe1\u5f00\u53d1\u8005\u5de5\u5177\u4e0b\u8f7d \u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8005\u5de5\u5177 &nbsp; &nbsp; \u5f00\u53d1\u8005\u5de5\u5177\u4ecb\u7ecd &nbsp; &nbsp; \u5feb\u6377\u952e\uff1a 1. ctrl + shift + F (\u641c\u7d22) 2. alt [&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-33666","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/33666","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=33666"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/33666\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=33666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=33666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=33666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}