{"id":31486,"date":"2024-11-25T17:00:32","date_gmt":"2024-11-25T09:00:32","guid":{"rendered":"https:\/\/fwq.ai\/blog\/31486\/"},"modified":"2024-11-25T17:00:32","modified_gmt":"2024-11-25T09:00:32","slug":"%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f%e5%bc%80%e5%8f%91%e5%85%a5%e9%97%a8%e4%bd%bf%e7%94%a8%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/31486\/","title":{"rendered":"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3"},"content":{"rendered":"<p style=\"text-align: left\"><span style=\"font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px\">\u8fd9\u6b21\u7ed9\u5927\u5bb6\u5e26\u6765\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\uff0c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u7684\u6ce8\u610f\u4e8b\u9879\u6709\u54ea\u4e9b\uff0c\u4e0b\u9762\u5c31\u662f\u5b9e\u6218\u6848\u4f8b\uff0c\u4e00\u8d77\u6765\u770b\u4e00\u4e0b\u3002<\/span><\/p>\n<p style=\"text-align: left\"><span style=\"font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px\">\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5df2\u7ecf\u706b\u4e86\u4e00\u6bb5\u65f6\u95f4\u4e86\uff0c\u4e4b\u524d\u4e00\u76f4\u4e5f\u5728\u5173\u6ce8\uff0c\u5c31\u8fd9\u534a\u5e74\u7684\u53d1\u5c55\u6765\u770b\uff0c\u76f8\u5bf9\u539f\u751fAPP\u5927\u90e8\u5206\u516c\u53f8\u8fd8\u662f\u4e0d\u613f\u610f\u5c06\u4e3b\u8425\u4e1a\u52a1\u653e\u5230\u5fae\u4fe1\u5e73\u53f0\u4e0a\uff0c\u4ee5\u514d\u53d7\u5236\u4e8e\u817e\u8baf\uff0c\u4e0d\u8fc7\u5c31\u5c0f\u7a0b\u5e8f\u7684\u5e94\u7528\u573a\u666f\uff08\u7528\u5b8c\u5373\u8d70\u548c\u4e8c\u7ef4\u7801\u5206\u53d1\u7b49\uff09\u8fd8\u662f\u5f88\u503c\u5f97\u6211\u4eec\u5b66\u4e60\u7684\uff0c\u6280\u672f\u4e0a\u9762\u5982\u679c\u4e86\u89e3React\u7684\u8bdd\uff0c\u4f1a\u53d1\u73b0\u4ed6\u4eec\u5728\u7ec4\u4ef6\u5316\u4e0a\u9762\u6709\u5f88\u591a\u96f7\u540c\u4e4b\u5904\u3002<\/span><span style=\"font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;margin: 0px;padding: 0px\">\u8bf4\u767d\u4e86\uff0c\u5c0f\u7a0b\u5e8f\u5c31\u662f\u57fa\u4e8e\u5fae\u4fe1\u5e73\u53f0\u7684H5\u8f7b\u5e94\u7528\uff0c\u5fae\u4fe1\u5c06\u7cfb\u7edf\u5e95\u5c42\u529f\u80fd\uff08\u8bbe\u5907\u3001\u4f4d\u7f6e\u3001\u5a92\u4f53\u3001\u6587\u4ef6\u7b49\uff09\u548c\u5fae\u4fe1\u81ea\u8eab\u529f\u80fd\uff08\u767b\u5f55\u3001\u652f\u4ed8\u3001\u5206\u4eab\u7b49\uff09\u5c01\u88c5\u6210\u76f8\u5e94API\u4f9b\u5c0f\u7a0b\u5e8f\u8c03\u7528\u3002<\/span><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u81ea\u5df1\u6839\u636e\u5b98\u65b9\u6587\u6863\u5199\u8fc7\u4e00\u4e2aDOME\uff0c\u501f\u52a9\u548c\u98ce\u5929\u6c14\u5f00\u653eAPI\u63a5\u53e3\uff0c\u5b9e\u73b0\u5929\u6c14\u9884\u62a5\uff0c\u4ec5\u4f9b\u5b66\u4e60\u4ea4\u6d41\u4f7f\u7528\uff0c\u8c22\u8c22~<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\"><span style=\"margin:0px;padding:0px\">\u4e00\u3001\u5c0f\u7a0b\u5e8f\u57fa\u672c\u6982\u5ff5<\/span><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">1\u3001\u5f00\u53d1\u5de5\u5177\uff1a\u4e3a\u4e86\u914d\u5408\u5c0f\u7a0b\u5e8f\u5f00\u53d1\uff0c\u5fae\u4fe1\u4e13\u95e8\u914d\u5907\u4e86\u81ea\u5df1\u7684\u5f00\u53d1\u5de5\u5177\uff0c\u81ea\u884c\u9009\u62e9\u5bf9\u5e94\u7248\u672c\u5b89\u88c5\u3002<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/fece6b371ed5ec24bb53fc4ff47bf86e-0.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe\" \/><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">2\u3001\u521b\u5efa\u9879\u76ee\u5e94\u7528\uff1a\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00\u5e76\u626b\u7801\u767b\u5f55\u3002\u5c0f\u7a0b\u5e8f\u53d1\u5e03\u9700\u8981\u4f01\u4e1a\u7ea7\u7684\u8ba4\u8bc1\u516c\u4f17\u53f7\uff0c\u6240\u4ee5\u4e2a\u4eba\u8ba2\u9605\u53f7\u662f\u4e0d\u80fd\u53d1\u5e03\u7684\u3002\u6240\u4ee5\u6211\u8fd9\u91cc\u9009\u62e9\u65e0AppID\uff0c\u521b\u5efa\u9879\u76ee\u9009\u62e9\u4e00\u4e2a\u672c\u5730\u7a7a\u6587\u4ef6\u5939\uff0c\u52fe\u9009\u521b\u5efaquick start \u9879\u76ee\u751f\u6210\u4e00\u4e2ademo\u3002<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/fece6b371ed5ec24bb53fc4ff47bf86e-1.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe1\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe1\" \/><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">3\u3001\u7f16\u5199\u5c0f\u7a0b\u5e8f\uff1ademo\u521d\u59cb\u5316\u5e76\u5305\u542b\u4e86\u4e00\u4e9b\u7b80\u5355\u7684\u4ee3\u7801\u6587\u4ef6\uff0c\u5176\u4e2dapp.js\u3001app.json\u3001app.wxss \u8fd9\u4e09\u4e2a\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\uff0c\u5c0f\u7a0b\u5e8f\u4f1a\u8bfb\u53d6\u8fd9\u4e9b\u6587\u4ef6\u521d\u59cb\u5316\u5b9e\u4f8b\u3002<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u3000\u3000app.js\u662f\u5c0f\u7a0b\u5e8f\u7684\u521d\u59cb\u5316\u811a\u672c\uff0c\u53ef\u4ee5\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u76d1\u542c\u5c0f\u7a0b\u5e8f\u7684\u751f\u547d\u5468\u671f\uff0c\u7533\u8bf7\u5168\u5c40\u53d8\u91cf\u548c\u8c03\u7528API\u7b49<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u3000\u3000app.json\u662f\u5bf9\u5c0f\u7a0b\u5e8f\u7684\u5168\u5c40\u914d\u7f6e\uff0c<span style=\"margin:0px;padding:0px\">pages\u8bbe\u7f6e\u9875\u9762\u8def\u5f84\u7ec4\u6210\uff08\u9ed8\u8ba4\u7b2c\u4e00\u6761\u4e3a\u9996\u9875\uff09\uff0cwindow\u8bbe\u7f6e\u9ed8\u8ba4\u9875\u9762\u7684\u7a97\u53e3\u8868\u73b0\u7b49<\/span><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u3000\u3000app.wxss \u662f\u6574\u4e2a\u5c0f\u7a0b\u5e8f\u7684\u516c\u5171\u6837\u5f0f\u8868\u3002<span style=\"margin:0px;padding:0px\">\u7c7b\u4f3c\u7f51\u7ad9\u5f00\u53d1\u4e2d\u7684common.css<\/span><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/fece6b371ed5ec24bb53fc4ff47bf86e-2.jpg\" style=\"max-width:90%\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe2\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe2\" \/><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">4\u3001\u521b\u5efa\u9875\u9762\uff1a\u5728pages\u76ee\u5f55\u4e0b\uff0c\u7531\u4e00\u4e2a\u6587\u4ef6\u5939\u4e2d\u7684\u56db\u4e2a\u540c\u540d\u4e0d\u540c\u7c7b\u578b\u6587\u4ef6\u7ec4\u6210\u3002<span style=\"margin:0px;padding:0px\">.js\u662f\u811a\u672c\u6587\u4ef6\uff0c.json\u662f\u914d\u7f6e\u6587\u4ef6\uff0c.wxss\u662f\u6837\u5f0f\u8868\u6587\u4ef6\uff0c.wxml\u662f\u9875\u9762\u7ed3\u6784\u6587\u4ef6<\/span>\uff0c\u5176\u4e2djson\u548cwxss\u6587\u4ef6\u4e3a\u975e\u5fc5\u987b\uff08<span style=\"margin:0px;padding:0px\">\u9ed8\u8ba4\u4f1a\u7ee7\u627fapp\u7684json\u548cwxss\u9ed8\u8ba4\u8bbe\u7f6e<\/span>\uff09\u3002<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\"><span style=\"margin:0px;padding:0px\">\u4e8c\u3001\u5c0f\u7a0b\u5e8f\u7684\u6846\u67b6<\/span><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">1\u3001\u5c0f\u7a0b\u5e8f\u7684\u914d\u7f6e<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u3000\u3000app.json\u4e3b\u8981\u5206\u4e3a\u4e94\u4e2a\u90e8\u5206\uff1apages\uff1a\u9875\u9762\u7ec4\uff0cwindow\uff1a\u6846\u67b6\u6837\u5f0f\uff08\u72b6\u6001\u680f\u3001\u5bfc\u822a\u6761\u3001\u6807\u9898\u3001\u7a97\u53e3\u80cc\u666f\u8272\uff09\uff0ctabBar\uff1a\u5e95\u90e8\u83dc\u5355\uff0cnetworkTimeout\uff1a\u7f51\u7edc\u8d85\u65f6\u8bbe\u7f6e\uff0cdebug\uff1a\u5f00\u542fdebug\u6a21\u5f0f<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u3000\u3000page.json\u9488\u5bf9\u9875\u9762\u5355\u72ec\u8bbe\u7f6e\uff0c\u5c42\u53e0\u6389app.json\u7684\u5168\u5c40\u8bbe\u7f6e<\/p>\n<p style=\"margin: 5px 0px 0px;padding: 0px;text-align: left\"><span style=\"margin:0px;padding:0px 5px 0px 0px;font-size:12px!important;line-height:1.5!important\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/fece6b371ed5ec24bb53fc4ff47bf86e-3.gif\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe3\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe3\" \/><\/span><\/p>\n<pre>\"pages\"\"pages\/index\/index\"\"pages\/logs\/logs\"\"window\"\"backgroundTextStyle\":\"light\"\"navigationBarBackgroundColor\":&nbsp;\"#000\"\"navigationBarTitleText\":&nbsp;\"WeChat\"\"navigationBarTextStyle\":\"white\"<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"margin: 5px 0px 0px;padding: 0px;text-align: left\"><span style=\"margin:0px;padding:0px 5px 0px 0px;font-size:12px!important;line-height:1.5!important\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/fece6b371ed5ec24bb53fc4ff47bf86e-3.gif\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe3\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe3\" \/><\/span><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">2\u3001\u5c0f\u7a0b\u5e8f\u7684\u903b\u8f91<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u3000\u3000\u4f7f\u7528App()\u6765\u6ce8\u518c\u4e00\u4e2a\u5c0f\u7a0b\u5e8f\uff0c\u5fc5\u987b\u5728app.js\u4e2d\u6ce8\u518c\uff0c\u4e14\u4e0d\u80fd\u6ce8\u518c\u591a\u4e2a<\/p>\n<p style=\"margin: 5px 0px 0px;padding: 0px;text-align: left\"><span style=\"margin:0px;padding:0px 5px 0px 0px;font-size:12px!important;line-height:1.5!important\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/fece6b371ed5ec24bb53fc4ff47bf86e-3.gif\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe3\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe3\" \/><\/span><\/p>\n<pre>App({\/\/\u5982\u4e0b\u4e3a\u5c0f\u7a0b\u5e8f\u7684\u751f\u547d\u5468\u671f\n&nbsp;&nbsp;onLaunch:&nbsp;function()&nbsp;{&nbsp;},\/\/\u76d1\u542c\u521d\u59cb\u5316\n&nbsp;&nbsp;onShow:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u663e\u793a\uff08\u8fdb\u5165\u524d\u53f0\uff09\n&nbsp;&nbsp;onHide:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u9690\u85cf\uff08\u8fdb\u5165\u540e\u53f0\uff1a\u6309home\u79bb\u5f00\u5fae\u4fe1\uff09\n&nbsp;&nbsp;onError:&nbsp;function(msg)&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u9519\u8bef\n&nbsp;&nbsp;\/\/\u5982\u4e0b\u4e3a\u81ea\u5b9a\u4e49\u7684\u5168\u5c40\u65b9\u6cd5\u548c\u5168\u5c40\u53d8\u91cf&nbsp;&nbsp;\n&nbsp;&nbsp;globalFun:function(){},\n&nbsp;&nbsp;globalData:&nbsp;'I&nbsp;am&nbsp;global&nbsp;data'})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"margin: 5px 0px 0px;padding: 0px;text-align: left\"><span style=\"margin:0px;padding:0px 5px 0px 0px;font-size:12px!important;line-height:1.5!important\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/fece6b371ed5ec24bb53fc4ff47bf86e-3.gif\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe3\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe3\" \/><\/span><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u3000\u3000\u4f7f\u7528Page()\u6ce8\u518c\u4e00\u4e2a\u9875\u9762\uff0c\u5728\u6bcf\u4e2a\u9875\u9762\u7684js\u6587\u4ef6\u4e2d\u6ce8\u518c<\/p>\n<p style=\"margin: 5px 0px 0px;padding: 0px;text-align: left\"><span style=\"margin:0px;padding:0px 5px 0px 0px;font-size:12px!important;line-height:1.5!important\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/fece6b371ed5ec24bb53fc4ff47bf86e-3.gif\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe3\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe3\" \/><\/span><\/p>\n<pre>Page({\n&nbsp;&nbsp;data:&nbsp;{text:&nbsp;\"This&nbsp;is&nbsp;page&nbsp;data.\"},\/\/\u9875\u9762\u6570\u636e\uff0c\u7528\u6765\u7ef4\u62a4\u89c6\u56fe\uff0cjson\u683c\u5f0f\n&nbsp;&nbsp;onLoad:&nbsp;function(options)&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u52a0\u8f7d\n&nbsp;&nbsp;onReady:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u521d\u6b21\u6e32\u67d3\u5b8c\u6210\n&nbsp;&nbsp;onShow:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u663e\u793a\n&nbsp;&nbsp;onHide:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u9690\u85cf\n&nbsp;&nbsp;onUnload:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u5378\u8f7d\n&nbsp;&nbsp;onPullDownRefresh:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u4e0b\u62c9\n&nbsp;&nbsp;onReachBottom:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u4e0a\u62c9\u89e6\u5e95\n&nbsp;&nbsp;onShareAppMessage:&nbsp;function&nbsp;()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u53f3\u4e0a\u89d2\u5206\u4eab\n&nbsp;&nbsp;\/\/\u5982\u4e0b\u4e3a\u81ea\u5b9a\u4e49\u7684\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\uff08\u89c6\u56fe\u4e2d\u7ed1\u5b9a\u7684\uff09\n&nbsp;&nbsp;viewTap:&nbsp;function()&nbsp;{\/\/setData\u8bbe\u7f6edata\u503c\uff0c\u540c\u65f6\u5c06\u66f4\u65b0\u89c6\u56fe\n&nbsp;&nbsp;&nbsp;&nbsp;this.setData({text:&nbsp;'Set&nbsp;some&nbsp;data&nbsp;for&nbsp;updating&nbsp;view.'})\n&nbsp;&nbsp;}\n})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"margin: 5px 0px 0px;padding: 0px;text-align: left\"><span style=\"font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px\">3\u3001\u5c0f\u7a0b\u5e8f\u7684\u89c6\u56fe\u4e0e\u4e8b\u4ef6\u7ed1\u5b9a<\/span><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u3000\u3000\u5728\u6bcf\u4e2a\u9875\u9762\u4e2d\u7684wxml\u6587\u4ef6\u4e2d\uff0c\u5bf9\u9875\u9762js\u4e2ddata\u8fdb\u884c\u6570\u636e\u7ed1\u5b9a\uff0c\u4ee5\u53ca\u81ea\u5b9a\u4e49\u4e8b\u4ef6\u7ed1\u5b9a<\/p>\n<pre>&lt;!--{{}}\u7ed1\u5b9adata\u4e2d\u7684\u6307\u5b9a\u6570\u636e\u5e76\u6e32\u67d3\u5230\u89c6\u56fe--&gt;&lt;view&gt;{{text}}&lt;\/view&gt;&lt;!--wx:for\u83b7\u53d6\u6570\u7ec4\u6570\u636e\u8fdb\u884c\u5faa\u73af\u6e32\u67d3\uff0citem\u4e3a\u6570\u7ec4\u7684\u6bcf\u9879--&gt;&lt;view&gt;&nbsp;{{item}}&nbsp;&lt;\/view&gt;&lt;!--wx:if\u6761\u4ef6\u6e32\u67d3--&gt;&lt;view&gt;&nbsp;WEBVIEW&nbsp;&lt;\/view&gt;&lt;view&gt;&nbsp;APP&nbsp;&lt;\/view&gt;&lt;view&gt;&nbsp;MINA&nbsp;&lt;\/view&gt;&lt;!--\u6a21\u677f--&gt;&lt;template&gt;\n&nbsp;&nbsp;&lt;view&gt;FirstName:&nbsp;{{firstName}},&nbsp;LastName:&nbsp;{{lastName}}&lt;\/view&gt;&lt;\/template&gt;&lt;template&gt;&lt;\/template&gt;&lt;template&gt;&lt;\/template&gt;&lt;!--bindtap\u6307\u5b9atap\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u4e3aViewTap--&gt;&lt;view&gt;&nbsp;\u70b9\u6211\u70b9\u6211&nbsp;&lt;\/view&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre>Page({\n&nbsp;&nbsp;data:&nbsp;{\/\/data\u6570\u636e\u4e3b\u8981\u7528\u4e8e\u89c6\u56fe\u7ed1\u5b9a\n&nbsp;&nbsp;&nbsp;&nbsp;text:\"\u6211\u662f\u4e00\u6761\u6d4b\u8bd5\",\n&nbsp;&nbsp;&nbsp;&nbsp;array:[0,1,2,3,4],\n&nbsp;&nbsp;&nbsp;&nbsp;view:\"APP\",\n&nbsp;&nbsp;&nbsp;&nbsp;template:{\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;staffA:&nbsp;{firstName:&nbsp;'Hulk',&nbsp;lastName:&nbsp;'Hu'},\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;staffB:&nbsp;{firstName:&nbsp;'Shang',&nbsp;lastName:&nbsp;'You'}\n&nbsp;&nbsp;&nbsp;&nbsp;}\n&nbsp;&nbsp;},\n&nbsp;&nbsp;ViewTap:function(){console.log('\u989d\uff0c\u70b9\u5230\u6211\u4e86\u4e86~')}\/\/\u81ea\u5b9a\u4e49\u4e8b\u4ef6\uff0c\u4e3b\u8981\u7528\u4e8e\u4e8b\u4ef6\u7ed1\u5b9a})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">4\u3001\u5c0f\u7a0b\u5e8f\u7684\u6837\u5f0f<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u3000\u3000\u5728\u6bcf\u4e2a\u9875\u9762\u4e2d\u7684wxss\u6587\u4ef6\u4e2d\uff0c\u5bf9wxml\u4e2d\u7684\u7ed3\u6784\u8fdb\u884c\u6837\u5f0f\u8bbe\u7f6e\uff0c\u7b49\u540c\u4e8ecss\uff0c\u6269\u5c55\u4e86rpx\u5355\u4f4d\u3002\u5176\u4e2dapp.wxss\u9ed8\u8ba4\u4e3a\u5168\u5c40\u6837\u5f0f\uff0c\u4f5c\u7528\u6240\u6709\u9875\u9762\u3002<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\"><span style=\"margin:0px;padding:0px\">\u4e09\u3001\u5c0f\u7a0b\u5e8f\u5b9e\u6218-\u5929\u6c14\u9884\u62a5\uff08\u5229\u7528\u548c\u98ce\u5929\u6c14API\uff09<\/span><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u5148\u770b\u770b\u5b8c\u6210\u540e\u7684\u6548\u679c\uff0c\u4e00\u5171\u4e09\u4e2a\u9875\u9762\uff0c\u6d4b\u8bd5demo\u4e0d\u6c42\u7f8e\u89c2\uff0c\u4e0d\u559c\u52ff\u55b7~<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/3543c509c05a5decb8e831179ff45cf0-13.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe4\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe4\" \/><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/3543c509c05a5decb8e831179ff45cf0-14.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe5\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe5\" \/><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/446aa2ce1768bc138231c8c5e14f2348-15.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe6\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe6\" \/><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">1\u3001\u8bbe\u7f6e\u5e95\u90e8\u83dc\u5355\u548c\u9875\u9762<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u6211\u4eec\u5c31\u5728quick start\u751f\u6210\u7684demo\u57fa\u7840\u4e0a\u8fdb\u884c\u4fee\u6539\u5373\u53ef\uff0c\u56e0\u4e3a\u6d89\u53ca\u56fe\u6807icon\uff0c\u6211\u4eec\u65b0\u5efa\u4e00\u4e2aimages\u6587\u4ef6\u5939\u6765\u5b58\u653e\u56fe\u7247<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u5728\u539f\u5148pages\u6587\u4ef6\u5939\u4e2d\uff0c\u5220\u9664index\u548clog\u9875\u9762\u6587\u4ef6\u5939\uff0c\u65b0\u5efaweather\u3001city\u3001about\u4e09\u4e2a\u9875\u9762\u6587\u4ef6\u5939\uff0c\u53ca\u4e09\u4e2a\u9875\u9762\u5bf9\u5e94\u7684\u56db\u4e2a\u6587\u4ef6\u7c7b\u578b\uff0c\u6587\u4ef6\u7ed3\u6784\u5982\u4e0b\u56fe<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/002\/446aa2ce1768bc138231c8c5e14f2348-16.jpg\" class=\"aligncenter\" title=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe7\" alt=\"\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\u63d2\u56fe7\" \/><\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u63a5\u4e0b\u6765\u914d\u7f6eapp.json\u6587\u4ef6<\/p>\n<pre>\/*app.json,\u8be5\u6587\u4ef6\u4e0d\u80fd\u542b\u6709\u4efb\u4f55\u6ce8\u91ca\uff0c\u6240\u4ee5\u6b63\u5f0f\u5e94\u7528\u9700\u5220\u9664\u6240\u6709\u6ce8\u91ca\u5185\u5bb9*\/{&nbsp;&nbsp;\"pages\":[\/\/\u5c0f\u7a0b\u5e8f\u7684\u9875\u9762\u8def\u5f84\u6570\u7ec4\uff0c\u7b2c\u4e00\u6761\u9ed8\u8ba4\u4e3a\u9996\u9875\uff0c\u6240\u6709\u9875\u9762\u5747\u9700\u5199\u5728\u8fd9\u91cc\uff0c\u5426\u5219\u4e0d\u80fd\u52a0\u8f7d\n&nbsp;&nbsp;&nbsp;&nbsp;\"pages\/weather\/weather\",&nbsp;&nbsp;&nbsp;&nbsp;\"pages\/about\/about\",&nbsp;&nbsp;&nbsp;&nbsp;\"pages\/city\/city\"\n&nbsp;&nbsp;],&nbsp;&nbsp;\"window\":{\/\/\u5c0f\u7a0b\u5e8f\u6846\u67b6\u8bbe\u7f6e\n&nbsp;&nbsp;&nbsp;&nbsp;\"navigationBarBackgroundColor\":&nbsp;\"#000\",&nbsp;&nbsp;&nbsp;&nbsp;\"navigationBarTitleText\":&nbsp;\"\u5929\u6c14\u9884\u62a5\",&nbsp;&nbsp;&nbsp;&nbsp;\"navigationBarTextStyle\":\"#fff\",&nbsp;&nbsp;&nbsp;&nbsp;\"backgroundColor\":\"#666\",&nbsp;&nbsp;&nbsp;&nbsp;\"backgroundTextStyle\":\"light\",&nbsp;&nbsp;&nbsp;&nbsp;\"enablePullDownRefresh\":true\n&nbsp;&nbsp;},&nbsp;&nbsp;\"tabBar\":&nbsp;{\/\/\u5c0f\u7a0b\u5e8f\u5e95\u90e8\u83dc\u5355\u8bbe\u7f6e\n&nbsp;&nbsp;&nbsp;&nbsp;\"color\":&nbsp;\"#666\",&nbsp;&nbsp;&nbsp;&nbsp;\"selectedColor\":&nbsp;\"#56abe4\",&nbsp;&nbsp;&nbsp;&nbsp;\"backgroundColor\":&nbsp;\"#ddd\",&nbsp;&nbsp;&nbsp;&nbsp;\"borderStyle\":\"black\",&nbsp;&nbsp;&nbsp;&nbsp;\"list\":&nbsp;[{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"pagePath\":&nbsp;\"pages\/weather\/weather\",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"iconPath\":&nbsp;\"images\/tabbar\/weather1.png\",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"selectedIconPath\":&nbsp;\"images\/tabbar\/weather2.png\",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"text\":&nbsp;\"\u5929\u6c14\u9884\u62a5\"\n&nbsp;&nbsp;&nbsp;&nbsp;},&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"pagePath\":&nbsp;\"pages\/city\/city\",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"iconPath\":&nbsp;\"images\/tabbar\/city1.png\",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"selectedIconPath\":&nbsp;\"images\/tabbar\/city2.png\",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"text\":&nbsp;\"\u8bbe\u7f6e\u57ce\u5e02\"\n&nbsp;&nbsp;&nbsp;&nbsp;},&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"pagePath\":&nbsp;\"pages\/about\/about\",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"iconPath\":&nbsp;\"images\/tabbar\/about1.png\",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"selectedIconPath\":&nbsp;\"images\/tabbar\/about2.png\",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"text\":&nbsp;\"\u5173\u4e8e\u6211\"\n&nbsp;&nbsp;&nbsp;&nbsp;}],&nbsp;&nbsp;&nbsp;&nbsp;\"position\":\"bottom\"\n&nbsp;&nbsp;}\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">2\u3001\u6ce8\u518c\u5c0f\u7a0b\u5e8f\u548c\u6574\u4f53\u6837\u5f0f<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u4fee\u6539app.js\u548capp.wxss\u4e24\u4e2a\u6587\u4ef6\u5982\u4e0b<\/p>\n<pre>\/\/app.jsApp({&nbsp;&nbsp;\/\/1\u3001\u7cfb\u7edf\u4e8b\u4ef6\u90e8\u5206\n&nbsp;&nbsp;onLaunch:&nbsp;function&nbsp;()&nbsp;{\/\/\u5c0f\u7a0b\u5e8f\u521d\u59cb\u5316\u65f6\u6267\u884c\n&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;that=this;\n&nbsp;&nbsp;&nbsp;&nbsp;that.curid&nbsp;=&nbsp;wx.getStorageSync('curid')&nbsp;||&nbsp;that.curid;\/\/API\uff1a\u83b7\u53d6\u672c\u5730\u7f13\u5b58\uff0c\u82e5\u4e0d\u5b58\u5728\u8bbe\u7f6e\u4e3a\u5168\u5c40\u5c5e\u6027\n&nbsp;&nbsp;&nbsp;&nbsp;that.setlocal('curid',&nbsp;that.curid);\/\/\u8c03\u7528\u5168\u5c40\u65b9\u6cd5&nbsp;&nbsp;},&nbsp;&nbsp;\/\/2\u3001\u81ea\u5b9a\u4e49\u5168\u5c40\u65b9\u6cd5\u90e8\u5206\n&nbsp;&nbsp;setlocal:function(id,val){\n&nbsp;&nbsp;&nbsp;&nbsp;wx.setStorageSync(id,&nbsp;val);\/\/API\uff1a\u8bbe\u7f6e\u672c\u5730\u7f13\u5b58&nbsp;&nbsp;},&nbsp;&nbsp;\/\/3\u3001\u81ea\u5b9a\u4e49\u5168\u5c40\u5c5e\u6027\u90e8\u5206\n&nbsp;&nbsp;curid:\"CN101010100\",\n&nbsp;&nbsp;version:\"1.0\"})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre>\/**app.wxss**\/.container&nbsp;{margin:&nbsp;0;&nbsp;padding:&nbsp;0;}.title{font-size:&nbsp;14px;&nbsp;font-weight:&nbsp;bold;}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">3\u3001\u9875\u9762\u7684\u7ed3\u6784\uff08wxml\uff09\u3001\u6837\u5f0f\uff08wxss\uff09\u3001\u903b\u8f91\uff08js\uff09\u548c\u914d\u7f6e\uff08json\uff09<\/p>\n<p style=\"margin: 10px auto;padding-top: 0px;padding-bottom: 0px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;text-align: left\">\u5c0f\u7a0b\u5e8f\u4e2d\u7684wxml\u6452\u5f03\u4e86HTML\u6807\u7b7e\uff0c \u6539\u7528view\uff08\u7c7b\u4f3cp\uff09\u3001text\uff08\u7c7b\u4f3cspan\uff09\u3001icon\u7b49\u7b49\uff0cclass\u540chtml\u6307\u5b9a\u6837\u5f0f\uff0cbindtap\u7ed1\u5b9a\u4e8b\u4ef6\uff08\u7c7b\u4f3conclick\uff09\uff0c\u8be5\u9875\u9762\u65e0\u7279\u6b8a\u914d\u7f6e\uff0cjson\u6587\u4ef6\u5185\u5bb9\u4e3a\u7a7a\uff08\u975e\u5fc5\u987b\u6587\u4ef6\uff09<\/p>\n<pre>&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;\u5f53\u524d\u57ce\u5e02\uff1a{{basic.city}}\n&nbsp;&nbsp;&nbsp;&nbsp;{{basic.update.loc}}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre>\/**weather.wxss**\/.city&nbsp;{padding:&nbsp;3%&nbsp;5%;&nbsp;background:&nbsp;#ddd;}.city&nbsp;text{font-size:&nbsp;16px;&nbsp;color:&nbsp;#666;}.city&nbsp;.update{&nbsp;font-size:&nbsp;12px;&nbsp;float:&nbsp;right;}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre>&nbsp;app&nbsp;=&nbsp;getApp();\n&nbsp;&nbsp;data:{cur_id:app.curid,basic:\"\",now:\"\"},\n&nbsp;&nbsp;\n&nbsp;&nbsp;onShow:&nbsp;that&nbsp;=&nbsp;'\u52a0\u8f7d\u4e2d',icon:&nbsp;'loading',duration:&nbsp;10000})\n&nbsp;&nbsp;&nbsp;&nbsp;that.getnow((d){=\"http:\/\/files.heweather.com\/cond_icon\/\"+d.now.cond.code+\".png\"\n&nbsp;&nbsp;getnow:\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url:&nbsp;'https:\/\/free-api.heweather.com\/v5\/now''01a7798b060b468abdad006ea3de4713''Content-Type':&nbsp;'application\/json'(res)&nbsp;{fn(res.data.HeWeather5[0]);}\n&nbsp;&nbsp;bindViewTap:(){wx.switchTab({url:&nbsp;'..\/city\/city'})}})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">\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 style=\"text-align: left\">\u63a8\u8350\u9605\u8bfb\uff1a<\/p>\n<p style=\"margin: 5px 0px 0px;padding: 0px;text-align: left\">\n<p style=\"margin: 5px 0px 0px;padding: 0px;text-align: left\">\n<p>\u4ee5\u4e0a\u5c31\u662f\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\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\u6b21\u7ed9\u5927\u5bb6\u5e26\u6765\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u8be6\u89e3\uff0c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u5165\u95e8\u4f7f\u7528\u7684\u6ce8\u610f\u4e8b\u9879\u6709\u54ea\u4e9b\uff0c\u4e0b\u9762\u5c31\u662f\u5b9e\u6218\u6848\u4f8b\uff0c\u4e00\u8d77\u6765\u770b\u4e00\u4e0b\u3002 \u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5df2\u7ecf\u706b\u4e86\u4e00\u6bb5\u65f6\u95f4\u4e86\uff0c\u4e4b\u524d\u4e00\u76f4\u4e5f\u5728\u5173\u6ce8\uff0c\u5c31\u8fd9\u534a\u5e74\u7684\u53d1\u5c55\u6765\u770b\uff0c\u76f8\u5bf9\u539f\u751fAPP\u5927\u90e8\u5206\u516c\u53f8\u8fd8\u662f\u4e0d\u613f\u610f\u5c06\u4e3b\u8425\u4e1a\u52a1\u653e\u5230\u5fae\u4fe1\u5e73\u53f0\u4e0a\uff0c\u4ee5\u514d\u53d7\u5236\u4e8e\u817e\u8baf\uff0c\u4e0d\u8fc7\u5c31\u5c0f\u7a0b\u5e8f\u7684\u5e94\u7528\u573a\u666f\uff08\u7528\u5b8c\u5373\u8d70\u548c\u4e8c\u7ef4\u7801\u5206\u53d1\u7b49\uff09\u8fd8\u662f\u5f88\u503c\u5f97\u6211\u4eec\u5b66\u4e60\u7684\uff0c\u6280\u672f\u4e0a\u9762\u5982\u679c\u4e86\u89e3React\u7684\u8bdd\uff0c\u4f1a\u53d1\u73b0\u4ed6\u4eec\u5728\u7ec4\u4ef6\u5316\u4e0a\u9762\u6709\u5f88\u591a\u96f7\u540c\u4e4b\u5904\u3002\u8bf4\u767d\u4e86\uff0c\u5c0f\u7a0b\u5e8f\u5c31\u662f\u57fa\u4e8e\u5fae\u4fe1\u5e73\u53f0\u7684H5\u8f7b\u5e94\u7528\uff0c\u5fae\u4fe1\u5c06\u7cfb\u7edf\u5e95\u5c42\u529f\u80fd\uff08\u8bbe\u5907\u3001\u4f4d\u7f6e\u3001\u5a92\u4f53\u3001\u6587\u4ef6\u7b49\uff09\u548c\u5fae\u4fe1\u81ea\u8eab\u529f\u80fd\uff08\u767b\u5f55\u3001\u652f\u4ed8\u3001\u5206\u4eab\u7b49\uff09\u5c01\u88c5\u6210\u76f8\u5e94API\u4f9b\u5c0f\u7a0b\u5e8f\u8c03\u7528\u3002 \u81ea\u5df1\u6839\u636e\u5b98\u65b9\u6587\u6863\u5199\u8fc7\u4e00\u4e2aDOME\uff0c\u501f\u52a9\u548c\u98ce\u5929\u6c14\u5f00\u653eAPI\u63a5\u53e3\uff0c\u5b9e\u73b0\u5929\u6c14\u9884\u62a5\uff0c\u4ec5\u4f9b\u5b66\u4e60\u4ea4\u6d41\u4f7f\u7528\uff0c\u8c22\u8c22~ \u4e00\u3001\u5c0f\u7a0b\u5e8f\u57fa\u672c\u6982\u5ff5 1\u3001\u5f00\u53d1\u5de5\u5177\uff1a\u4e3a\u4e86\u914d\u5408\u5c0f\u7a0b\u5e8f\u5f00\u53d1\uff0c\u5fae\u4fe1\u4e13\u95e8\u914d\u5907\u4e86\u81ea\u5df1\u7684\u5f00\u53d1\u5de5\u5177\uff0c\u81ea\u884c\u9009\u62e9\u5bf9\u5e94\u7248\u672c\u5b89\u88c5\u3002 2\u3001\u521b\u5efa\u9879\u76ee\u5e94\u7528\uff1a\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00\u5e76\u626b\u7801\u767b\u5f55\u3002\u5c0f\u7a0b\u5e8f\u53d1\u5e03\u9700\u8981\u4f01\u4e1a\u7ea7\u7684\u8ba4\u8bc1\u516c\u4f17\u53f7\uff0c\u6240\u4ee5\u4e2a\u4eba\u8ba2\u9605\u53f7\u662f\u4e0d\u80fd\u53d1\u5e03\u7684\u3002\u6240\u4ee5\u6211\u8fd9\u91cc\u9009\u62e9\u65e0AppID\uff0c\u521b\u5efa\u9879\u76ee\u9009\u62e9\u4e00\u4e2a\u672c\u5730\u7a7a\u6587\u4ef6\u5939\uff0c\u52fe\u9009\u521b\u5efaquick start \u9879\u76ee\u751f\u6210\u4e00\u4e2ademo\u3002 3\u3001\u7f16\u5199\u5c0f\u7a0b\u5e8f\uff1ademo\u521d\u59cb\u5316\u5e76\u5305\u542b\u4e86\u4e00\u4e9b\u7b80\u5355\u7684\u4ee3\u7801\u6587\u4ef6\uff0c\u5176\u4e2dapp.js\u3001app.json\u3001app.wxss \u8fd9\u4e09\u4e2a\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\uff0c\u5c0f\u7a0b\u5e8f\u4f1a\u8bfb\u53d6\u8fd9\u4e9b\u6587\u4ef6\u521d\u59cb\u5316\u5b9e\u4f8b\u3002 \u3000\u3000app.js\u662f\u5c0f\u7a0b\u5e8f\u7684\u521d\u59cb\u5316\u811a\u672c\uff0c\u53ef\u4ee5\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u76d1\u542c\u5c0f\u7a0b\u5e8f\u7684\u751f\u547d\u5468\u671f\uff0c\u7533\u8bf7\u5168\u5c40\u53d8\u91cf\u548c\u8c03\u7528API\u7b49 \u3000\u3000app.json\u662f\u5bf9\u5c0f\u7a0b\u5e8f\u7684\u5168\u5c40\u914d\u7f6e\uff0cpages\u8bbe\u7f6e\u9875\u9762\u8def\u5f84\u7ec4\u6210\uff08\u9ed8\u8ba4\u7b2c\u4e00\u6761\u4e3a\u9996\u9875\uff09\uff0cwindow\u8bbe\u7f6e\u9ed8\u8ba4\u9875\u9762\u7684\u7a97\u53e3\u8868\u73b0\u7b49 \u3000\u3000app.wxss \u662f\u6574\u4e2a\u5c0f\u7a0b\u5e8f\u7684\u516c\u5171\u6837\u5f0f\u8868\u3002\u7c7b\u4f3c\u7f51\u7ad9\u5f00\u53d1\u4e2d\u7684common.css 4\u3001\u521b\u5efa\u9875\u9762\uff1a\u5728pages\u76ee\u5f55\u4e0b\uff0c\u7531\u4e00\u4e2a\u6587\u4ef6\u5939\u4e2d\u7684\u56db\u4e2a\u540c\u540d\u4e0d\u540c\u7c7b\u578b\u6587\u4ef6\u7ec4\u6210\u3002.js\u662f\u811a\u672c\u6587\u4ef6\uff0c.json\u662f\u914d\u7f6e\u6587\u4ef6\uff0c.wxss\u662f\u6837\u5f0f\u8868\u6587\u4ef6\uff0c.wxml\u662f\u9875\u9762\u7ed3\u6784\u6587\u4ef6\uff0c\u5176\u4e2djson\u548cwxss\u6587\u4ef6\u4e3a\u975e\u5fc5\u987b\uff08\u9ed8\u8ba4\u4f1a\u7ee7\u627fapp\u7684json\u548cwxss\u9ed8\u8ba4\u8bbe\u7f6e\uff09\u3002 \u4e8c\u3001\u5c0f\u7a0b\u5e8f\u7684\u6846\u67b6 1\u3001\u5c0f\u7a0b\u5e8f\u7684\u914d\u7f6e \u3000\u3000app.json\u4e3b\u8981\u5206\u4e3a\u4e94\u4e2a\u90e8\u5206\uff1apages\uff1a\u9875\u9762\u7ec4\uff0cwindow\uff1a\u6846\u67b6\u6837\u5f0f\uff08\u72b6\u6001\u680f\u3001\u5bfc\u822a\u6761\u3001\u6807\u9898\u3001\u7a97\u53e3\u80cc\u666f\u8272\uff09\uff0ctabBar\uff1a\u5e95\u90e8\u83dc\u5355\uff0cnetworkTimeout\uff1a\u7f51\u7edc\u8d85\u65f6\u8bbe\u7f6e\uff0cdebug\uff1a\u5f00\u542fdebug\u6a21\u5f0f \u3000\u3000page.json\u9488\u5bf9\u9875\u9762\u5355\u72ec\u8bbe\u7f6e\uff0c\u5c42\u53e0\u6389app.json\u7684\u5168\u5c40\u8bbe\u7f6e &#8220;pages&#8221;&#8221;pages\/index\/index&#8221;&#8221;pages\/logs\/logs&#8221;&#8221;window&#8221;&#8221;backgroundTextStyle&#8221;:&#8221;light&#8221;&#8221;navigationBarBackgroundColor&#8221;:&nbsp;&#8220;#000&#8243;&#8221;navigationBarTitleText&#8221;:&nbsp;&#8220;WeChat&#8221;&#8221;navigationBarTextStyle&#8221;:&#8221;white&#8221; \u767b\u5f55\u540e\u590d\u5236 2\u3001\u5c0f\u7a0b\u5e8f\u7684\u903b\u8f91 \u3000\u3000\u4f7f\u7528App()\u6765\u6ce8\u518c\u4e00\u4e2a\u5c0f\u7a0b\u5e8f\uff0c\u5fc5\u987b\u5728app.js\u4e2d\u6ce8\u518c\uff0c\u4e14\u4e0d\u80fd\u6ce8\u518c\u591a\u4e2a App({\/\/\u5982\u4e0b\u4e3a\u5c0f\u7a0b\u5e8f\u7684\u751f\u547d\u5468\u671f &nbsp;&nbsp;onLaunch:&nbsp;function()&nbsp;{&nbsp;},\/\/\u76d1\u542c\u521d\u59cb\u5316 &nbsp;&nbsp;onShow:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u663e\u793a\uff08\u8fdb\u5165\u524d\u53f0\uff09 &nbsp;&nbsp;onHide:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u9690\u85cf\uff08\u8fdb\u5165\u540e\u53f0\uff1a\u6309home\u79bb\u5f00\u5fae\u4fe1\uff09 &nbsp;&nbsp;onError:&nbsp;function(msg)&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u9519\u8bef &nbsp;&nbsp;\/\/\u5982\u4e0b\u4e3a\u81ea\u5b9a\u4e49\u7684\u5168\u5c40\u65b9\u6cd5\u548c\u5168\u5c40\u53d8\u91cf&nbsp;&nbsp; &nbsp;&nbsp;globalFun:function(){}, &nbsp;&nbsp;globalData:&nbsp;&#8216;I&nbsp;am&nbsp;global&nbsp;data&#8217;}) \u767b\u5f55\u540e\u590d\u5236 \u3000\u3000\u4f7f\u7528Page()\u6ce8\u518c\u4e00\u4e2a\u9875\u9762\uff0c\u5728\u6bcf\u4e2a\u9875\u9762\u7684js\u6587\u4ef6\u4e2d\u6ce8\u518c Page({ &nbsp;&nbsp;data:&nbsp;{text:&nbsp;&#8220;This&nbsp;is&nbsp;page&nbsp;data.&#8221;},\/\/\u9875\u9762\u6570\u636e\uff0c\u7528\u6765\u7ef4\u62a4\u89c6\u56fe\uff0cjson\u683c\u5f0f &nbsp;&nbsp;onLoad:&nbsp;function(options)&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u52a0\u8f7d &nbsp;&nbsp;onReady:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u521d\u6b21\u6e32\u67d3\u5b8c\u6210 &nbsp;&nbsp;onShow:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u663e\u793a &nbsp;&nbsp;onHide:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u9690\u85cf &nbsp;&nbsp;onUnload:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u5378\u8f7d &nbsp;&nbsp;onPullDownRefresh:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u4e0b\u62c9 &nbsp;&nbsp;onReachBottom:&nbsp;function()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u4e0a\u62c9\u89e6\u5e95 &nbsp;&nbsp;onShareAppMessage:&nbsp;function&nbsp;()&nbsp;{&nbsp;&nbsp;},\/\/\u76d1\u542c\u53f3\u4e0a\u89d2\u5206\u4eab &nbsp;&nbsp;\/\/\u5982\u4e0b\u4e3a\u81ea\u5b9a\u4e49\u7684\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\uff08\u89c6\u56fe\u4e2d\u7ed1\u5b9a\u7684\uff09 &nbsp;&nbsp;viewTap:&nbsp;function()&nbsp;{\/\/setData\u8bbe\u7f6edata\u503c\uff0c\u540c\u65f6\u5c06\u66f4\u65b0\u89c6\u56fe &nbsp;&nbsp;&nbsp;&nbsp;this.setData({text:&nbsp;&#8216;Set&nbsp;some&nbsp;data&nbsp;for&nbsp;updating&nbsp;view.&#8217;}) &nbsp;&nbsp;} }) \u767b\u5f55\u540e\u590d\u5236 3\u3001\u5c0f\u7a0b\u5e8f\u7684\u89c6\u56fe\u4e0e\u4e8b\u4ef6\u7ed1\u5b9a \u3000\u3000\u5728\u6bcf\u4e2a\u9875\u9762\u4e2d\u7684wxml\u6587\u4ef6\u4e2d\uff0c\u5bf9\u9875\u9762js\u4e2ddata\u8fdb\u884c\u6570\u636e\u7ed1\u5b9a\uff0c\u4ee5\u53ca\u81ea\u5b9a\u4e49\u4e8b\u4ef6\u7ed1\u5b9a &lt;!&#8211;{{}}\u7ed1\u5b9adata\u4e2d\u7684\u6307\u5b9a\u6570\u636e\u5e76\u6e32\u67d3\u5230\u89c6\u56fe&#8211;&gt;&lt;view&gt;{{text}}&lt;\/view&gt;&lt;!&#8211;wx:for\u83b7\u53d6\u6570\u7ec4\u6570\u636e\u8fdb\u884c\u5faa\u73af\u6e32\u67d3\uff0citem\u4e3a\u6570\u7ec4\u7684\u6bcf\u9879&#8211;&gt;&lt;view&gt;&nbsp;{{item}}&nbsp;&lt;\/view&gt;&lt;!&#8211;wx:if\u6761\u4ef6\u6e32\u67d3&#8211;&gt;&lt;view&gt;&nbsp;WEBVIEW&nbsp;&lt;\/view&gt;&lt;view&gt;&nbsp;APP&nbsp;&lt;\/view&gt;&lt;view&gt;&nbsp;MINA&nbsp;&lt;\/view&gt;&lt;!&#8211;\u6a21\u677f&#8211;&gt;&lt;template&gt; &nbsp;&nbsp;&lt;view&gt;FirstName:&nbsp;{{firstName}},&nbsp;LastName:&nbsp;{{lastName}}&lt;\/view&gt;&lt;\/template&gt;&lt;template&gt;&lt;\/template&gt;&lt;template&gt;&lt;\/template&gt;&lt;!&#8211;bindtap\u6307\u5b9atap\u4e8b\u4ef6\u5904\u7406\u51fd\u6570\u4e3aViewTap&#8211;&gt;&lt;view&gt;&nbsp;\u70b9\u6211\u70b9\u6211&nbsp;&lt;\/view&gt; \u767b\u5f55\u540e\u590d\u5236 Page({ [&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-31486","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31486","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=31486"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31486\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=31486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=31486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=31486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}