{"id":1333,"date":"2023-02-03T17:46:47","date_gmt":"2023-02-03T09:46:47","guid":{"rendered":"https:\/\/usei.cn\/?p=1333"},"modified":"2023-02-07T18:24:55","modified_gmt":"2023-02-07T10:24:55","slug":"uni-app-%e9%9b%86%e6%88%90tim","status":"publish","type":"post","link":"https:\/\/usei.cn\/index.php\/2023\/02\/03\/uni-app-%e9%9b%86%e6%88%90tim\/","title":{"rendered":"uni-app vue2 \u96c6\u6210TIM"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">1.\u5b89\u88c5\u4f9d\u8d56\u5305<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\"cos-wx-sdk-v5\": \"^1.0.10\",\n\"tim-wx-sdk\": \"^2.16.1\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2.\u754c\u9762\u8d44\u6e90\u96c6\u6210<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">2.1\u754c\u9762\u548c\u7ec4\u4ef6<\/h4>\n\n\n\n<p>\u590d\u5236 tim \u5230src \u4e0b\uff0c\u548cpages \u540c\u76ee\u5f55\u4e0b\uff0c\u4f5c\u4e3a\u5b50\u5305\u5f15\u5165<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.2 \u6ce8\u5165\u670d\u52a1<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n     * \u521d\u59cb\u5316TIM\n     *\/\n    initTIM(){\n      uni.$TUIKit = TIM.create({\n        SDKAppID: '1\u4f60\u7684tim appid'\n      })\n      uni.$TUIKitEvent =TIM.EVENT\n    },<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2.2 \u589e\u52a0\u8def\u7531\u4fe1\u606f<\/h4>\n\n\n\n<p>pages.json<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> \"subPackages\": &#91;\n    {\n      \"root\": \"TIM\",\n      \"pages\": &#91;\n        {\n          \"path\": \"pages\/Conversation\/conversation\",\n          \"style\": {\n            \"navigationBarTitleText\": \"\u4f1a\u8bdd\u5217\u8868\",\n            \"navigationStyle\": \"custom\"\n          }\n        },\n        {\n          \"path\": \"pages\/Chat\/chat\",\n          \"style\": {\n            \"navigationBarTitleText\": \"\u4f1a\u8bdd\",\n            \"navigationStyle\": \"custom\"\n          }\n        },\n        {\n          \"path\": \"pages\/TUI-Conversation\/create-conversation\/create\",\n          \"style\": {\n            \"navigationBarTitleText\": \"\u53d1\u8d77\u4f1a\u8bdd\",\n            \"navigationStyle\": \"custom\"\n          }\n        }\n      ]\n    }\n  ],<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2.4 main,js<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u817e\u8bafTIM \u5373\u65f6\u901a\u8baf\n\/\/ \u5168\u5c40mixins\uff0c\u7528\u4e8e\u5b9e\u73b0setData\u7b49\u529f\u80fd';\nimport Mixin from '.\/TIM\/polyfill\/mixins';\nVue.mixin(Mixin);<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">app \u542f\u52a8\u6ce8\u5165\u670d\u52a1<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">\u767b\u5f55IM<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code> \/\/ \u83b7\u53d6\u7528\u6237\u4fe1\u606f\n    GetInfo({ commit, state,dispatch }) {\n      return new Promise((resolve, reject) =&gt; {\n        getInfo().then(res =&gt; {\n          const user = res.user\n       \n          commit('SET_NAME', username)\n          ......\n          \/\/ TIM \u767b\u5f55\n          \/\/ #ifdef MP-WEIXIN || APP-PLUS\n          dispatch(\"TIMLogin\",res.user)\n          \/\/ #endif\n     \n          resolve(res)\n        })\n        .catch(error =&gt; {\n          reject(error)\n        })\n      })\n    },<\/code><\/pre>\n\n\n\n<p>\u5728 vuex \u767b\u5f55\u540e\u6ce8\u518c\u4fe1\u606f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u53ca\u65f6\u901a\u8baf\u767b\u5f55\n    TIMLogin({},user){\n      \/\/ \u66f4\u65b0\u65f6\u8c03\u7528\n      if(uni.$TUIKit.SDK_READY){\n        uni.$TUIKit.updateMyProfile({\n          nick: user.nickName,\n          avatar: user.avatar||'',\n        }).then(res=&gt; {\n          console.log('TIM \u66f4\u65b0\u8d44\u6599\u6210\u529f',res.data);\n        }).catch(err=&gt; {\n          console.warn('TIM \u66f4\u65b0\u8d44\u6599\u5931\u8d251:', err);\n        });\n        return\n      }\n\n      console.info('TIM-Login \u5f00\u59cb',user)\n      let sig = genTestUserSig(user.memberId)\n      uni.$TUIKit.login({userID: user.memberId, userSig: sig.userSig})\n      .then(imResponse=&gt; {\n        console.log('TIM\u767b\u5f55\u6210\u529f',imResponse.data);\n      })\n      .catch(imError=&gt;{\n        console.warn('TIM\u767b\u5f55\u5931\u8d25:', imError);\n      });\n      \n      \/\/ \u767b\u5f55\u6210\u529f\u540e\u66f4\u65b0\u4e2a\u4eba\u8d44\u6599\n      uni.$TUIKit.on(uni.$TUIKitEvent.SDK_READY , e=&gt;{\n        uni.$TUIKit.SDK_READY = true \/\/ \u8bb0\u5f55\u72b6\u6001\n        uni.$TUIKit.updateMyProfile({\n          nick: user.nickName,\n          avatar: user.avatar||'',\n        }).then(res=&gt; {\n          console.log('TIM \u66f4\u65b0\u8d44\u6599\u6210\u529f',res.data);\n        }).catch(err=&gt; {\n          console.warn('TIM \u66f4\u65b0\u8d44\u6599\u5931\u8d252:', err);\n        });\n      });\n    },<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e8b\u4ef6<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>import TIM from 'tim-js-sdk';\r\n\/\/ import TIM from 'tim-wx-sdk'; \/\/ \u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u73af\u5883\u8bf7\u53d6\u6d88\u672c\u884c\u6ce8\u91ca\uff0c\u5e76\u6ce8\u91ca\u6389 import TIM from 'tim-js-sdk';\r\nimport TIMUploadPlugin from 'tim-upload-plugin'; \/\/ \u4f7f\u7528\u524d\u8bf7\u5c06 IM SDK \u5347\u7ea7\u5230v2.9.2\u6216\u66f4\u9ad8\u7248\u672c\r\nimport TIMProfanityFilterPlugin from 'tim-profanity-filter-plugin'; \/\/ \u4f7f\u7528\u524d\u8bf7\u5c06 IM SDK \u5347\u7ea7\u5230v2.24.0\u6216\u66f4\u9ad8\u7248\u672c\r\n \r\n\/\/ \u521b\u5efa SDK \u5b9e\u4f8b\uff0cTIM.create() \u65b9\u6cd5\u5bf9\u4e8e\u540c\u4e00\u4e2a SDKAppID \u53ea\u4f1a\u8fd4\u56de\u540c\u4e00\u4efd\u5b9e\u4f8b\r\nlet options = {\r\n  SDKAppID: 0 \/\/ \u63a5\u5165\u65f6\u9700\u8981\u5c060\u66ff\u6362\u4e3a\u60a8\u7684\u5373\u65f6\u901a\u4fe1\u5e94\u7528\u7684 SDKAppID\r\n};\r\nlet tim = TIM.create(options); \/\/ SDK \u5b9e\u4f8b\u901a\u5e38\u7528 tim \u8868\u793a\r\n\/\/ \u8bbe\u7f6e SDK \u65e5\u5fd7\u8f93\u51fa\u7ea7\u522b\uff0c\u8be6\u7ec6\u5206\u7ea7\u8bf7\u53c2\u89c1 setLogLevel \u63a5\u53e3\u7684\u8bf4\u660e\r\ntim.setLogLevel(0); \/\/ \u666e\u901a\u7ea7\u522b\uff0c\u65e5\u5fd7\u91cf\u8f83\u591a\uff0c\u63a5\u5165\u65f6\u5efa\u8bae\u4f7f\u7528\r\n\/\/ tim.setLogLevel(1); \/\/ release\u7ea7\u522b\uff0cSDK \u8f93\u51fa\u5173\u952e\u4fe1\u606f\uff0c\u751f\u4ea7\u73af\u5883\u65f6\u5efa\u8bae\u4f7f\u7528\r\n \r\n\/\/ \u6ce8\u518c\u817e\u8baf\u4e91\u5373\u65f6\u901a\u4fe1 IM \u4e0a\u4f20\u63d2\u4ef6\uff0c\u5373\u65f6\u901a\u4fe1 IM SDK \u53d1\u9001\u56fe\u7247\u3001\u8bed\u97f3\u3001\u89c6\u9891\u3001\u6587\u4ef6\u7b49\u6d88\u606f\u9700\u8981\u4f7f\u7528\u4e0a\u4f20\u63d2\u4ef6\uff0c\u5c06\u6587\u4ef6\u4e0a\u4f20\u5230\u817e\u8baf\u4e91\u5bf9\u8c61\u5b58\u50a8\r\ntim.registerPlugin({'tim-upload-plugin': TIMUploadPlugin});\r\n \r\n\/\/ \u6ce8\u518c\u817e\u8baf\u4e91\u5373\u65f6\u901a\u4fe1 IM \u672c\u5730\u5ba1\u6838\u63d2\u4ef6\r\ntim.registerPlugin({'tim-profanity-filter-plugin': TIMProfanityFilterPlugin});\r\n \r\n\/\/ \u76d1\u542c\u4e8b\u4ef6\uff0c\u5982\uff1a\r\ntim.on(TIM.EVENT.SDK_READY, function(event) {\r\n  \/\/ \u6536\u5230\u79bb\u7ebf\u6d88\u606f\u548c\u4f1a\u8bdd\u5217\u8868\u540c\u6b65\u5b8c\u6bd5\u901a\u77e5\uff0c\u63a5\u5165\u4fa7\u53ef\u4ee5\u8c03\u7528 sendMessage \u7b49\u9700\u8981\u9274\u6743\u7684\u63a5\u53e3\r\n  \/\/ event.name - TIM.EVENT.SDK_READY\r\n});\r\n \r\ntim.on(TIM.EVENT.MESSAGE_RECEIVED, function(event) {\r\n  \/\/ \u6536\u5230\u63a8\u9001\u7684\u5355\u804a\u3001\u7fa4\u804a\u3001\u7fa4\u63d0\u793a\u3001\u7fa4\u7cfb\u7edf\u901a\u77e5\u7684\u65b0\u6d88\u606f\uff0c\u53ef\u901a\u8fc7\u904d\u5386 event.data \u83b7\u53d6\u6d88\u606f\u5217\u8868\u6570\u636e\u5e76\u6e32\u67d3\u5230\u9875\u9762\r\n  \/\/ event.name - TIM.EVENT.MESSAGE_RECEIVED\r\n  \/\/ event.data - \u5b58\u50a8 Message \u5bf9\u8c61\u7684\u6570\u7ec4 - &#91;Message]\r\n});\r\n \r\ntim.on(TIM.EVENT.MESSAGE_MODIFIED, function(event) {\r\n  \/\/ \u6536\u5230\u6d88\u606f\u88ab\u7b2c\u4e09\u65b9\u56de\u8c03\u4fee\u6539\u7684\u901a\u77e5\uff0c\u6d88\u606f\u53d1\u9001\u65b9\u53ef\u901a\u8fc7\u904d\u5386 event.data \u83b7\u53d6\u6d88\u606f\u5217\u8868\u6570\u636e\u5e76\u66f4\u65b0\u9875\u9762\u4e0a\u540c ID \u6d88\u606f\u7684\u5185\u5bb9\uff08v2.12.1\u8d77\u652f\u6301\uff09\r\n  \/\/ event.name - TIM.EVENT.MESSAGE_MODIFIED\r\n  \/\/ event.data - \u5b58\u50a8\u88ab\u7b2c\u4e09\u65b9\u56de\u8c03\u4fee\u6539\u8fc7\u7684 Message \u5bf9\u8c61\u7684\u6570\u7ec4 - &#91;Message]\r\n});\r\n \r\ntim.on(TIM.EVENT.MESSAGE_REVOKED, function(event) {\r\n  \/\/ \u6536\u5230\u6d88\u606f\u88ab\u64a4\u56de\u7684\u901a\u77e5\u3002\u4f7f\u7528\u524d\u9700\u8981\u5c06SDK\u7248\u672c\u5347\u7ea7\u81f3v2.4.0\u6216\u66f4\u9ad8\u7248\u672c\r\n  \/\/ event.name - TIM.EVENT.MESSAGE_REVOKED\r\n  \/\/ event.data - \u5b58\u50a8 Message \u5bf9\u8c61\u7684\u6570\u7ec4 - &#91;Message] - \u6bcf\u4e2a Message \u5bf9\u8c61\u7684 isRevoked \u5c5e\u6027\u503c\u4e3a true\r\n});\r\n \r\ntim.on(TIM.EVENT.MESSAGE_READ_BY_PEER, function(event) {\r\n  \/\/ SDK \u6536\u5230\u5bf9\u7aef\u5df2\u8bfb\u6d88\u606f\u7684\u901a\u77e5\uff0c\u5373\u5df2\u8bfb\u56de\u6267\u3002\u4f7f\u7528\u524d\u9700\u8981\u5c06SDK\u7248\u672c\u5347\u7ea7\u81f3v2.7.0\u6216\u66f4\u9ad8\u7248\u672c\u3002\u4ec5\u652f\u6301\u5355\u804a\u4f1a\u8bdd\r\n  \/\/ event.name - TIM.EVENT.MESSAGE_READ_BY_PEER\r\n  \/\/ event.data - event.data - \u5b58\u50a8 Message \u5bf9\u8c61\u7684\u6570\u7ec4 - &#91;Message] - \u6bcf\u4e2a Message \u5bf9\u8c61\u7684 isPeerRead \u5c5e\u6027\u503c\u4e3a true\r\n});\r\n \r\ntim.on(TIM.EVENT.CONVERSATION_LIST_UPDATED, function(event) {\r\n  \/\/ \u6536\u5230\u4f1a\u8bdd\u5217\u8868\u66f4\u65b0\u901a\u77e5\uff0c\u53ef\u901a\u8fc7\u904d\u5386 event.data \u83b7\u53d6\u4f1a\u8bdd\u5217\u8868\u6570\u636e\u5e76\u6e32\u67d3\u5230\u9875\u9762\r\n  \/\/ event.name - TIM.EVENT.CONVERSATION_LIST_UPDATED\r\n  \/\/ event.data - \u5b58\u50a8 Conversation \u5bf9\u8c61\u7684\u6570\u7ec4 - &#91;Conversation]\r\n});\r\n \r\ntim.on(TIM.EVENT.GROUP_LIST_UPDATED, function(event) {\r\n  \/\/ \u6536\u5230\u7fa4\u7ec4\u5217\u8868\u66f4\u65b0\u901a\u77e5\uff0c\u53ef\u901a\u8fc7\u904d\u5386 event.data \u83b7\u53d6\u7fa4\u7ec4\u5217\u8868\u6570\u636e\u5e76\u6e32\u67d3\u5230\u9875\u9762\r\n  \/\/ event.name - TIM.EVENT.GROUP_LIST_UPDATED\r\n  \/\/ event.data - \u5b58\u50a8 Group \u5bf9\u8c61\u7684\u6570\u7ec4 - &#91;Group]\r\n});\r\n \r\ntim.on(TIM.EVENT.PROFILE_UPDATED, function(event) {\r\n  \/\/ \u6536\u5230\u81ea\u5df1\u6216\u597d\u53cb\u7684\u8d44\u6599\u53d8\u66f4\u901a\u77e5\r\n  \/\/ event.name - TIM.EVENT.PROFILE_UPDATED\r\n  \/\/ event.data - \u5b58\u50a8 Profile \u5bf9\u8c61\u7684\u6570\u7ec4 - &#91;Profile]\r\n});\r\n \r\ntim.on(TIM.EVENT.BLACKLIST_UPDATED, function(event) {\r\n  \/\/ \u6536\u5230\u9ed1\u540d\u5355\u5217\u8868\u66f4\u65b0\u901a\u77e5\r\n  \/\/ event.name - TIM.EVENT.BLACKLIST_UPDATED\r\n  \/\/ event.data - \u5b58\u50a8 userID \u7684\u6570\u7ec4 - &#91;userID]\r\n});\r\n \r\ntim.on(TIM.EVENT.ERROR, function(event) {\r\n  \/\/ \u6536\u5230 SDK \u53d1\u751f\u9519\u8bef\u901a\u77e5\uff0c\u53ef\u4ee5\u83b7\u53d6\u9519\u8bef\u7801\u548c\u9519\u8bef\u4fe1\u606f\r\n  \/\/ event.name - TIM.EVENT.ERROR\r\n  \/\/ event.data.code - \u9519\u8bef\u7801\r\n  \/\/ event.data.message - \u9519\u8bef\u4fe1\u606f\r\n});\r\n \r\ntim.on(TIM.EVENT.SDK_NOT_READY, function(event) {\r\n  \/\/ \u6536\u5230 SDK \u8fdb\u5165 not ready \u72b6\u6001\u901a\u77e5\uff0c\u6b64\u65f6 SDK \u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\r\n  \/\/ event.name - TIM.EVENT.SDK_NOT_READY\r\n});\r\n \r\ntim.on(TIM.EVENT.KICKED_OUT, function(event) {\r\n  \/\/ \u6536\u5230\u88ab\u8e22\u4e0b\u7ebf\u901a\u77e5\r\n  \/\/ event.name - TIM.EVENT.KICKED_OUT\r\n  \/\/ event.data.type - \u88ab\u8e22\u4e0b\u7ebf\u7684\u539f\u56e0\uff0c\u4f8b\u5982 :\r\n  \/\/   - TIM.TYPES.KICKED_OUT_MULT_ACCOUNT \u591a\u5b9e\u4f8b\u767b\u5f55\u88ab\u8e22\r\n  \/\/   - TIM.TYPES.KICKED_OUT_MULT_DEVICE \u591a\u7ec8\u7aef\u767b\u5f55\u88ab\u8e22\r\n  \/\/   - TIM.TYPES.KICKED_OUT_USERSIG_EXPIRED \u7b7e\u540d\u8fc7\u671f\u88ab\u8e22\uff08v2.4.0\u8d77\u652f\u6301\uff09\u3002\r\n});\r\n \r\ntim.on(TIM.EVENT.NET_STATE_CHANGE, function(event) {\r\n  \/\/ \u7f51\u7edc\u72b6\u6001\u53d1\u751f\u6539\u53d8\uff08v2.5.0 \u8d77\u652f\u6301\uff09\r\n  \/\/ event.name - TIM.EVENT.NET_STATE_CHANGE\r\n  \/\/ event.data.state \u5f53\u524d\u7f51\u7edc\u72b6\u6001\uff0c\u679a\u4e3e\u503c\u53ca\u8bf4\u660e\u5982\u4e0b\uff1a\r\n  \/\/   - TIM.TYPES.NET_STATE_CONNECTED - \u5df2\u63a5\u5165\u7f51\u7edc\r\n  \/\/   - TIM.TYPES.NET_STATE_CONNECTING - \u8fde\u63a5\u4e2d\u3002\u5f88\u53ef\u80fd\u9047\u5230\u7f51\u7edc\u6296\u52a8\uff0cSDK \u5728\u91cd\u8bd5\u3002\u63a5\u5165\u4fa7\u53ef\u6839\u636e\u6b64\u72b6\u6001\u63d0\u793a\u201c\u5f53\u524d\u7f51\u7edc\u4e0d\u7a33\u5b9a\u201d\u6216\u201c\u8fde\u63a5\u4e2d\u201d\r\n  \/\/   - TIM.TYPES.NET_STATE_DISCONNECTED - \u672a\u63a5\u5165\u7f51\u7edc\u3002\u63a5\u5165\u4fa7\u53ef\u6839\u636e\u6b64\u72b6\u6001\u63d0\u793a\u201c\u5f53\u524d\u7f51\u7edc\u4e0d\u53ef\u7528\u201d\u3002SDK \u4ecd\u4f1a\u7ee7\u7eed\u91cd\u8bd5\uff0c\u82e5\u7528\u6237\u7f51\u7edc\u6062\u590d\uff0cSDK \u4f1a\u81ea\u52a8\u540c\u6b65\u6d88\u606f\r\n});\r\n \r\ntim.on(TIM.EVENT.FRIEND_LIST_UPDATED, function(event) {\r\n  \/\/ \u6536\u5230\u597d\u53cb\u5217\u8868\u66f4\u65b0\u901a\u77e5\uff08v2.13.0\u8d77\u652f\u6301\uff09\r\n  \/\/ event.name - TIM.EVENT.FRIEND_LIST_UPDATED\r\n  \/\/ event.data - \u5b58\u50a8 Friend \u5bf9\u8c61\u7684\u6570\u7ec4 - &#91;Friend]\r\n});\r\n \r\ntim.on(TIM.EVENT.FRIEND_APPLICATION_LIST_UPDATED, function(event) {\r\n  \/\/ \u6536\u5230\u597d\u53cb\u7533\u8bf7\u5217\u8868\u66f4\u65b0\u901a\u77e5\uff08v2.13.0\u8d77\u652f\u6301\uff09\r\n  \/\/ event.name - TIM.EVENT.FRIEND_APPLICATION_LIST_UPDATED\r\n  \/\/ friendApplicationList - \u597d\u53cb\u7533\u8bf7\u5217\u8868 - &#91;FriendApplication]\r\n  \/\/ unreadCount - \u597d\u53cb\u7533\u8bf7\u7684\u672a\u8bfb\u6570\r\n  \/\/ const { friendApplicationList, unreadCount } = event.data;\r\n  \/\/ \u53d1\u9001\u7ed9\u6211\u7684\u597d\u53cb\u7533\u8bf7\uff08\u5373\u522b\u4eba\u7533\u8bf7\u52a0\u6211\u4e3a\u597d\u53cb\uff09\r\n  \/\/ const applicationSentToMe = friendApplicationList.filter((friendApplication) => friendApplication.type === TIM.TYPES.SNS_APPLICATION_SENT_TO_ME);\r\n  \/\/ \u6211\u53d1\u9001\u51fa\u53bb\u7684\u597d\u53cb\u7533\u8bf7\uff08\u5373\u6211\u7533\u8bf7\u52a0\u522b\u4eba\u4e3a\u597d\u53cb\uff09\r\n  \/\/ const applicationSentByMe = friendApplicationList.filter((friendApplication) => friendApplication.type === TIM.TYPES.SNS_APPLICATION_SENT_BY_ME);\r\n});\r\n \r\ntim.on(TIM.EVENT.FRIEND_GROUP_LIST_UPDATED, function(event) {\r\n  \/\/ \u6536\u5230\u597d\u53cb\u5206\u7ec4\u5217\u8868\u66f4\u65b0\u901a\u77e5\uff08v2.13.0\u8d77\u652f\u6301\uff09\r\n  \/\/ event.name - TIM.EVENT.FRIEND_GROUP_LIST_UPDATED\r\n  \/\/ event.data - \u5b58\u50a8 FriendGroup \u5bf9\u8c61\u7684\u6570\u7ec4 - &#91;FriendGroup]\r\n});\r\n \r\n\/\/ \u5f00\u59cb\u767b\u5f55\r\ntim.login({userID: 'your userID', userSig: 'your userSig'});<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1.\u5b89\u88c5\u4f9d\u8d56\u5305 2.\u754c\u9762\u8d44\u6e90\u96c6\u6210 2.1\u754c\u9762\u548c\u7ec4\u4ef6 \u590d\u5236 tim \u5230src \u4e0b\uff0c\u548cpages \u540c\u76ee\u5f55\u4e0b\uff0c\u4f5c\u4e3a\u5b50 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1333","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts\/1333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1333"}],"version-history":[{"count":16,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts\/1333\/revisions"}],"predecessor-version":[{"id":1359,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/posts\/1333\/revisions\/1359"}],"wp:attachment":[{"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/usei.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}