{"id":29684,"date":"2024-11-25T08:34:11","date_gmt":"2024-11-25T00:34:11","guid":{"rendered":"https:\/\/fwq.ai\/blog\/29684\/"},"modified":"2024-11-25T08:34:11","modified_gmt":"2024-11-25T00:34:11","slug":"%e5%b8%a6%e4%bd%a0%e4%bd%93%e9%aa%8c%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f%e5%ae%8c%e6%95%b4%e5%bc%80%e5%8f%91%e8%bf%87%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/29684\/","title":{"rendered":"\u5e26\u4f60\u4f53\u9a8c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5b8c\u6574\u5f00\u53d1\u8fc7\u7a0b"},"content":{"rendered":"<p><span style=\"font-family:\">\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u8fd8\u6ca1\u6b63\u5f0f\u53d1\u5e03\u5c31\u5df2\u7ecf\u8fc5\u901f\u6210\u4e3a\u5927\u5bb6\u8ba8\u8bba\u7684\u7126\u70b9\uff0c\u90a3\u4e48\u5927\u5bb6\u53ef\u80fd\u89c9\u5f97\u53ea\u6709\u6536\u5230\u5185\u6d4b\u9080\u8bf7\u624d\u80fd\u4f53\u9a8c\u5c0f\u7a0b\u5e8f\u7684\u5f00\u53d1\u6d41\u7a0b\uff0c\u5176\u5b9e\u4e0d\u7136\uff0c\u5927\u5bb6\u90fd\u53ef\u4ee5\u4f53\u9a8c\uff0c\u4e0b\u9762\u5c31\u5e26\u5927\u5bb6\u4e00\u8d77\u4e86\u89e3\u3002<\/span><\/p>\n<h2><span style=\"font-weight:700\">\u4e0b\u8f7d\u5fae\u4fe1 Web \u5f00\u53d1\u8005\u5de5\u5177<\/span><\/h2>\n<p style=\"color:#404040;font-family:\">\u9996\u5148\uff0c\u5fae\u4fe1\u7ed9\u6211\u4eec\u63d0\u4f9b\u4e86\u5b83\u81ea\u5df1\u7684\u5c0f\u7a0b\u5e8f\u96c6\u6210\u5f00\u53d1\u5de5\u5177\uff0c\u53ea\u9700\u8981\u5230\u8fd9\u4e2a\u9875\u9762\u4e0b\u8f7d\u5373\u53ef\uff1a<\/p>\n<p style=\"color:#404040;font-family:\">\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u6253\u5f00\u5f00\u53d1\u8005\u5de5\u5177\uff0c\u4f1a\u6709\u4e00\u4e2a\u626b\u7801\u767b\u5f55\u754c\u9762\u3002 \u7528\u4f60\u7684\u5fae\u4fe1\u626b\u7801\u5c31\u53ef\u4ee5\u767b\u5f55\u8fdb\u6765\u4e86\uff0c \u7136\u540e\u5f00\u53d1\u8005\u5de5\u5177\u4f1a\u5e2e\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u9ed8\u8ba4\u5de5\u7a0b\uff0c\u9879\u76ee\u7684\u6587\u4ef6\u7ed3\u6784\u5982\u4e0b\uff1a<\/p>\n<p style=\"color:#404040;font-family:\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/001\/505\/b3980ee409d55a100766b95819ad71f3-1.png\" class=\"aligncenter\" title=\"\u5e26\u4f60\u4f53\u9a8c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5b8c\u6574\u5f00\u53d1\u8fc7\u7a0b\u63d2\u56fe\" alt=\"\u5e26\u4f60\u4f53\u9a8c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5b8c\u6574\u5f00\u53d1\u8fc7\u7a0b\u63d2\u56fe\" \/><\/p>\n<p style=\"color:#404040;font-family:\">\u6240\u6709\u7684\u4ee3\u7801\u7f16\u8f91\u4ee5\u53ca\u8fd0\u884c\u9884\u89c8\u90fd\u53ef\u4ee5\u5728\u8fd9\u4e2a\u5f00\u53d1\u8005\u5de5\u5177\u4e2d\u8fdb\u884c\u3002\u63a5\u4e0b\u6765\u54b1\u4eec\u770b\u770b\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u9879\u76ee\u7ed3\u6784\u3002<\/p>\n<h2><span style=\"font-weight:700\">\u9879\u76ee\u7ed3\u6784<\/span><\/h2>\n<p style=\"color:#404040;font-family:\">\u5982\u4e0a\u56fe\uff0c\u9996\u5148\u5728\u6839\u76ee\u5f55\u4e2d\u6709\u4e09\u4e2a\u6587\u4ef6 app.js, app.json, app.wxss\u3002 \u5176\u4e2d app.js \u662f\u7a0b\u5e8f\u4e3b\u5165\u53e3\u7684\u811a\u672c\u6587\u4ef6\uff0c app.json \u662f\u5168\u5c40\u914d\u7f6e\u6587\u4ef6, app.wxss \u662f\u5c0f\u7a0b\u5e8f\u7684\u6837\u5f0f\u8868\u6587\u4ef6\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u5148\u6765\u770b\u770b app.json :<\/p>\n<pre>{&nbsp;\"pages\":[&nbsp;\"pages\/index\/index\",&nbsp;\"pages\/logs\/logs\"&nbsp;],&nbsp;\"window\":{&nbsp;\"backgroundTextStyle\":\"light\",&nbsp;\"navigationBarBackgroundColor\":&nbsp;\"#fff\",&nbsp;\"navigationBarTitleText\":&nbsp;\"WeChat\",&nbsp;\"navigationBarTextStyle\":\"black\"&nbsp;}\r\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"color:#404040;font-family:\">\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u4e2d\u5b9a\u4e49\u4e86\u4e24\u4e2a\u8282\u70b9\uff0c pages \u662f\u5c0f\u7a0b\u5e8f\u7684\u6240\u6709\u9875\u9762\u5bf9\u5e94\u7684\u8def\u5f84\uff0c window \u662f\u5c0f\u7a0b\u5e8f\u7a97\u53e3\u7684\u914d\u7f6e\u4fe1\u606f\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u518d\u6765\u770b\u770b\u6837\u5f0f\u6587\u4ef6 app.wxss :<\/p>\n<pre>.container&nbsp;{\r\n&nbsp;&nbsp;height:&nbsp;100%;\r\n&nbsp;&nbsp;display:&nbsp;flex;\r\n&nbsp;&nbsp;flex-direction:&nbsp;column;\r\n&nbsp;&nbsp;align-items:&nbsp;center;\r\n&nbsp;&nbsp;justify-content:&nbsp;space-between;\r\n&nbsp;&nbsp;padding:&nbsp;200rpx&nbsp;0;\r\n&nbsp;&nbsp;box-sizing:&nbsp;border-box;\r\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"color:#404040;font-family:\">\u54b1\u4eec\u5148\u4e0d\u7528\u6df1\u7a76\u5b83\u5177\u4f53\u5b9a\u4e49\u4e86\u4ec0\u4e48\u6837\u5f0f\uff0c\u53ea\u9700\u8981\u5148\u4e86\u89e3\u9879\u76ee\u7ed3\u6784\u5373\u53ef\u3002\u63a5\u4e0b\u6765\u518d\u6765\u770b\u770b\u7a0b\u5e8f\u7684\u4e3b\u5165\u53e3 app.js\uff1a<\/p>\n<pre>\/\/app.js&nbsp;App({\r\n&nbsp;&nbsp;onLaunch:&nbsp;function&nbsp;()&nbsp;{&nbsp;\/\/\u8c03\u7528API\u4ece\u672c\u5730\u7f13\u5b58\u4e2d\u83b7\u53d6\u6570\u636e&nbsp;var&nbsp;logs&nbsp;=&nbsp;wx.getStorageSync('logs')&nbsp;||&nbsp;[]\r\n&nbsp;&nbsp;&nbsp;&nbsp;logs.unshift(Date.now())\r\n&nbsp;&nbsp;&nbsp;&nbsp;wx.setStorageSync('logs',&nbsp;logs)\r\n&nbsp;&nbsp;},\r\n&nbsp;&nbsp;getUserInfo:function(cb){&nbsp;var&nbsp;that&nbsp;=&nbsp;this&nbsp;if(this.globalData.userInfo){&nbsp;typeof&nbsp;cb&nbsp;==&nbsp;\"function\"&nbsp;&amp;amp;&amp;amp;&nbsp;cb(this.globalData.userInfo)\r\n&nbsp;&nbsp;&nbsp;&nbsp;}else{&nbsp;\/\/\u8c03\u7528\u767b\u5f55\u63a5\u53e3&nbsp;wx.login({\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;success:&nbsp;function&nbsp;()&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wx.getUserInfo({\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;success:&nbsp;function&nbsp;(res)&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;that.globalData.userInfo&nbsp;=&nbsp;res.userInfo&nbsp;typeof&nbsp;cb&nbsp;==&nbsp;\"function\"&nbsp;&amp;amp;&amp;amp;&nbsp;cb(that.globalData.userInfo)\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})\r\n&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;},\r\n&nbsp;&nbsp;globalData:{\r\n&nbsp;&nbsp;&nbsp;&nbsp;userInfo:null&nbsp;}\r\n})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"color:#404040;font-family:\">\u8fd9\u91cc\u521d\u59cb\u5316\u4e86\u4e00\u4e2a App \uff0c\u5e76\u4e14\u5b9a\u4e49\u4e86\u4e09\u4e2a\u65b9\u6cd5 onLaunch \uff0c getUserInfo \u548c globalData \u3002 \u5148\u6765\u770b\u770b onLaunch :<\/p>\n<pre>onLaunch:&nbsp;function&nbsp;()&nbsp;{&nbsp;\/\/\u8c03\u7528API\u4ece\u672c\u5730\u7f13\u5b58\u4e2d\u83b7\u53d6\u6570\u636e&nbsp;var&nbsp;logs&nbsp;=&nbsp;wx.getStorageSync('logs')&nbsp;||&nbsp;[]\r\n&nbsp;&nbsp;&nbsp;&nbsp;logs.unshift(Date.now())\r\n&nbsp;&nbsp;&nbsp;&nbsp;wx.setStorageSync('logs',&nbsp;logs)\r\n\r\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"color:#404040;font-family:\">\u9996\u5148 wx.getStorageSync \u65b9\u6cd5\u4f1a\u83b7\u5f97\u672c\u5730\u7684\u4e00\u4e2a\u4ee5 logs \u4e3a  \u7684\u3002 \u4f20\u5165\u8fd9\u4e2a\u65b9\u6cd5\u7684 logs \u672c\u8eab\u6ca1\u6709\u4efb\u4f55\u7279\u6b8a\u542b\u4e49\uff0c\u53ea\u662f\u7528\u4e8e\u8868\u793a\u6211\u4eec\u4f7f\u7528\u7684\u7f13\u5b58\u6570\u636e\u3002 \u8fd9\u4e2a\u673a\u5236\u53ef\u4ee5\u7406\u89e3\u4e3a\u548c iOS \u7684 NSUserDefaults \u7c7b\u4f3c\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u7136\u540e\uff0c\u6211\u4eec\u60f3\u8fd9\u4e2a\u7f13\u5b58\u4e2d\u63d2\u5165\u5f53\u524d\u7684\u65e5\u671f logs.unshift(Date.now()) \u3002 \u6700\u540e\u518d\u8c03\u7528 setStorageSync \u65b9\u6cd5\u5c06\u6211\u4eec\u65b0\u7684\u7f13\u5b58\u5185\u5bb9\u5199\u5165\u5230\u672c\u5730\u7f13\u5b58\u4e2d\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u56e0\u4e3a onLaunch \u65b9\u6cd5\u662f\u5c0f\u7a0b\u5e8f\u7684\u65b9\u6cd5\uff0c\u6240\u4ee5\u5728\u5c0f\u7a0b\u5e8f\u542f\u52a8\u7684\u65f6\u5019\u5c31\u4f1a\u8c03\u7528\u5b83\uff0c\u5e76\u5c06\u5f53\u524d\u542f\u52a8\u7684\u65e5\u671f\u8bb0\u5f55\u5e76\u5199\u5165\u672c\u5730\u7f13\u5b58\u4e2d\u3002 \u6ca1\u9519 onLaunch \u6574\u4e2a\u65b9\u6cd5\u5c31\u5e72\u4e86\u8fd9\u4ef6\u4e8b\u513f\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u6211\u4eec\u518d\u6765\u770b\u4e0b getUserInfo \u65b9\u6cd5\uff0c\u5b83\u901a\u8fc7\u8c03\u7528 wx.login \u548c wx.getUserInfo \u4e24\u4e2a\u5fae\u4fe1\u5e73\u53f0\u7684\u51fd\u6570\u83b7\u53d6\u5f53\u524d\u7528\u6237\u767b\u5f55\u4fe1\u606f\uff0c\u5e76\u4f20\u4f1a\u7ed9 cb\uff1a<\/p>\n<pre>getUserInfo:function(cb){&nbsp;var&nbsp;that&nbsp;=&nbsp;this&nbsp;if(this.globalData.userInfo){&nbsp;typeof&nbsp;cb&nbsp;==&nbsp;\"function\"&nbsp;&amp;amp;&amp;amp;&nbsp;cb(this.globalData.userInfo)\r\n&nbsp;&nbsp;&nbsp;&nbsp;}else{&nbsp;\/\/\u8c03\u7528\u767b\u5f55\u63a5\u53e3&nbsp;wx.login({\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;success:&nbsp;function&nbsp;()&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wx.getUserInfo({\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;success:&nbsp;function&nbsp;(res)&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;that.globalData.userInfo&nbsp;=&nbsp;res.userInfo&nbsp;typeof&nbsp;cb&nbsp;==&nbsp;\"function\"&nbsp;&amp;amp;&amp;amp;&nbsp;cb(that.globalData.userInfo)\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})\r\n&nbsp;&nbsp;&nbsp;&nbsp;}\r\n\r\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"color:#404040;font-family:\">\u81f3\u4e8e\u6700\u5f00\u59cb\u7684 if \u5224\u65ad if(this.globalData.userInfo) \u54b1\u4eec\u6682\u65f6\u4e0d\u7528\u6df1\u7a76\uff0c\u53ea\u770b else \u90e8\u5206\u5373\u53ef\u3002<\/p>\n<h2><span style=\"font-weight:700\">\u9875\u9762\u7ed3\u6784<\/span><\/h2>\n<p style=\"color:#404040;font-family:\">\u4e86\u89e3\u5b8c\u6839\u76ee\u5f55\u7684\u51e0\u4e2a\u6587\u4ef6\uff0c \u54b1\u4eec\u518d\u6765\u770b\u770b\u9875\u9762\u6587\u4ef6, \u6b63\u5982\u54b1\u4eec\u521a\u5f00\u59cb\u622a\u56fe\u4e2d\u770b\u5230\u7684\u9879\u76ee\u7ed3\u6784\uff1a<\/p>\n<p style=\"color:#404040;font-family:\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/001\/505\/b3980ee409d55a100766b95819ad71f3-2.png\" class=\"aligncenter\" title=\"\u5e26\u4f60\u4f53\u9a8c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5b8c\u6574\u5f00\u53d1\u8fc7\u7a0b\u63d2\u56fe1\" alt=\"\u5e26\u4f60\u4f53\u9a8c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5b8c\u6574\u5f00\u53d1\u8fc7\u7a0b\u63d2\u56fe1\" \/><\/p>\n<p style=\"color:#404040;font-family:\">\u6240\u6709\u7684\u9875\u9762\u90fd\u5728 pages \u6587\u4ef6\u5939\u4e2d\u3002 \u6211\u4eec\u8fd9\u4e2a\u793a\u4f8b\u5de5\u7a0b\u4e2d\u6709\u4e24\u4e2a\u9875\u9762 index \u548c logs\u3002 \u8fd8\u8bb0\u5f97\u6211\u4eec\u524d\u9762\u5728 app.json \u770b\u5230\u7684\u9875\u9762\u914d\u7f6e\u5417\uff1a<\/p>\n<pre>\"pages\":[&nbsp;\"pages\/index\/index\",&nbsp;\"pages\/logs\/logs\"&nbsp;]<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"color:#404040;font-family:\">\u6b63\u597d\u5bf9\u5e94\u4e0a\u54b1\u4eec\u73b0\u5728\u770b\u5230\u7684\u4e24\u4e2a\u76ee\u5f55\uff0c \u8fd8\u8981\u8bb0\u5f97\u4e00\u70b9\uff0c pages \u6570\u7ec4\u4e2d\u7684\u7b2c\u4e00\u4e2a\u5143\u7d20\u4f1a\u4f5c\u4e3a\u6211\u4eec\u5c0f\u7a0b\u5e8f\u7684\u4e3b\u9875\u3002 \u5207\u8bb0\uff0cindex \u9875\u9762\u4e4b\u6240\u4ee5\u662f\u9996\u9875\uff0c\u662f\u56e0\u4e3a\u5b83\u662f pages \u91cc\u9762\u7684\u7b2c\u4e00\u4e2a\u5143\u7d20\uff0c \u800c\u4e0d\u662f\u56e0\u4e3a\u5b83\u7684\u540d\u79f0\u662f index\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u6211\u4eec\u6765\u770b\u770b index \u9875\u9762\u7684\u6784\u6210\uff0c index.js, index.w, index.wxss\u3002 index.js \u662f\u9875\u9762\u7684\u811a\u672c\u6587\u4ef6, index.wxml \u662f\u9875\u9762\u7684 UI \u6587\u4ef6\uff0c index.wxss \u662f\u9875\u9762\u7684\u6837\u5f0f\u6587\u4ef6\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u5148\u770b\u4e00\u4e0b index.js:<\/p>\n<pre>\/\/index.js&nbsp;\/\/\u83b7\u53d6\u5e94\u7528\u5b9e\u4f8b&nbsp;var&nbsp;app&nbsp;=&nbsp;getApp()\r\nPage({\r\n&nbsp;&nbsp;data:&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;motto:&nbsp;'Hello&nbsp;World',\r\n&nbsp;&nbsp;&nbsp;&nbsp;userInfo:&nbsp;{}\r\n&nbsp;&nbsp;},&nbsp;\/\/\u4e8b\u4ef6\u5904\u7406\u51fd\u6570&nbsp;bindViewTap:&nbsp;function()&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;wx.navigateTo({\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url:&nbsp;'..\/logs\/logs'&nbsp;})\r\n&nbsp;&nbsp;},\r\n&nbsp;&nbsp;onLoad:&nbsp;function&nbsp;()&nbsp;{&nbsp;console.log('onLoad')&nbsp;var&nbsp;that&nbsp;=&nbsp;this&nbsp;\/\/\u8c03\u7528\u5e94\u7528\u5b9e\u4f8b\u7684\u65b9\u6cd5\u83b7\u53d6\u5168\u5c40\u6570\u636e&nbsp;app.getUserInfo(function(userInfo){&nbsp;\/\/\u66f4\u65b0\u6570\u636e&nbsp;that.setData({\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;userInfo:userInfo\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})\r\n&nbsp;&nbsp;&nbsp;&nbsp;})\r\n&nbsp;&nbsp;}\r\n})<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"color:#404040;font-family:\">getApp() \u65b9\u6cd5\u83b7\u53d6\u6211\u4eec\u7684 app \u5b9e\u4f8b\u3002 \u7136\u540e\u5728\u770b onLoad \u65b9\u6cd5\uff0c \u4f7f\u7528\u6211\u4eec\u521a\u624d\u63d0\u5230\u7684 getUserInfo \u65b9\u6cd5\u83b7\u53d6\u7528\u6237\u4fe1\u606f\uff0c\u5e76\u8bbe\u7f6e\u5230 data \u4e2d\u3002<\/p>\n<p style=\"color:#404040;font-family:\">bindViewTap \u65b9\u6cd5\u4f1a\u7ed1\u5b9a\u4e00\u4e2a\u4e8b\u4ef6\uff0c\u8fd9\u4e2a\u4e8b\u4ef6\u8c03\u7528 wx.navigateTo \u65b9\u6cd5\u3002 \u8fd9\u4e2a\u65b9\u6cd5\u5176\u5b9e\u5c31\u662f\u9875\u9762\u8df3\u8f6c\uff0c\u4ece\u4ee3\u7801\u4e2d\u4e5f\u4e0d\u96be\u770b\u51fa\uff0c\u8df3\u8f6c\u5230\u4e86 logs \u9875\u9762\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u811a\u672c\u6587\u4ef6\u5c31\u8fd9\u4e9b\u5185\u5bb9\u4e86\uff0c\u54b1\u4eec\u7ee7\u7eed\u518d\u6765\u770b\u770b UI \u6587\u4ef6\uff0c index.wxml:<\/p>\n<pre>&lt;!-- &lt;view class=\"container\"&gt; &lt;view bindtap=\"bindViewTap\" class=\"userinfo\"&gt; &lt;image class=\"userinfo-avatar\" src=\"{{userInfo.avatarUrl}}\" background-size=\"cover\"&gt;&lt;\/image&gt; &lt;text class=\"userinfo-nickname\"&gt;{{userInfo.nickName}}&lt;\/text&gt; &lt;\/view&gt; &lt;view class=\"usermotto\"&gt; &lt;text class=\"user-motto\"&gt;{{motto}}&lt;\/text&gt; &lt;\/view&gt; &lt;\/view&gt; --&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"color:#404040;font-family:\">\u8fd9\u4e2a\u5c31\u662f\u5c0f\u7a0b\u5e8f index \u9875\u9762\u7684 UI \u6587\u4ef6\u4e86\uff0c\u5176\u5b9e\u5c31\u662f\u5fae\u4fe1\u5e73\u53f0\u5b9a\u4e49\u4e86\u4e00\u7cfb\u5217\u7ec4\u4ef6\uff0c\u6700\u5916\u5c42\u662f \u8fd8\u8bb0\u5f97 container \u4e48\uff1f \u6211\u4eec\u5728\u6700\u5916\u5c42\u7684 app.wxss \u5b9a\u4e49\u4e86\u5b83\u7684\u6837\u5f0f\u3002 \u5b83\u91cc\u9762\u5305\u542b\u4e86\u4e24\u4e2a View\u3002\u5148\u6765\u770b\u770b\u7b2c\u4e00\u4e2a\uff1a <\/p>\n<pre>&lt;!-- &lt;view bindtap=\"bindViewTap\" class=\"userinfo\"&gt; &lt;image class=\"userinfo-avatar\" src=\"{{userInfo.avatarUrl}}\" background-size=\"cover\"&gt;&lt;\/image&gt; &lt;text class=\"userinfo-nickname\"&gt;{{userInfo.nickName}}&lt;\/text&gt; &lt;\/view&gt; --&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"color:#404040;font-family:\">\u9996\u5148 bindtap=&#8221;bindViewTap&#8221; \u7ed9\u8fd9\u4e2a View \u7ed1\u5b9a\u4e86\u4e00\u4e2a\u70b9\u51fb\u4e8b\u4ef6\uff0c\u4e5f\u5c31\u662f\u6211\u4eec\u524d\u9762 index.js \u5bf9\u5e94\u7684\u8fd9\u4e2a\u65b9\u6cd5\uff0c\u7528\u6237\u70b9\u51fb\u8fd9\u4e2a View \u5c31\u4f1a\u8df3\u8f6c\u5230 logs \u9875\u9762\u4e0a\u3002 \u7136\u540e\u8fd9\u4e2a View \u91cc\u9762\u5305\u542b\u4e86\u4e00\u4e2a Image \u548c Text\uff0c Image \u7684 src \u5c5e\u6027\u8bbe\u7f6e\u4e3a userInfo.avatarUrl\uff0c \u4ee3\u8868\u5f53\u524d\u7528\u6237\u7684\u5934\u50cf\uff0c Text \u4e2d\u4f7f\u7528 userInfo.nickName\uff0c \u4ee3\u8868\u5f53\u524d\u7528\u6237\u7684\u6635\u79f0\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u8fd9\u6837\uff0c index \u9875\u9762\u7684\u6574\u4f53\u903b\u8f91\u5c31\u90fd\u5b8c\u6210\u4e86\uff0c \u8fd8\u6709\u4e00\u4e2a index.wxss \u6837\u5f0f\u6587\u4ef6\uff0c\u8fd9\u4e2a\u54b1\u4eec\u5c31\u5148\u7565\u8fc7\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u518d\u6765\u770b\u770b\u7b2c\u4e8c\u4e2a\u89c6\u56fe\uff1a<\/p>\n<pre>&lt;!-- &lt;view class=\"usermotto\"&gt; &lt;text class=\"user-motto\"&gt;{{motto}}&lt;\/text&gt; &lt;\/view&gt; --&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"color:#404040;font-family:\">motto \u5176\u5b9e\u5c31\u662f\u6211\u4eec\u5728 index.js \u4e2d\u5b9a\u4e49\u7684\u4e00\u4e2a\u5c5e\u6027\uff1a<\/p>\n<pre>data:&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;motto:&nbsp;'Hello&nbsp;World',\r\n&nbsp;&nbsp;&nbsp;&nbsp;userInfo:&nbsp;{}\r\n&nbsp;}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"color:#404040;font-family:\">\u5b83\u4f1a\u5728\u9875\u9762\u4e0a\u663e\u793a\u4e00\u4e2a Hello World\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u73b0\u5728\uff0c\u6211\u4eec\u5207\u6362\u5230\u8c03\u8bd5\u754c\u9762\uff0c \u5c31\u53ef\u4ee5\u770b\u5230\u5c0f\u7a0b\u5e8f\u7684\u4e3b\u9875\u4e86\uff0c \u548c\u6211\u4eec\u521a\u521a\u63cf\u8ff0\u7684 UI \u5b8c\u5168\u4e00\u6837\u5427\uff1a<\/p>\n<p style=\"color:#404040;font-family:\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/001\/505\/a39134272482e7e62fc8b9c1d9c0d703-3.png\" class=\"aligncenter\" title=\"\u5e26\u4f60\u4f53\u9a8c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5b8c\u6574\u5f00\u53d1\u8fc7\u7a0b\u63d2\u56fe2\" alt=\"\u5e26\u4f60\u4f53\u9a8c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5b8c\u6574\u5f00\u53d1\u8fc7\u7a0b\u63d2\u56fe2\" \/><\/p>\n<p style=\"color:#404040;font-family:\">\u8fd9\u91cc\u7684\u7528\u6237\u5934\u50cf\u548c\u6635\u79f0\u662f\u52a8\u6001\u4ece\u4f60\u7684\u767b\u5f55\u72b6\u6001\u4e2d\u53d6\u5230\u7684\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u7136\u540e\u6211\u4eec\u5728\u8fd9\u91cc\u70b9\u51fb\u7528\u6237\u7684\u5934\u50cf\uff0c\u5c31\u4f1a\u8df3\u8f6c\u5230 logs \u9875\u9762\uff0c \u5217\u51fa\u4f60\u6bcf\u6b21\u767b\u5f55\u5c0f\u7a0b\u5e8f\u7684\u65f6\u95f4\u70b9\u3002<\/p>\n<h2><span style=\"font-weight:700\">\u4e0a\u4f20\u5c0f\u7a0b\u5e8f<\/span><\/h2>\n<p style=\"color:#404040;font-family:\">\u73b0\u5728\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u57fa\u672c\u5f00\u53d1\u6d41\u7a0b\u5c31\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u5b8c\u4e86\uff0c\u8fd8\u6709\u4e00\u4e2a logs \u9875\u9762\u6ca1\u4ecb\u7ecd\uff0c\u4f46\u5b83\u548c index \u7684\u9875\u9762\u7684\u57fa\u672c\u601d\u8def\u90fd\u662f\u4e00\u6837\u7684\uff0c\u54b1\u4eec\u5c31\u4e0d\u591a\u8d58\u8ff0\u4e86\u3002 \u5f00\u53d1\u5b8c\u5c0f\u7a0b\u5e8f\u540e\uff0c\u6211\u4eec\u9700\u8981\u628a\u5b83\u90e8\u7f72\u5230\u54ea\u91cc\u5462\uff1f \u76f8\u4fe1\u5927\u5bb6\u4e5f\u6709\u540c\u6837\u7684\u95ee\u9898\u3002 \u7b54\u6848\u4e5f\u5f88\u7b80\u5355\uff0c\u5207\u6362\u5230&nbsp;<span style=\"font-weight:700\">\u9879\u76ee<\/span>&nbsp;\u9009\u9879\u5361\uff0c\u7136\u540e\u70b9\u51fb\u4e0a\u4f20\u6309\u94ae\u5373\u53ef\uff1a<\/p>\n<p style=\"color:#404040;font-family:\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/001\/505\/a39134272482e7e62fc8b9c1d9c0d703-4.png\" class=\"aligncenter\" title=\"\u5e26\u4f60\u4f53\u9a8c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5b8c\u6574\u5f00\u53d1\u8fc7\u7a0b\u63d2\u56fe3\" alt=\"\u5e26\u4f60\u4f53\u9a8c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5b8c\u6574\u5f00\u53d1\u8fc7\u7a0b\u63d2\u56fe3\" \/><\/p>\n<p style=\"color:#404040;font-family:\">\u7531\u4e8e\u6211\u7684\u73af\u5883\u6ca1\u6709\u5185\u6d4b\u8d26\u53f7\uff0c\u6240\u4ee5\u5728\u4e0a\u4f20\u533a\u57df\u663e\u793a\u7684\u662f \u9879\u76ee\u672a\u5173\u8054 AppID \uff0c \u5982\u679c\u6709\u4e86\u6d4b\u8bd5\u8d26\u53f7\uff0c\u5c31\u4f1a\u663e\u793a\u4f60\u7684 AppID \u4e86\u3002 \u76ee\u524d\u53ea\u6709\u5185\u6d4b\u8d26\u53f7\u624d\u80fd\u591f\u4e0a\u4f20\u5c0f\u7a0b\u5e8f\u3002\u8fd9\u5c31\u662f\u552f\u4e00\u7684\u5dee\u522b\u4e86\u3002\u6ca1\u6709\u5185\u6d4b\u8d26\u53f7\u53ea\u662f\u4e0d\u80fd\u4e0a\u4f20\uff0c\u4f46\u5b8c\u5168\u53ef\u4ee5\u5728\u672c\u5730\u5f00\u53d1\u548c\u6d4b\u8bd5\u3002<\/p>\n<p style=\"color:#404040;font-family:\">\u5c0f\u7a0b\u5e8f\u7684\u8fd9\u79cd\u4e0a\u4f20\u65b9\u5f0f\u53ef\u80fd\u4f1a\u8ba9\u5927\u5bb6\u89c9\u5f97\u6709\u4e9b\u4e0d\u540c\u5427\u3002 \u5927\u5bb6\u5e73\u5e38\u7406\u89e3\u7684 Web app \u4e00\u822c\u90fd\u9700\u8981\u81ea\u5df1\u642d\u5efa\u670d\u52a1\u7aef\uff0c\u5e76\u4e14\u7ef4\u62a4\u3002 \u800c\u5c0f\u7a0b\u5e8f\u7684\u8fd9\u79cd\u6258\u7ba1\u65b9\u5f0f\uff0c\u5176\u5b9e\u5df2\u7ecf\u548c\u6211\u4eec\u5f00\u53d1\u4e00\u4e2a\u539f\u751f App \u5dee\u4e0d\u591a\u4e86\u3002 \u867d\u7136\u524d\u7aef\u4e0a\u4f7f\u7528\u7684\u662f js \u8fd9\u4e9b\u770b\u8d77\u6765\u50cf\u662f web \u7684\u6280\u672f\uff0c\u4f46\u5b83\u6838\u5fc3\u601d\u8def\u8ddf\u4f20\u7edf\u7684 web app \u5df2\u7ecf\u4e0d\u592a\u4e00\u6837\u3002 \u66f4\u50cf\u4e00\u79cd\u7c7b\u4f3c  Native \u7684\u5b9e\u73b0\u3002<\/p>\n<h2><span style=\"font-weight:700\">\u7ed3\u5c3e<\/span><\/h2>\n<p style=\"font-family:\">\u8fd9\u6b21\u548c\u5927\u5bb6\u4e00\u8d77\uff0c\u4ece\u5934\u5230\u5c3e\u5b8c\u6574\u7684\u4f53\u9a8c\u4e86\u4e00\u4e2a\u6700\u7b80\u5355\u7684\u5c0f\u7a0b\u5e8f\u7684\u6574\u4f53\u7ed3\u6784\u4ee5\u53ca\u5f00\u53d1\u601d\u8def\u3002\u4e2a\u4eba\u89c9\u5f97\u5982\u679c\u80fd\u627e\u5230\u5408\u9002\u7684\u5207\u5165\u70b9\uff0c\u5c0f\u7a0b\u5e8f\u8fd9\u4e2a\u5e73\u53f0\u8fd8\u662f\u80fd\u627e\u5230\u4e00\u4e9b\u4e0d\u9519\u7684\u673a\u4f1a\u7684\u3002\u4f46\u6211\u7684\u89c2\u70b9\u662f\uff0c\u4e0d\u8981\u8ba4\u4e3a\u5c0f\u7a0b\u5e8f\u7684\u51fa\u73b0\u5c31\u4f1a\u9a6c\u4e0a\u98a0\u8986\u8c01\uff0c\u4e5f\u4e0d\u9700\u8981\u542c\u5230\u7f51\u4e0a\u6709\u4eba\u8bf4\u5c0f\u7a0b\u5e8f\u96be\u6210\u5927\u4e8b\u5c31\u89c9\u5f97\u5b83\u6ca1\u673a\u4f1a\u3002 \u627e\u5230\u81ea\u5df1\u64c5\u957f\u7684\uff0c\u4ee5\u53ca\u7528\u6237\u9700\u8981\u7684\uff0c\u6ca1\u51c6\u5c31\u4f1a\u521b\u9020\u51fa\u4e00\u4e9b\u4e0d\u9519\u7684\u4ea7\u54c1\u3002 \u8fd9\u6b21\u4e5f\u662f\u5e2e\u5927\u5bb6\u505a\u4e00\u4e2a\u57fa\u672c\u7684\u6280\u672f\u68b3\u7406\uff0c\u5e0c\u671b\u80fd\u591f\u5bf9\u5927\u5bb6\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5e26\u4f60\u4f53\u9a8c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u5b8c\u6574\u5f00\u53d1\u8fc7\u7a0b\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>\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u8fd8\u6ca1\u6b63\u5f0f\u53d1\u5e03\u5c31\u5df2\u7ecf\u8fc5\u901f\u6210\u4e3a\u5927\u5bb6\u8ba8\u8bba\u7684\u7126\u70b9\uff0c\u90a3\u4e48\u5927\u5bb6\u53ef\u80fd\u89c9\u5f97\u53ea\u6709\u6536\u5230\u5185\u6d4b\u9080\u8bf7\u624d\u80fd\u4f53\u9a8c\u5c0f\u7a0b\u5e8f\u7684\u5f00\u53d1\u6d41\u7a0b\uff0c\u5176\u5b9e\u4e0d\u7136\uff0c\u5927\u5bb6\u90fd\u53ef\u4ee5\u4f53\u9a8c\uff0c\u4e0b\u9762\u5c31\u5e26\u5927\u5bb6\u4e00\u8d77\u4e86\u89e3\u3002 \u4e0b\u8f7d\u5fae\u4fe1 Web \u5f00\u53d1\u8005\u5de5\u5177 \u9996\u5148\uff0c\u5fae\u4fe1\u7ed9\u6211\u4eec\u63d0\u4f9b\u4e86\u5b83\u81ea\u5df1\u7684\u5c0f\u7a0b\u5e8f\u96c6\u6210\u5f00\u53d1\u5de5\u5177\uff0c\u53ea\u9700\u8981\u5230\u8fd9\u4e2a\u9875\u9762\u4e0b\u8f7d\u5373\u53ef\uff1a \u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u6253\u5f00\u5f00\u53d1\u8005\u5de5\u5177\uff0c\u4f1a\u6709\u4e00\u4e2a\u626b\u7801\u767b\u5f55\u754c\u9762\u3002 \u7528\u4f60\u7684\u5fae\u4fe1\u626b\u7801\u5c31\u53ef\u4ee5\u767b\u5f55\u8fdb\u6765\u4e86\uff0c \u7136\u540e\u5f00\u53d1\u8005\u5de5\u5177\u4f1a\u5e2e\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u9ed8\u8ba4\u5de5\u7a0b\uff0c\u9879\u76ee\u7684\u6587\u4ef6\u7ed3\u6784\u5982\u4e0b\uff1a \u6240\u6709\u7684\u4ee3\u7801\u7f16\u8f91\u4ee5\u53ca\u8fd0\u884c\u9884\u89c8\u90fd\u53ef\u4ee5\u5728\u8fd9\u4e2a\u5f00\u53d1\u8005\u5de5\u5177\u4e2d\u8fdb\u884c\u3002\u63a5\u4e0b\u6765\u54b1\u4eec\u770b\u770b\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u9879\u76ee\u7ed3\u6784\u3002 \u9879\u76ee\u7ed3\u6784 \u5982\u4e0a\u56fe\uff0c\u9996\u5148\u5728\u6839\u76ee\u5f55\u4e2d\u6709\u4e09\u4e2a\u6587\u4ef6 app.js, app.json, app.wxss\u3002 \u5176\u4e2d app.js \u662f\u7a0b\u5e8f\u4e3b\u5165\u53e3\u7684\u811a\u672c\u6587\u4ef6\uff0c app.json \u662f\u5168\u5c40\u914d\u7f6e\u6587\u4ef6, app.wxss \u662f\u5c0f\u7a0b\u5e8f\u7684\u6837\u5f0f\u8868\u6587\u4ef6\u3002 \u5148\u6765\u770b\u770b app.json : {&nbsp;&#8220;pages&#8221;:[&nbsp;&#8220;pages\/index\/index&#8221;,&nbsp;&#8220;pages\/logs\/logs&#8221;&nbsp;],&nbsp;&#8220;window&#8221;:{&nbsp;&#8220;backgroundTextStyle&#8221;:&#8221;light&#8221;,&nbsp;&#8220;navigationBarBackgroundColor&#8221;:&nbsp;&#8220;#fff&#8221;,&nbsp;&#8220;navigationBarTitleText&#8221;:&nbsp;&#8220;WeChat&#8221;,&nbsp;&#8220;navigationBarTextStyle&#8221;:&#8221;black&#8221;&nbsp;} } \u767b\u5f55\u540e\u590d\u5236 \u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u4e2d\u5b9a\u4e49\u4e86\u4e24\u4e2a\u8282\u70b9\uff0c pages \u662f\u5c0f\u7a0b\u5e8f\u7684\u6240\u6709\u9875\u9762\u5bf9\u5e94\u7684\u8def\u5f84\uff0c window \u662f\u5c0f\u7a0b\u5e8f\u7a97\u53e3\u7684\u914d\u7f6e\u4fe1\u606f\u3002 \u518d\u6765\u770b\u770b\u6837\u5f0f\u6587\u4ef6 app.wxss : .container&nbsp;{ &nbsp;&nbsp;height:&nbsp;100%; &nbsp;&nbsp;display:&nbsp;flex; &nbsp;&nbsp;flex-direction:&nbsp;column; &nbsp;&nbsp;align-items:&nbsp;center; &nbsp;&nbsp;justify-content:&nbsp;space-between; &nbsp;&nbsp;padding:&nbsp;200rpx&nbsp;0; &nbsp;&nbsp;box-sizing:&nbsp;border-box; } \u767b\u5f55\u540e\u590d\u5236 \u54b1\u4eec\u5148\u4e0d\u7528\u6df1\u7a76\u5b83\u5177\u4f53\u5b9a\u4e49\u4e86\u4ec0\u4e48\u6837\u5f0f\uff0c\u53ea\u9700\u8981\u5148\u4e86\u89e3\u9879\u76ee\u7ed3\u6784\u5373\u53ef\u3002\u63a5\u4e0b\u6765\u518d\u6765\u770b\u770b\u7a0b\u5e8f\u7684\u4e3b\u5165\u53e3 app.js\uff1a \/\/app.js&nbsp;App({ &nbsp;&nbsp;onLaunch:&nbsp;function&nbsp;()&nbsp;{&nbsp;\/\/\u8c03\u7528API\u4ece\u672c\u5730\u7f13\u5b58\u4e2d\u83b7\u53d6\u6570\u636e&nbsp;var&nbsp;logs&nbsp;=&nbsp;wx.getStorageSync(&#8216;logs&#8217;)&nbsp;||&nbsp;[] &nbsp;&nbsp;&nbsp;&nbsp;logs.unshift(Date.now()) &nbsp;&nbsp;&nbsp;&nbsp;wx.setStorageSync(&#8216;logs&#8217;,&nbsp;logs) &nbsp;&nbsp;}, &nbsp;&nbsp;getUserInfo:function(cb){&nbsp;var&nbsp;that&nbsp;=&nbsp;this&nbsp;if(this.globalData.userInfo){&nbsp;typeof&nbsp;cb&nbsp;==&nbsp;&#8220;function&#8221;&nbsp;&amp;amp;&amp;amp;&nbsp;cb(this.globalData.userInfo) &nbsp;&nbsp;&nbsp;&nbsp;}else{&nbsp;\/\/\u8c03\u7528\u767b\u5f55\u63a5\u53e3&nbsp;wx.login({ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;success:&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-29684","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29684","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=29684"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29684\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=29684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=29684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=29684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}