{"id":123287,"date":"2026-11-06T23:56:49","date_gmt":"2026-11-06T15:56:49","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/123287.html"},"modified":"2026-11-06T23:56:49","modified_gmt":"2026-11-06T15:56:49","slug":"%e5%b9%b3%e5%8f%b0%e5%ae%8f%e3%80%81%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a8%e4%b8%8e%e7%bc%ba%e5%a4%b1%e8%83%bd%e5%8a%9b%ef%bc%9a%e5%bb%ba%e7%ab%8b%e5%8f%af%e7%bb%b4%e6%8a%a4%e7%9a%84-native-%e6%8a%bd","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/123287.html","title":{"rendered":"\u5e73\u53f0\u5b8f\u3001\u7cfb\u7edf\u8c03\u7528\u4e0e\u7f3a\u5931\u80fd\u529b\uff1a\u5efa\u7acb\u53ef\u7ef4\u62a4\u7684 Native \u62bd\u8c61\u5c42"},"content":{"rendered":"<p>\u4e13\u680f&#xff1a;HarmonyOS \u4e09\u65b9\u5e93\u9002\u914d\u5b9e\u6218&#xff08;20\/30&#xff09; \u6838\u5fc3\u95ee\u9898&#xff1a;\u7ebf\u7a0b\u3001\u65f6\u95f4\u3001\u6587\u4ef6\u548c\u7f51\u7edc\u8c03\u7528\u4e0d\u517c\u5bb9\u65f6&#xff0c;\u600e\u6837\u907f\u514d\u5728\u4e0a\u6e38\u6e90\u7801\u91cc\u6563\u843d\u5e73\u53f0\u5224\u65ad&#xff1f;<\/p>\n<h3>\u6458\u8981<\/h3>\n<p>Native \u9002\u914d\u6700\u96be\u7ef4\u62a4\u7684\u5199\u6cd5&#xff0c;\u662f\u5728\u51e0\u5341\u4e2a\u6e90\u6587\u4ef6\u4e2d\u8ffd\u52a0\u5e73\u53f0\u5b8f\u3002\u66f4\u597d\u7684\u65b9\u6cd5\u662f\u5148\u8bc6\u522b\u80fd\u529b\u7aef\u53e3&#xff0c;\u518d\u628a HarmonyOS \u5b9e\u73b0\u96c6\u4e2d\u5728\u9002\u914d\u5c42&#xff0c;\u6838\u5fc3\u53ea\u4f9d\u8d56\u5c0f\u63a5\u53e3\u3002\u672c\u6587\u7528\u6559\u5b66 text_core \u5c55\u793a\u201c\u7eaf\u6838\u5fc3 &#043; Node-API \u8fb9\u754c\u201d\u7684\u6700\u5c0f\u5f62\u6001&#xff0c;\u5e76\u7ed9\u51fa\u6587\u4ef6\u3001\u65f6\u95f4\u3001\u65e5\u5fd7\u548c\u7ebf\u7a0b\u7684\u62bd\u8c61\u6a21\u677f\u3002\u5f53\u524d\u7eaf\u6838\u5fc3\u4e0e\u6865\u63a5\u5df2\u7ecf\u53cc ABI \u7f16\u8bd1&#xff1b;\u771f\u5b9e\u7cfb\u7edf\u8c03\u7528\u548c\u8bbe\u5907\u884c\u4e3a\u672a\u6267\u884c\u3002<\/p>\n<h3>\u5b8f\u5e94\u8be5\u51fa\u73b0\u5728\u54ea\u91cc<\/h3>\n<p>\u5141\u8bb8\u51fa\u73b0\u7684\u5e73\u53f0\u5dee\u5f02\u4f4d\u7f6e&#xff1a;<\/p>\n<ul>\n<li>\u5916\u5c42 CMake \u9009\u62e9\u6e90\u7801\u548c\u7f16\u8bd1\u9009\u9879&#xff1b;<\/li>\n<li>\u5355\u72ec\u7684 platform\/harmony\/ \u5b9e\u73b0\u6587\u4ef6&#xff1b;<\/li>\n<li>\u6781\u5c11\u6570\u65e0\u6cd5\u62bd\u8c61\u7684\u7c7b\u578b\u6216\u7f16\u8bd1\u5668\u517c\u5bb9\u70b9\u3002<\/li>\n<\/ul>\n<p>\u4e0d\u5e94\u51fa\u73b0&#xff1a;<\/p>\n<ul>\n<li>\u7b97\u6cd5\u5faa\u73af\u7684\u6bcf\u4e2a\u5206\u652f&#xff1b;<\/li>\n<li>\u516c\u5171\u5934\u6587\u4ef6\u5230\u5904\u66b4\u9732\u5e73\u53f0\u7c7b\u578b&#xff1b;<\/li>\n<li>\u4e0a\u6e38\u6d4b\u8bd5\u4e2d\u6539\u53d8\u9884\u671f\u6765\u8fce\u5408\u5e73\u53f0&#xff1b;<\/li>\n<li>\u7528\u5b8f\u76f4\u63a5\u541e\u6389\u9519\u8bef\u3002<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261106155647-6aedf8bfaf7ca.png\" alt=\"Native \u5e73\u53f0\u62bd\u8c61\u5c42\" \/><\/p>\n<p>\u56fe 1&#xff1a;\u6838\u5fc3\u4f9d\u8d56\u80fd\u529b\u63a5\u53e3&#xff0c;HarmonyOS \u5b9e\u73b0\u96c6\u4e2d\u5728\u5916\u5c42\u3002<\/p>\n<h3>\u4e00\u4e2a\u80fd\u529b\u7aef\u53e3\u6a21\u677f<\/h3>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">ClockPort<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token keyword\">virtual<\/span> <span class=\"token operator\">~<\/span><span class=\"token function\">ClockPort<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">default<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">virtual<\/span> std<span class=\"token double-colon punctuation\">::<\/span><span class=\"token keyword\">int64_t<\/span> <span class=\"token function\">NowMillis<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">const<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">FilePort<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token keyword\">virtual<\/span> <span class=\"token operator\">~<\/span><span class=\"token function\">FilePort<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">default<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">virtual<\/span> Result<span class=\"token operator\">&lt;<\/span>std<span class=\"token double-colon punctuation\">::<\/span>vector<span class=\"token operator\">&lt;<\/span>std<span class=\"token double-colon punctuation\">::<\/span><span class=\"token keyword\">uint8_t<\/span><span class=\"token operator\">&gt;&gt;<\/span> <span class=\"token function\">ReadAll<\/span><span class=\"token punctuation\">(<\/span><br \/>\n        <span class=\"token keyword\">const<\/span> std<span class=\"token double-colon punctuation\">::<\/span>string<span class=\"token operator\">&amp;<\/span> logicalId<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u6838\u5fc3\u53ea\u770b\u5230 ClockPort \u548c FilePort&#xff0c;\u4e0d\u770b\u5230 ArkTS \u5bf9\u8c61\u3001URI\u3001\u6743\u9650\u6216\u5e73\u53f0\u6587\u4ef6\u63cf\u8ff0\u7b26\u3002\u5b9e\u9645\u63a5\u53e3\u5e94\u6309\u5e93\u9700\u6c42\u6536\u7a84&#xff0c;\u4e0d\u80fd\u4e3a\u4e86\u201c\u901a\u7528\u201d\u4e00\u6b21\u62bd\u8c61\u6574\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u3002<\/p>\n<h3>\u6559\u5b66\u6838\u5fc3\u4e3a\u4ec0\u4e48\u6ca1\u6709\u5e73\u53f0\u5b8f<\/h3>\n<p>std<span class=\"token double-colon punctuation\">::<\/span>string <span class=\"token function\">NormalizeAscii<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">const<\/span> std<span class=\"token double-colon punctuation\">::<\/span>string<span class=\"token operator\">&amp;<\/span> input<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">bool<\/span> lowercase<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    std<span class=\"token double-colon punctuation\">::<\/span>string output<span class=\"token punctuation\">;<\/span><br \/>\n    output<span class=\"token punctuation\">.<\/span><span class=\"token function\">reserve<\/span><span class=\"token punctuation\">(<\/span>input<span class=\"token punctuation\">.<\/span><span class=\"token function\">size<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">bool<\/span> pendingSpace <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">unsigned<\/span> <span class=\"token keyword\">char<\/span> ch <span class=\"token operator\">:<\/span> input<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>std<span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">isspace<\/span><span class=\"token punctuation\">(<\/span>ch<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">!&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span>output<span class=\"token punctuation\">.<\/span><span class=\"token function\">empty<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span> pendingSpace <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">continue<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>pendingSpace<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n            output<span class=\"token punctuation\">.<\/span><span class=\"token function\">push_back<\/span><span class=\"token punctuation\">(<\/span><span class=\"token char\">&#039; &#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            pendingSpace <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        output<span class=\"token punctuation\">.<\/span><span class=\"token function\">push_back<\/span><span class=\"token punctuation\">(<\/span>lowercase<br \/>\n            <span class=\"token operator\">?<\/span> <span class=\"token generic-function\"><span class=\"token function\">static_cast<\/span><span class=\"token generic class-name\"><span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">char<\/span><span class=\"token operator\">&gt;<\/span><\/span><\/span><span class=\"token punctuation\">(<\/span>std<span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">tolower<\/span><span class=\"token punctuation\">(<\/span>ch<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n            <span class=\"token operator\">:<\/span> <span class=\"token generic-function\"><span class=\"token function\">static_cast<\/span><span class=\"token generic class-name\"><span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">char<\/span><span class=\"token operator\">&gt;<\/span><\/span><\/span><span class=\"token punctuation\">(<\/span>ch<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> output<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5b83\u6ca1\u6709\u6587\u4ef6\u3001\u65e5\u5fd7\u3001\u7ebf\u7a0b\u6216 Node-API \u4f9d\u8d56&#xff0c;\u56e0\u6b64\u540c\u4e00\u6838\u5fc3\u53ef\u5728\u4e0d\u540c\u6865\u63a5\u5c42\u590d\u7528\u3002\u6ce8\u610f&#xff1a;std::tolower \u7684\u533a\u57df\u548c\u975e ASCII \u8bed\u4e49\u6709\u9650&#xff0c;\u516c\u5f00\u63a5\u53e3\u660e\u786e\u547d\u540d\u4e3a NormalizeAscii&#xff0c;\u4e0d\u80fd\u5ba3\u4f20\u4e3a\u5b8c\u6574 Unicode \u5f52\u4e00\u5316\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261106155648-6aedf8c06c425.png\" alt=\"\u5e73\u53f0\u8865\u4e01\u8fb9\u754c\" \/><\/p>\n<p>\u56fe 2&#xff1a;\u4e0a\u6e38\u6838\u5fc3\u4fdd\u6301\u53ef\u6bd4\u8f83&#xff0c;\u5e73\u53f0\u8865\u4e01\u96c6\u4e2d\u3001\u53ef\u5ba1\u8ba1\u3001\u53ef\u5728\u5347\u7ea7\u65f6\u91cd\u653e\u3002<\/p>\n<h3>\u7f3a\u5931\u80fd\u529b\u6709\u56db\u79cd\u8bda\u5b9e\u5904\u7406<\/h3>\n<table>\n<tr>\u60c5\u51b5\u5904\u7406<\/tr>\n<tbody>\n<tr>\n<td>\u4e0e\u6838\u5fc3\u65e0\u5173<\/td>\n<td>\u4ece\u4ea4\u4ed8\u76ee\u6807\u6392\u9664<\/td>\n<\/tr>\n<tr>\n<td>\u6709\u5e73\u53f0\u7b49\u4ef7\u80fd\u529b<\/td>\n<td>\u5728\u9002\u914d\u5c42\u5b9e\u73b0\u5e76\u9a8c\u8bc1\u8bed\u4e49<\/td>\n<\/tr>\n<tr>\n<td>\u53ef\u7531\u8c03\u7528\u65b9\u63d0\u4f9b<\/td>\n<td>\u6ce8\u5165\u56de\u8c03\u6216\u7aef\u53e3<\/td>\n<\/tr>\n<tr>\n<td>\u65e0\u5b89\u5168\u53ef\u884c\u66ff\u4ee3<\/td>\n<td>\u660e\u786e\u8fd4\u56de\u4e0d\u652f\u6301<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u201c\u8fd4\u56de\u7a7a\u503c\u7ee7\u7eed\u8fd0\u884c\u201d\u901a\u5e38\u6700\u5371\u9669&#xff0c;\u56e0\u4e3a\u8c03\u7528\u65b9\u4f1a\u628a\u65e0\u80fd\u529b\u8bef\u5224\u4e3a\u6210\u529f\u3002<\/p>\n<h3>\u628a\u5e73\u53f0\u7aef\u53e3\u63a5\u8fdb CMake&#xff0c;\u800c\u4e0d\u662f\u6563\u843d\u8fdb\u6838\u5fc3<\/h3>\n<p>\u5e73\u53f0\u76ee\u5f55\u5e94\u7531\u6784\u5efa\u5c42\u4e00\u6b21\u9009\u62e9&#xff0c;\u6838\u5fc3\u76ee\u6807\u4e0d\u611f\u77e5 __OHOS__&#xff1a;<\/p>\n<p>add_library(text_core STATIC<br \/>\n  core\/normalize_ascii.cpp<br \/>\n  core\/text_service.cpp<br \/>\n)<\/p>\n<p>add_library(text_platform STATIC<br \/>\n  platform\/harmony\/harmony_clock.cpp<br \/>\n  platform\/harmony\/harmony_file.cpp<br \/>\n)<\/p>\n<p>target_link_libraries(textnative PRIVATE<br \/>\n  text_core<br \/>\n  text_platform<br \/>\n  libace_napi.z.so<br \/>\n)<\/p>\n<p>\u4e3a\u4e86\u8bc1\u660e\u62bd\u8c61\u6ca1\u6709\u6539\u53d8\u6838\u5fc3\u8bed\u4e49&#xff0c;\u6d4b\u8bd5\u5206\u4e24\u5c42&#xff1a;\u7eaf\u6838\u5fc3\u4f7f\u7528 fake \u7aef\u53e3\u65ad\u8a00\u786e\u5b9a\u8f93\u51fa&#xff1b;HarmonyOS \u7aef\u53e3\u4f7f\u7528\u76ee\u6807\u73af\u5883\u68c0\u67e5\u6743\u9650\u3001URI\u3001\u65f6\u949f\u548c\u9519\u8bef\u6620\u5c04\u3002\u4e00\u4e2a\u6700\u5c0f fake \u53ef\u4ee5\u628a\u65f6\u95f4\u56fa\u5b9a\u4e3a 1000&#xff0c;\u8ba9\u8d85\u65f6\u6d4b\u8bd5\u4e0d\u4f9d\u8d56\u771f\u5b9e\u65f6\u949f\u3002<\/p>\n<table>\n<tr>\u8bc1\u636e\u5c42\u80fd\u8bc1\u660e\u4ec0\u4e48\u4e0d\u80fd\u8bc1\u660e\u4ec0\u4e48<\/tr>\n<tbody>\n<tr>\n<td>fake \u7aef\u53e3\u5355\u6d4b<\/td>\n<td>\u6838\u5fc3\u6309\u7aef\u53e3\u5951\u7ea6\u5de5\u4f5c<\/td>\n<td>\u7cfb\u7edf API \u53ef\u7528<\/td>\n<\/tr>\n<tr>\n<td>\u53cc ABI \u7f16\u8bd1<\/td>\n<td>\u5934\u6587\u4ef6\u3001\u7b26\u53f7\u548c\u94fe\u63a5\u914d\u7f6e\u6210\u7acb<\/td>\n<td>\u8fd0\u884c\u8bed\u4e49\u4e00\u81f4<\/td>\n<\/tr>\n<tr>\n<td>HAP \u5f52\u6863\u68c0\u67e5<\/td>\n<td>\u5e73\u53f0\u5b9e\u73b0\u8fdb\u5165\u6b63\u786e ABI \u76ee\u5f55<\/td>\n<td>\u6743\u9650\u548c\u8bbe\u5907\u884c\u4e3a<\/td>\n<\/tr>\n<tr>\n<td>\u8bbe\u5907\u5951\u7ea6\u6d4b\u8bd5<\/td>\n<td>\u5f53\u524d\u7cfb\u7edf\/API \u4e0b\u7684\u771f\u5b9e\u8bed\u4e49<\/td>\n<td>\u6240\u6709\u8bbe\u5907\u548c\u672a\u6765\u7248\u672c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5982\u679c\u7aef\u53e3\u6682\u672a\u5b9e\u73b0&#xff0c;\u5e94\u5728\u80fd\u529b\u8868\u4e2d\u6807\u6210 unsupported&#xff0c;\u5e76\u8ba9\u516c\u5171 API \u8fd4\u56de\u7a33\u5b9a\u9519\u8bef&#xff1b;\u4e0d\u8981\u94fe\u63a5\u4e00\u4e2a\u6c38\u8fdc\u8fd4\u56de\u7a7a\u503c\u7684\u5360\u4f4d\u5b9e\u73b0\u3002<\/p>\n<h3>\u7528 FakeClock \u8bc1\u660e\u6838\u5fc3\u4e0d\u4f9d\u8d56\u7cfb\u7edf\u65f6\u95f4<\/h3>\n<p>\u628a\u65f6\u95f4\u6ce8\u5165\u540e&#xff0c;\u8d85\u65f6\u903b\u8f91\u53ef\u4ee5\u7528\u786e\u5b9a\u8f93\u5165\u6d4b\u8bd5&#xff0c;\u4e0d\u5fc5\u771f\u7684\u7b49\u5f85&#xff1a;<\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">FakeClock<\/span> <span class=\"token keyword\">final<\/span> <span class=\"token operator\">:<\/span> <span class=\"token keyword\">public<\/span> ClockPort <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token keyword\">explicit<\/span> <span class=\"token function\">FakeClock<\/span><span class=\"token punctuation\">(<\/span>std<span class=\"token double-colon punctuation\">::<\/span><span class=\"token keyword\">int64_t<\/span> now<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">:<\/span> <span class=\"token function\">now_<\/span><span class=\"token punctuation\">(<\/span>now<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token punctuation\">}<\/span><br \/>\n    std<span class=\"token double-colon punctuation\">::<\/span><span class=\"token keyword\">int64_t<\/span> <span class=\"token function\">NowMillis<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">const<\/span> <span class=\"token keyword\">override<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token keyword\">return<\/span> now_<span class=\"token punctuation\">;<\/span> <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token keyword\">void<\/span> <span class=\"token function\">Set<\/span><span class=\"token punctuation\">(<\/span>std<span class=\"token double-colon punctuation\">::<\/span><span class=\"token keyword\">int64_t<\/span> now<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span> now_ <span class=\"token operator\">&#061;<\/span> now<span class=\"token punctuation\">;<\/span> <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token keyword\">private<\/span><span class=\"token operator\">:<\/span><br \/>\n    std<span class=\"token double-colon punctuation\">::<\/span><span class=\"token keyword\">int64_t<\/span> now_<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>FakeClock <span class=\"token function\">clock<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">999<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">assert<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token function\">HasExpired<\/span><span class=\"token punctuation\">(<\/span>clock<span class=\"token punctuation\">,<\/span> <span class=\"token number\">1000<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\nclock<span class=\"token punctuation\">.<\/span><span class=\"token function\">Set<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">1000<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">assert<\/span><span class=\"token punctuation\">(<\/span><span class=\"token function\">HasExpired<\/span><span class=\"token punctuation\">(<\/span>clock<span class=\"token punctuation\">,<\/span> <span class=\"token number\">1000<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u8fd9\u4e2a\u6d4b\u8bd5\u80fd\u8bc1\u660e\u6838\u5fc3\u4f7f\u7528\u4e86\u7aef\u53e3&#xff0c;\u5e76\u4e14\u622a\u6b62\u65f6\u95f4\u8fb9\u754c\u91c7\u7528 now &gt;&#061; deadline&#xff1b;\u5b83\u4e0d\u80fd\u8bc1\u660e HarmonyOS \u7aef\u53e3\u9009\u62e9\u4e86\u6b63\u786e\u7684\u5355\u8c03\u65f6\u949f\u3002\u5e73\u53f0\u5b9e\u73b0\u4ecd\u8981\u5728\u76ee\u6807\u73af\u5883\u68c0\u67e5\u65f6\u949f\u6765\u6e90\u3001\u5355\u4f4d\u3001\u6ea2\u51fa\u548c\u4f11\u7720\u884c\u4e3a\u3002<\/p>\n<p>\u5982\u679c\u6838\u5fc3\u6d4b\u8bd5\u4ecd\u5fc5\u987b\u5305\u542b #ifdef __OHOS__ \u624d\u80fd\u901a\u8fc7&#xff0c;\u8bf4\u660e\u5e73\u53f0\u5dee\u5f02\u6ca1\u6709\u771f\u6b63\u88ab\u9694\u79bb&#xff0c;\u5e94\u5148\u8c03\u6574\u4f9d\u8d56\u65b9\u5411&#xff0c;\u518d\u589e\u52a0\u66f4\u591a\u5b8f\u3002<\/p>\n<h3>\u6587\u4ef6\u3001\u7ebf\u7a0b\u548c\u7f51\u7edc\u7684\u989d\u5916\u95ee\u9898<\/h3>\n<h4>\u6587\u4ef6<\/h4>\n<p>\u8def\u5f84\u683c\u5f0f\u3001\u6743\u9650\u3001URI\u3001\u6c99\u7bb1\u3001\u7f16\u7801\u548c\u5927\u6587\u4ef6\u8bfb\u53d6\u90fd\u53ef\u80fd\u4e0d\u540c\u3002\u4e0d\u8981\u628a\u684c\u9762\u7edd\u5bf9\u8def\u5f84\u5199\u5165\u516c\u5171 API\u3002<\/p>\n<h4>\u7ebf\u7a0b<\/h4>\n<p>\u6838\u5fc3\u7ebf\u7a0b\u5b89\u5168\u4e0d\u4ee3\u8868\u6865\u63a5\u7ebf\u7a0b\u5b89\u5168\u3002Node-API \u7684 env \u548c ArkTS \u5bf9\u8c61\u53ea\u80fd\u6309\u5b98\u65b9\u7ebf\u7a0b\u6a21\u578b\u4f7f\u7528\u3002<\/p>\n<h4>\u7f51\u7edc<\/h4>\n<p>\u4ee3\u7406\u3001\u8bc1\u4e66\u3001\u8d85\u65f6\u3001\u53d6\u6d88\u548c\u540e\u53f0\u9650\u5236\u90fd\u5c5e\u4e8e\u5e73\u53f0\u8bed\u4e49\u3002\u4ec5\u66ff\u6362\u51fd\u6570\u540d\u65e0\u6cd5\u8bc1\u660e\u4e00\u81f4\u3002<\/p>\n<h4>\u65f6\u95f4<\/h4>\n<p>\u5899\u4e0a\u65f6\u95f4\u4e0e\u5355\u8c03\u65f6\u95f4\u7528\u9014\u4e0d\u540c\u3002\u6027\u80fd\u6d4b\u91cf\u3001\u8d85\u65f6\u548c\u4e1a\u52a1\u65f6\u95f4\u4e0d\u80fd\u5171\u7528\u4e00\u4e2a\u6a21\u7cca now()\u3002<\/p>\n<h3>\u5f53\u524d\u9a8c\u8bc1<\/h3>\n<p>\u6559\u5b66\u6838\u5fc3\u6ca1\u6709\u5e73\u53f0\u5b8f\u4e0e HarmonyOS \u5934\u6587\u4ef6&#xff1b;Node-API \u4ec5\u5b58\u5728\u4e8e napi_init.cpp\u3002text_core \u9759\u6001\u5e93\u548c textnative \u5171\u4eab\u5e93\u4e3a\u4e24\u79cd ABI \u6784\u5efa\u6210\u529f\u3002\u6587\u4ef6\u3001\u7f51\u7edc\u3001\u7ebf\u7a0b\u548c\u771f\u5b9e\u65f6\u949f\u9002\u914d\u5668\u6ca1\u6709\u5b9e\u73b0&#xff0c;\u56e0\u6b64\u5bf9\u5e94\u80fd\u529b\u72b6\u6001\u4e3a not implemented&#xff0c;\u4e0d\u662f\u201c\u5df2\u517c\u5bb9\u201d\u3002<\/p>\n<h3>\u5e38\u89c1\u5931\u8d25&#xff1a;\u5b8f\u8ba9\u6240\u6709\u5e73\u53f0\u90fd\u80fd\u7f16\u8bd1&#xff0c;\u5374\u6539\u53d8\u884c\u4e3a<\/h3>\n<p>\u4f8b\u5982\u5728\u4e0d\u652f\u6301\u7684\u5206\u652f\u91cc\u8fd4\u56de 0\u3001\u7a7a\u5b57\u7b26\u4e32\u6216 true&#xff0c;\u53ef\u80fd\u8ba9\u7f16\u8bd1\u901a\u8fc7&#xff0c;\u4f46\u7834\u574f\u9519\u8bef\u5951\u7ea6\u3002\u5e73\u53f0\u5206\u652f\u5fc5\u987b\u6709\u6d4b\u8bd5\u5411\u91cf\u548c\u660e\u786e\u9519\u8bef&#xff1b;\u65e0\u6cd5\u5b9e\u73b0\u65f6\u5e94\u963b\u6b62\u8be5\u529f\u80fd\u8fdb\u5165\u652f\u6301\u5217\u8868\u3002<\/p>\n<h3>\u672c\u7bc7\u4ea7\u7269\u4e0e\u4e0b\u4e00\u7bc7\u95e8\u69db<\/h3>\n<p>\u672c\u7bc7\u4ea7\u7269\u662f\u4e00\u5f20\u5e73\u53f0\u62bd\u8c61\u56fe\u548c\u8865\u4e01\u8fb9\u754c\u89c4\u5219\u3002\u8fdb\u5165\u7b2c 21 \u7bc7\u524d&#xff0c;\u5e94\u80fd\u4ece CMake \u76ee\u6807\u8ffd\u5230\u6700\u7ec8 .so&#xff0c;\u5e76\u7528 ELF\/\u5f52\u6863\u5de5\u5177\u68c0\u67e5 ABI\u3001\u4f9d\u8d56\u94fe\u548c\u5305\u5185\u8def\u5f84\u3002<\/p>\n<h3>\u5b98\u65b9\u6765\u6e90<\/h3>\n<ul>\n<li>\u4e09\u65b9\u5e93\u9002\u914d&#xff1a;\u7528\u4e8e HarmonyOS NDK \u4e0e\u4e09\u65b9\u5e93\u96c6\u6210\u65b9\u5f0f\u3002\u8bbf\u95ee\u65e5\u671f&#xff1a;2026-10-18\u3002<\/li>\n<li>Node-API \u4f7f\u7528\u6307\u5bfc&#xff1a;\u7528\u4e8e\u6865\u63a5\u5c42\u4e0e ArkTS \u5bf9\u8c61\u8fb9\u754c\u3002\u8bbf\u95ee\u65e5\u671f&#xff1a;2026-10-18\u3002<\/li>\n<li>\u4f7f\u7528 Node-API \u63a5\u53e3\u8fdb\u884c\u5f02\u6b65\u4efb\u52a1\u5f00\u53d1&#xff1a;\u7528\u4e8e\u5de5\u4f5c\u7ebf\u7a0b\u4e0e env \u7684\u8fb9\u754c\u3002\u8bbf\u95ee\u65e5\u671f&#xff1a;2026-10-18\u3002<\/li>\n<\/ul>\n<h3>\u9a8c\u8bc1\u58f0\u660e<\/h3>\n<p>\u7eaf C&#043;&#043; \u6838\u5fc3\u3001\u5916\u5c42 CMake \u4e0e Node-API \u6865\u63a5\u5df2\u901a\u8fc7\u53cc ABI \u76ee\u6807\u7f16\u8bd1\u3002\u672c\u6587\u6ca1\u6709\u5b9e\u73b0\u6216\u9a8c\u8bc1\u771f\u5b9e\u6587\u4ef6\u3001\u7f51\u7edc\u3001\u7ebf\u7a0b\u548c\u8bbe\u5907\u7cfb\u7edf\u8c03\u7528&#xff1b;\u8fd9\u4e9b\u80fd\u529b\u88ab\u660e\u786e\u7559\u5728\u5e73\u53f0\u9002\u914d\u5c42\u4e4b\u5916\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e13\u680f&#xff1a;HarmonyOS \u4e09\u65b9\u5e93\u9002\u914d\u5b9e\u6218&#xff08;20\/30&#xff09; \u6838\u5fc3\u95ee\u9898&#xff1a;\u7ebf\u7a0b\u3001\u65f6\u95f4\u3001\u6587\u4ef6\u548c\u7f51\u7edc\u8c03\u7528\u4e0d\u517c\u5bb9\u65f6&#xff0c;\u600e\u6837\u907f\u514d\u5728\u4e0a\u6e38\u6e90\u7801\u91cc\u6563\u843d\u5e73\u53f0\u5224\u65ad&#xff1f; \u6458\u8981<br \/>\nNative \u9002\u914d\u6700\u96be\u7ef4\u62a4\u7684\u5199\u6cd5&#xff0c;\u662f\u5728\u51e0\u5341\u4e2a\u6e90\u6587\u4ef6\u4e2d\u8ffd\u52a0\u5e73\u53f0\u5b8f\u3002\u66f4\u597d\u7684\u65b9\u6cd5\u662f\u5148\u8bc6\u522b\u80fd\u529b\u7aef\u53e3&#xff0c;\u518d\u628a HarmonyOS \u5b9e\u73b0\u96c6\u4e2d\u5728\u9002\u914d\u5c42&#xff0c;\u6838\u5fc3\u53ea\u4f9d\u8d56\u5c0f\u63a5\u53e3\u3002\u672c\u6587\u7528\u6559\u5b66 text_core \u5c55\u793a\u201c\u7eaf\u6838\u5fc3  Nod<\/p>\n","protected":false},"author":2,"featured_media":123285,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[280,67],"topic":[],"class_list":["post-123287","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-harmonyos","tag-67"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5e73\u53f0\u5b8f\u3001\u7cfb\u7edf\u8c03\u7528\u4e0e\u7f3a\u5931\u80fd\u529b\uff1a\u5efa\u7acb\u53ef\u7ef4\u62a4\u7684 Native \u62bd\u8c61\u5c42 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/123287.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5e73\u53f0\u5b8f\u3001\u7cfb\u7edf\u8c03\u7528\u4e0e\u7f3a\u5931\u80fd\u529b\uff1a\u5efa\u7acb\u53ef\u7ef4\u62a4\u7684 Native \u62bd\u8c61\u5c42 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e13\u680f&#xff1a;HarmonyOS \u4e09\u65b9\u5e93\u9002\u914d\u5b9e\u6218&#xff08;20\/30&#xff09; \u6838\u5fc3\u95ee\u9898&#xff1a;\u7ebf\u7a0b\u3001\u65f6\u95f4\u3001\u6587\u4ef6\u548c\u7f51\u7edc\u8c03\u7528\u4e0d\u517c\u5bb9\u65f6&#xff0c;\u600e\u6837\u907f\u514d\u5728\u4e0a\u6e38\u6e90\u7801\u91cc\u6563\u843d\u5e73\u53f0\u5224\u65ad&#xff1f; \u6458\u8981 Native \u9002\u914d\u6700\u96be\u7ef4\u62a4\u7684\u5199\u6cd5&#xff0c;\u662f\u5728\u51e0\u5341\u4e2a\u6e90\u6587\u4ef6\u4e2d\u8ffd\u52a0\u5e73\u53f0\u5b8f\u3002\u66f4\u597d\u7684\u65b9\u6cd5\u662f\u5148\u8bc6\u522b\u80fd\u529b\u7aef\u53e3&#xff0c;\u518d\u628a HarmonyOS \u5b9e\u73b0\u96c6\u4e2d\u5728\u9002\u914d\u5c42&#xff0c;\u6838\u5fc3\u53ea\u4f9d\u8d56\u5c0f\u63a5\u53e3\u3002\u672c\u6587\u7528\u6559\u5b66 text_core \u5c55\u793a\u201c\u7eaf\u6838\u5fc3 Nod\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/123287.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-06T15:56:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261106155647-6aedf8bfaf7ca.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/123287.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/123287.html\",\"name\":\"\u5e73\u53f0\u5b8f\u3001\u7cfb\u7edf\u8c03\u7528\u4e0e\u7f3a\u5931\u80fd\u529b\uff1a\u5efa\u7acb\u53ef\u7ef4\u62a4\u7684 Native \u62bd\u8c61\u5c42 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-11-06T15:56:49+00:00\",\"dateModified\":\"2026-11-06T15:56:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/123287.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/123287.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/123287.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5e73\u53f0\u5b8f\u3001\u7cfb\u7edf\u8c03\u7528\u4e0e\u7f3a\u5931\u80fd\u529b\uff1a\u5efa\u7acb\u53ef\u7ef4\u62a4\u7684 Native \u62bd\u8c61\u5c42\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5e73\u53f0\u5b8f\u3001\u7cfb\u7edf\u8c03\u7528\u4e0e\u7f3a\u5931\u80fd\u529b\uff1a\u5efa\u7acb\u53ef\u7ef4\u62a4\u7684 Native \u62bd\u8c61\u5c42 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/123287.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5e73\u53f0\u5b8f\u3001\u7cfb\u7edf\u8c03\u7528\u4e0e\u7f3a\u5931\u80fd\u529b\uff1a\u5efa\u7acb\u53ef\u7ef4\u62a4\u7684 Native \u62bd\u8c61\u5c42 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e13\u680f&#xff1a;HarmonyOS \u4e09\u65b9\u5e93\u9002\u914d\u5b9e\u6218&#xff08;20\/30&#xff09; \u6838\u5fc3\u95ee\u9898&#xff1a;\u7ebf\u7a0b\u3001\u65f6\u95f4\u3001\u6587\u4ef6\u548c\u7f51\u7edc\u8c03\u7528\u4e0d\u517c\u5bb9\u65f6&#xff0c;\u600e\u6837\u907f\u514d\u5728\u4e0a\u6e38\u6e90\u7801\u91cc\u6563\u843d\u5e73\u53f0\u5224\u65ad&#xff1f; \u6458\u8981 Native \u9002\u914d\u6700\u96be\u7ef4\u62a4\u7684\u5199\u6cd5&#xff0c;\u662f\u5728\u51e0\u5341\u4e2a\u6e90\u6587\u4ef6\u4e2d\u8ffd\u52a0\u5e73\u53f0\u5b8f\u3002\u66f4\u597d\u7684\u65b9\u6cd5\u662f\u5148\u8bc6\u522b\u80fd\u529b\u7aef\u53e3&#xff0c;\u518d\u628a HarmonyOS \u5b9e\u73b0\u96c6\u4e2d\u5728\u9002\u914d\u5c42&#xff0c;\u6838\u5fc3\u53ea\u4f9d\u8d56\u5c0f\u63a5\u53e3\u3002\u672c\u6587\u7528\u6559\u5b66 text_core \u5c55\u793a\u201c\u7eaf\u6838\u5fc3 Nod","og_url":"https:\/\/www.wsisp.com\/helps\/123287.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-11-06T15:56:49+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261106155647-6aedf8bfaf7ca.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/123287.html","url":"https:\/\/www.wsisp.com\/helps\/123287.html","name":"\u5e73\u53f0\u5b8f\u3001\u7cfb\u7edf\u8c03\u7528\u4e0e\u7f3a\u5931\u80fd\u529b\uff1a\u5efa\u7acb\u53ef\u7ef4\u62a4\u7684 Native \u62bd\u8c61\u5c42 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-11-06T15:56:49+00:00","dateModified":"2026-11-06T15:56:49+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/123287.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/123287.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/123287.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5e73\u53f0\u5b8f\u3001\u7cfb\u7edf\u8c03\u7528\u4e0e\u7f3a\u5931\u80fd\u529b\uff1a\u5efa\u7acb\u53ef\u7ef4\u62a4\u7684 Native \u62bd\u8c61\u5c42"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/123287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=123287"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/123287\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/123285"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=123287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=123287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=123287"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=123287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}