{"id":31864,"date":"2024-11-25T13:45:40","date_gmt":"2024-11-25T05:45:40","guid":{"rendered":"https:\/\/fwq.ai\/blog\/31864\/"},"modified":"2024-11-25T13:45:40","modified_gmt":"2024-11-25T05:45:40","slug":"%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f%e4%b8%ad%e9%80%89%e9%a1%b9%e5%8d%a1%e7%9a%84%e4%be%8b%e5%ad%90","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/31864\/","title":{"rendered":"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u4e2d\u9009\u9879\u5361\u7684\u4f8b\u5b50"},"content":{"rendered":"<p>\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u4e86\u5fae\u4fe1\u5c0f\u7a0b\u5e8f \u9009\u9879\u5361\u7684\u7b80\u5355\u5b9e\u4f8b\u7684\u76f8\u5173\u8d44\u6599,\u9700\u8981\u7684\u670b\u53cb\u53ef\u4ee5\u53c2\u8003\u4e0b<\/p>\n<p><strong>\u5fae\u4fe1\u5c0f\u7a0b\u5e8f \u9009\u9879\u5361\u7684\u7b80\u5355\u5b9e\u4f8b<\/strong><\/p>\n<p><strong>\u770b\u4e0b\u6548\u679c <\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/009\/2d102cebfc1e76ff2850fbc0fa090c80-0.png\" style=\"max-width:90%\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u4e2d\u9009\u9879\u5361\u7684\u4f8b\u5b50\u63d2\u56fe\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u4e2d\u9009\u9879\u5361\u7684\u4f8b\u5b50\u63d2\u56fe\" \/><\/p>\n<p>\u4ee3\u7801\uff1a<\/p>\n<p>home.wxml<\/p>\n<\/p>\n<pre>&lt;!--pages\/home\/home.wxml--&gt;\n&lt;view&gt;&nbsp;\n&nbsp;&nbsp;&lt;view&gt;\u70ed\u95e8&lt;\/view&gt;&nbsp;\n&nbsp;&nbsp;&lt;view&gt;\u5173\u6ce8&lt;\/view&gt;&nbsp;\n&nbsp;&nbsp;&lt;view&gt;\u597d\u53cb&lt;\/view&gt;&nbsp;\n&lt;\/view&gt;&nbsp;\n\n&lt;swiper&gt;&nbsp;\n&nbsp;&nbsp;&lt;swiper-item&gt;&nbsp;\n&nbsp;&nbsp;&nbsp;&lt;view&gt;\u70ed\u95e8&lt;\/view&gt;&nbsp;\n&nbsp;&nbsp;&lt;\/swiper-item&gt;&nbsp;\n&nbsp;&nbsp;&lt;swiper-item&gt;&nbsp;\n&nbsp;&nbsp;&nbsp;&lt;view&gt;\u5173\u6ce8&lt;\/view&gt;&nbsp;\n&nbsp;&nbsp;&lt;\/swiper-item&gt;&nbsp;\n&nbsp;&nbsp;&lt;swiper-item&gt;&nbsp;\n&nbsp;&nbsp;&nbsp;&lt;view&gt;\u597d\u53cb&lt;\/view&gt;&nbsp;\n&nbsp;&nbsp;&lt;\/swiper-item&gt;&nbsp;\n&lt;\/swiper&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>home.wxss<\/p>\n<\/p>\n<pre>\/*&nbsp;pages\/home\/home.wxss&nbsp;*\/\n.swiper-tab{&nbsp;\n&nbsp;&nbsp;width:&nbsp;100%;&nbsp;\n&nbsp;&nbsp;border-bottom:&nbsp;2rpx&nbsp;solid&nbsp;#eeeeee;&nbsp;\n&nbsp;&nbsp;text-align:&nbsp;center;&nbsp;\n&nbsp;&nbsp;line-height:&nbsp;80rpx;}&nbsp;\n.swiper-tab-item{&nbsp;font-size:&nbsp;30rpx;&nbsp;\n&nbsp;&nbsp;display:&nbsp;inline-block;&nbsp;\n&nbsp;&nbsp;width:&nbsp;33.33%;&nbsp;\n&nbsp;&nbsp;color:&nbsp;#666666;&nbsp;\n}&nbsp;\n.on{&nbsp;color:&nbsp;#f10b2e;&nbsp;\n&nbsp;&nbsp;border-bottom:&nbsp;5rpx&nbsp;solid&nbsp;#f10b2e;}&nbsp;\n\n.swiper-box{&nbsp;display:&nbsp;block;&nbsp;height:&nbsp;100%;&nbsp;width:&nbsp;100%;&nbsp;overflow:&nbsp;hidden;&nbsp;}&nbsp;\n.swiper-box&nbsp;view{&nbsp;\n&nbsp;&nbsp;text-align:&nbsp;center;&nbsp;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>home.js<\/p>\n<\/p>\n<pre>\/\/&nbsp;pages\/home\/home.js\nvar&nbsp;app&nbsp;=&nbsp;getApp()\nPage({\n&nbsp;data:&nbsp;{\n\n&nbsp;&nbsp;winWidth:&nbsp;0,\n&nbsp;&nbsp;winHeight:&nbsp;0,\n&nbsp;&nbsp;\/\/&nbsp;tab\u5207\u6362&nbsp;\n&nbsp;&nbsp;currentTab:&nbsp;0,\n&nbsp;},\n&nbsp;onLoad:&nbsp;function&nbsp;()&nbsp;{\n&nbsp;&nbsp;var&nbsp;that&nbsp;=&nbsp;this;\n\n\n&nbsp;&nbsp;wx.getSystemInfo({\n\n&nbsp;&nbsp;&nbsp;success:&nbsp;function&nbsp;(res)&nbsp;{\n&nbsp;&nbsp;&nbsp;&nbsp;that.setData({\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;winWidth:&nbsp;res.windowWidth,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;winHeight:&nbsp;res.windowHeight\n&nbsp;&nbsp;&nbsp;&nbsp;});\n&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;});\n&nbsp;},\n\n\n&nbsp;bindChange:&nbsp;function&nbsp;(e)&nbsp;{\n\n&nbsp;&nbsp;var&nbsp;that&nbsp;=&nbsp;this;\n&nbsp;&nbsp;that.setData({&nbsp;currentTab:&nbsp;e.detail.current&nbsp;});\n\n&nbsp;},\n\n&nbsp;swichNav:&nbsp;function&nbsp;(e)&nbsp;{\n\n&nbsp;&nbsp;var&nbsp;that&nbsp;=&nbsp;this;\n\n&nbsp;&nbsp;if&nbsp;(this.data.currentTab&nbsp;===&nbsp;e.target.dataset.current)&nbsp;{\n&nbsp;&nbsp;&nbsp;return&nbsp;false;\n&nbsp;&nbsp;}&nbsp;else&nbsp;{\n&nbsp;&nbsp;&nbsp;that.setData({\n&nbsp;&nbsp;&nbsp;&nbsp;currentTab:&nbsp;e.target.dataset.current\n&nbsp;&nbsp;&nbsp;})\n&nbsp;&nbsp;}\n&nbsp;}\n})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u672c\u6587\u7684\u5168\u90e8\u5185\u5bb9\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u5b66\u4e60\u6709\u6240\u5e2e\u52a9\uff0c\u66f4\u591a\u76f8\u5173\u5185\u5bb9\u8bf7\u5173\u6ce8PHP\u4e2d\u6587\u7f51\uff01<\/p>\n<p>\u76f8\u5173\u63a8\u8350\uff1a<\/p>\n<p><\/p>\n<p><\/p>\n<\/p>\n<p><span><\/span><\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u4e2d\u9009\u9879\u5361\u7684\u4f8b\u5b50\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>\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u4e86\u5fae\u4fe1\u5c0f\u7a0b\u5e8f \u9009\u9879\u5361\u7684\u7b80\u5355\u5b9e\u4f8b\u7684\u76f8\u5173\u8d44\u6599,\u9700\u8981\u7684\u670b\u53cb\u53ef\u4ee5\u53c2\u8003\u4e0b \u5fae\u4fe1\u5c0f\u7a0b\u5e8f \u9009\u9879\u5361\u7684\u7b80\u5355\u5b9e\u4f8b \u770b\u4e0b\u6548\u679c \u4ee3\u7801\uff1a home.wxml &lt;!&#8211;pages\/home\/home.wxml&#8211;&gt; &lt;view&gt;&nbsp; &nbsp;&nbsp;&lt;view&gt;\u70ed\u95e8&lt;\/view&gt;&nbsp; &nbsp;&nbsp;&lt;view&gt;\u5173\u6ce8&lt;\/view&gt;&nbsp; &nbsp;&nbsp;&lt;view&gt;\u597d\u53cb&lt;\/view&gt;&nbsp; &lt;\/view&gt;&nbsp; &lt;swiper&gt;&nbsp; &nbsp;&nbsp;&lt;swiper-item&gt;&nbsp; &nbsp;&nbsp;&nbsp;&lt;view&gt;\u70ed\u95e8&lt;\/view&gt;&nbsp; &nbsp;&nbsp;&lt;\/swiper-item&gt;&nbsp; &nbsp;&nbsp;&lt;swiper-item&gt;&nbsp; &nbsp;&nbsp;&nbsp;&lt;view&gt;\u5173\u6ce8&lt;\/view&gt;&nbsp; &nbsp;&nbsp;&lt;\/swiper-item&gt;&nbsp; &nbsp;&nbsp;&lt;swiper-item&gt;&nbsp; &nbsp;&nbsp;&nbsp;&lt;view&gt;\u597d\u53cb&lt;\/view&gt;&nbsp; &nbsp;&nbsp;&lt;\/swiper-item&gt;&nbsp; &lt;\/swiper&gt; \u767b\u5f55\u540e\u590d\u5236 home.wxss \/*&nbsp;pages\/home\/home.wxss&nbsp;*\/ .swiper-tab{&nbsp; &nbsp;&nbsp;width:&nbsp;100%;&nbsp; &nbsp;&nbsp;border-bottom:&nbsp;2rpx&nbsp;solid&nbsp;#eeeeee;&nbsp; &nbsp;&nbsp;text-align:&nbsp;center;&nbsp; &nbsp;&nbsp;line-height:&nbsp;80rpx;}&nbsp; .swiper-tab-item{&nbsp;font-size:&nbsp;30rpx;&nbsp; &nbsp;&nbsp;display:&nbsp;inline-block;&nbsp; &nbsp;&nbsp;width:&nbsp;33.33%;&nbsp; &nbsp;&nbsp;color:&nbsp;#666666;&nbsp; }&nbsp; .on{&nbsp;color:&nbsp;#f10b2e;&nbsp; &nbsp;&nbsp;border-bottom:&nbsp;5rpx&nbsp;solid&nbsp;#f10b2e;}&nbsp; .swiper-box{&nbsp;display:&nbsp;block;&nbsp;height:&nbsp;100%;&nbsp;width:&nbsp;100%;&nbsp;overflow:&nbsp;hidden;&nbsp;}&nbsp; .swiper-box&nbsp;view{&nbsp; &nbsp;&nbsp;text-align:&nbsp;center;&nbsp; } \u767b\u5f55\u540e\u590d\u5236 home.js \/\/&nbsp;pages\/home\/home.js var&nbsp;app&nbsp;=&nbsp;getApp() Page({ &nbsp;data:&nbsp;{ &nbsp;&nbsp;winWidth:&nbsp;0, &nbsp;&nbsp;winHeight:&nbsp;0, &nbsp;&nbsp;\/\/&nbsp;tab\u5207\u6362&nbsp; &nbsp;&nbsp;currentTab:&nbsp;0, &nbsp;}, &nbsp;onLoad:&nbsp;function&nbsp;()&nbsp;{ [&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-31864","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31864","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=31864"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31864\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=31864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=31864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=31864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}