{"id":6657,"date":"2023-08-28T17:50:40","date_gmt":"2023-08-28T09:50:40","guid":{"rendered":"https:\/\/h5app.yimenapp.cn\/h5app\/?p=6657"},"modified":"2023-08-28T17:50:40","modified_gmt":"2023-08-28T09:50:40","slug":"html%e6%89%93%e5%8c%85%e5%8f%8c%e7%ab%afapp%e6%98%af%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e7%9a%84","status":"publish","type":"post","link":"https:\/\/h5app.yimenapp.cn\/h5app\/2023\/sjapp\/6657\/","title":{"rendered":"html\u6253\u5305\u53cc\u7aefapp\u662f\u5982\u4f55\u5b9e\u73b0\u7684?"},"content":{"rendered":"<p>HTML\u662f\u4e00\u79cd\u7528\u4e8e\u521b\u5efaWeb\u9875\u9762\u7684\u6807\u8bb0\u8bed\u8a00\uff0c\u53ef\u4ee5\u901a\u8fc7\u5404\u79cd\u6846\u67b6\u548c\u5e93\u6765\u6784\u5efaWeb\u5e94\u7528\u7a0b\u5e8f\u3002\u7136\u800c\uff0cHTML\u4e5f\u53ef\u4ee5\u7528\u4e8e\u6784\u5efa\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\uff0c\u8fd9\u4e9b\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u5728iOS\u548cAndroid\u8bbe\u5907\u4e0a\u8fd0\u884c\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u5982\u4f55\u4f7f\u7528HTML\u521b\u5efa\u8de8\u5e73\u53f0\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u5c06\u5176\u6253\u5305\u5230\u53cc\u7aef\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002<\/p>\n<p>\u539f\u7406<\/p>\n<p>\u4f7f\u7528HT<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-1380.html\">\u6253\u5305\u5728\u7ebfweb\u9875\u9762\u6210apk<\/a>ML\u6784\u5efa\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u7684\u57fa\u672c\u539f\u7406\u662f\u4f7f\u7528\u4e00\u4e2a\u8de8\u5e73\u53f0\u7684\u5de5\u5177\uff0c\u8be5\u5de5\u5177\u5c06HTML\u3001CSS\u548cJavaScript\u4ee3\u7801\u7f16\u8bd1\u6210\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u3002\u8fd9\u79cd\u65b9\u6cd5\u79f0\u4e3a\u6df7\u5408\u5f00\u53d1\uff0c\u56e0\u4e3a\u5b83\u7ed3\u5408\u4e86Web\u6280\u672f\u548c\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u3002<\/p>\n<p>\u6df7\u5408\u5f00\u53d1\u7684\u4e3b\u8981\u4f18\u70b9\u662f\u53ef\u4ee5\u4f7f\u7528\u4e00\u7ec4\u4ee3\u7801\u6765\u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\uff0c\u7136\u540e\u5728\u4e0d\u540c\u7684\u5e73\u53f0\u4e0a\u6253\u5305\u548c\u53d1\u5e03\u3002\u8fd9\u6837\u53ef\u4ee5\u663e\u7740\u51cf\u5c11\u5f00\u53d1\u65f6\u95f4\u548c\u6210\u672c\uff0c\u5e76\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u53ef\u91cd\u7528\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<p>\u8be6\u7ec6\u4ecb\u7ecd<\/p>\n<p>\u5728\u6df7\u5408\u5f00\u53d1\u4e2d\uff0c\u6709\u4e24\u79cd\u65b9\u6cd5\u53ef\u4ee5\u4f7f\u7528HTML\u521b\u5efa\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\uff1aCordova\u548cReact Native\u3002<\/p>\n<p>Cordova\u662f\u4e00\u4e2a\u5f00\u6e90\u6846\u67b6\uff0c\u5b83\u5141\u8bb8\u5f00\u53d1\u4eba\u5458\u4f7f\u7528HTML\u3001CSS\u548cJavaScript\u6784\u5efa\u8de8\u5e73\u53f0\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u3002Cordova\u63d0\u4f9b\u4e86\u8bb8\u591a\u63d2\u4ef6\u548c\u5de5\u5177\uff0c\u4f7f\u5f00\u53d1\u4eba\u5458\u80fd\u591f\u8bbf\u95ee\u8bbe\u5907\u529f\u80fd\uff0c\u5982\u76f8\u673a\u3001GPS\u548c\u6587\u4ef6\u7cfb\u7edf\u7b49\u3002<\/p>\n<p>\u4f7f\u7528Cord<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/2023-03\/20\/11\/09436330420.jpg\" \/><\/figure>\n<\/p>\n<p>ova\u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\u7684\u57fa\u672c\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p>1. \u5b89\u88c5Cordova<\/p>\n<p>\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5Cordova\u547d\u4ee4\u884c\u5de5\u5177\u3002\u53ef\u4ee5\u4f7f\u7528npm\u5305\u7ba1\u7406\u5668\u6765\u5b89\u88c5Cordova\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>npm install -g cordova<\/p>\n<p>&#8220;`<\/p>\n<p>2. \u521b\u5efa\u5e94\u7528\u7a0b\u5e8f<\/p>\n<p>\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u4f7f\u7528Cordova\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5e94\u7528\u7a0b\u5e8f\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>cordova create myApp com.example.myApp MyApp<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cmyApp\u201d\u7684\u65b0\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u5c06\u5176\u5305\u540d\u8bbe\u7f6e\u4e3a\u201ccom.example.myApp\u201d\u3002\u8fd9\u91cc\u7684\u201cMyApp\u201d\u662f\u5e94\u7528\u7a0b\u5e8f\u7684\u663e\u793a\u540d\u79f0\u3002<\/p>\n<p>3. \u6dfb\u52a0\u5e73\u53f0<\/p>\n<p>\u5728Cordova\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u9700\u8981\u4e3a\u6bcf\u4e2a\u76ee\u6807\u5e73\u53f0\u6dfb\u52a0\u4e00\u4e2a\u5e73\u53f0\u3002\u4f8b\u5982\uff0c\u8981\u5728Android\u4e0a\u8fd0\u884c\u5e94\u7528\u7a0b\u5e8f\uff0c\u9700\u8981\u6dfb\u52a0Android\u5e73\u53f0\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>cd myApp<\/p>\n<p>cordova platform add android<\/p>\n<p>&#8220;`<\/p>\n<p>4. \u6dfb\u52a0\u63d2\u4ef6<\/p>\n<p>Cordova\u63d0\u4f9b\u4e86\u8bb8\u591a\u63d2\u4ef6\uff0c\u8fd9\u4e9b\u63d2\u4ef6\u5141\u8bb8\u5e94\u7528\u7a0b\u5e8f\u8bbf\u95ee\u8bbe\u5907\u529f\u80fd\u3002\u4f8b\u5982\uff0c\u8981\u8bbf\u95ee\u76f8\u673a\u529f\u80fd\uff0c\u9700\u8981\u6dfb\u52a0\u76f8\u673a\u63d2\u4ef6\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>cordova plugin add cordova-plugin-camera<\/p>\n<p>&#8220;`<\/p>\n<p>5. \u7f16\u5199\u4ee3\u7801<\/p>\n<p>\u5728\u5e94\u7528\u7a0b\u5e8f\u7684www\u76ee\u5f55\u4e2d\uff0c\u53ef\u4ee5\u7f16\u5199HTML\u3001CSS\u548cJavaScript\u4ee3\u7801\u3002\u8fd9\u4e9b\u4ee3\u7801\u5c06\u6784\u6210\u5e94\u7528\u7a0b\u5e8f\u7684\u7528\u6237\u754c\u9762\u548c\u4e1a\u52a1\u903b\u8f91\u3002<\/p>\n<p>6. \u6784\u5efa\u5e94\u7528\u7a0b\u5e8f<\/p>\n<p>\u6700\u540e\uff0c\u4f7f\u7528Cordova\u547d\u4ee4\u884c\u5de5\u5177\u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>cordova build android<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u5c06\u7f16\u8bd1\u5e94\u7528\u7a0b\u5e8f\u7684HTML\u3001CSS\u548cJavaScript\u4ee3\u7801\uff0c\u5e76\u5c06\u5176\u6253\u5305\u5230\u4e00\u4e2aAndroid APK\u6587\u4ef6\u4e2d\u3002<\/p>\n<p>React Native\u662f\u53e6\u4e00\u4e2a\u6d41\u884c\u7684\u8de8\u5e73\u53f0\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u6846\u67b6\uff0c\u5b83\u5141\u8bb8\u5f00\u53d1\u4eba\u5458\u4f7f\u7528JavaScript\u548cReact\u6784\u5efa\u539f\u751f\u5e94\u7528\u7a0b\u5e8f\u3002React Native\u7684\u4e3b\u8981\u4f18\u70b9\u662f\u53ef\u4ee5\u4f7f\u7528\u539f\u751fUI\u7ec4\u4ef6\u548cAPI\uff0c\u4ece\u800c\u63d0\u4f9b\u66f4\u597d\u7684\u6027\u80fd\u548c\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<p>\u4f7f\u7528React Native\u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\u7684\u57fa\u672c\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p>1. \u5b89\u88c5React Native<\/p>\n<p>\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5React Native\u547d\u4ee4\u884c\u5de5\u5177\u3002\u53ef\u4ee5\u4f7f\u7528npm\u5305\u7ba1\u7406\u5668\u6765\u5b89\u88c5React Native\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>npm install -g react-native-cli<\/p>\n<p>&#8220;`<\/p>\n<p>2. \u521b\u5efa\u5e94\u7528\u7a0b\u5e8f<\/p>\n<p>\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u4f7f\u7528React Native\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5e94\u7528\u7a0b\u5e8f\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>react-native init myApp<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cmyApp\u201d\u7684\u65b0\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u5c06\u5176\u5305\u540d\u8bbe\u7f6e\u4e3a\u9ed8\u8ba4\u503c\u3002<\/p>\n<p>3. \u7f16\u5199\u4ee3\u7801<\/p>\n<p>\u5728\u5e94\u7528\u7a0b\u5e8f\u7684src\u76ee\u5f55\u4e2d\uff0c\u53ef\u4ee5\u7f16\u5199JavaScript\u4ee3\u7801\u3002\u8fd9\u4e9b\u4ee3\u7801\u5c06\u6784<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-146.html\">\u82f9\u679capp\u6253\u5305pc<\/a>\u6210\u5e94\u7528\u7a0b\u5e8f\u7684\u4e1a\u52a1\u903b\u8f91\u548c\u7528\u6237\u754c\u9762\u3002<\/p>\n<p>4. \u6784\u5efa\u5e94\u7528\u7a0b\u5e8f<\/p>\n<p>\u6700\u540e\uff0c\u4f7f\u7528React Native\u547d\u4ee4\u884c\u5de5\u5177\u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>react-native run-android<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u5c06\u7f16\u8bd1\u5e94\u7528\u7a0b\u5e8f\u7684JavaScript\u4ee3\u7801\uff0c\u5e76\u5c06\u5176\u6253\u5305\u5230\u4e00\u4e2aAndroid APK\u6587\u4ef6\u4e2d\u3002<\/p>\n<p>\u7ed3\u8bba<\/p>\n<p>\u4f7f\u7528HTML\u6784\u5efa\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u662f\u4e00\u79cd\u5feb\u901f\u3001\u4fbf\u6377\u548c\u7ecf\u6d4e\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u5e73\u53f0\u4e0a\u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\u3002\u4f7f\u7528Cordova\u6216React Native\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06HTML\u6253\u5305\u5230\u53cc\u7aef\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u5e76\u8bbf\u95ee\u8bbe\u5907\u529f\u80fd\u548c\u539f\u751fUI\u7ec4\u4ef6\u3002\u65e0\u8bba\u60a8\u662f\u521d\u5b66\u8005\u8fd8\u662f\u7ecf\u9a8c\u4e30\u5bcc\u7684\u5f00\u53d1\u4eba\u5458\uff0c\u4f7f\u7528HTML\u6784\u5efa\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u90fd\u662f\u4e00\u79cd\u503c\u5f97\u5c1d\u8bd5\u7684\u65b9\u6cd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>HTML\u662f\u4e00\u79cd\u7528\u4e8e\u521b\u5efaWeb\u9875\u9762\u7684\u6807\u8bb0\u8bed\u8a00\uff0c\u53ef\u4ee5\u901a\u8fc7\u5404\u79cd\u6846\u67b6\u548c\u5e93\u6765\u6784\u5efaWeb\u5e94\u7528\u7a0b\u5e8f\u3002\u7136\u800c\uff0cHTML\u4e5f\u53ef\u4ee5\u7528\u4e8e\u6784\u5efa\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\uff0c\u8fd9\u4e9b\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u5728iOS\u548cAndroid\u8bbe\u5907\u4e0a\u8fd0\u884c\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[12040,193,1405,11,12039],"topic":[],"class_list":["post-6657","post","type-post","status-publish","format-standard","hentry","category-sjapp","tag-app","tag-193","tag-1405","tag-11","tag-12039"],"_links":{"self":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/6657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/comments?post=6657"}],"version-history":[{"count":0,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/6657\/revisions"}],"wp:attachment":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/media?parent=6657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/categories?post=6657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/tags?post=6657"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/topic?post=6657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}