{"id":23119,"date":"2024-03-15T12:49:38","date_gmt":"2024-03-15T04:49:38","guid":{"rendered":"https:\/\/h5app.yimenapp.cn\/h5app\/?p=23119"},"modified":"2024-03-15T12:49:38","modified_gmt":"2024-03-15T04:49:38","slug":"%e8%8b%a5%e4%be%9d%e9%a1%b9%e7%9b%ae%e6%89%93%e5%8c%85app%e6%80%8e%e4%b9%88%e6%93%8d%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/h5app.yimenapp.cn\/h5app\/2024\/sjapp\/23119\/","title":{"rendered":"\u82e5\u4f9d\u9879\u76ee\u6253\u5305app\u600e\u4e48\u64cd\u4f5c?"},"content":{"rendered":"<p>\u82e5\u4f9d\uff08Ruoyi\uff09\u662f\u4e00\u6b3e\u57fa\u4e8eSp<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.yimenyun.net\/2023-03\/16\/09\/19925770241.jpg\" \/><\/figure>\n<\/p>\n<p>ringBoot\u548cVue.js\u5f00\u53d1\u7684\u5feb\u901f\u5f00\u53d1\u5e73\u53f0\uff0c\u53ef\u4ee5\u5feb\u901f\u642d\u5efa\u4f01\u4e1a\u7ea7\u540e\u53f0\u7ba1\u7406\u7cfb\u7edf\u3002\u82e5\u4f9d\u5e73\u53f0\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u7684\u57fa\u7840\u7ec4\u4ef6\u548c\u5e38\u89c1\u4e1a\u52a1\u6a21\u5757\uff0c\u5982\u7528\u6237\u7ba1\u7406<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-531.html\">h5\u9879\u76ee\u6253\u5305\u4e3aapp<\/a>\u3001\u89d2\u8272\u7ba1\u7406\u3001\u6743\u9650\u7ba1\u7406\u7b49\u7b49\u3002\u540c\u65f6\uff0c\u82e5\u4f9d\u5e73\u53f0\u4e5f\u652f\u6301\u81ea\u5b9a\u4e49\u5f00\u53d1\uff0c\u53ef\u4ee5\u6839\u636e\u4e1a\u52a1\u9700\u6c42\u8fdb\u884c\u4e8c\u6b21\u5f00\u53d1\u3002<\/p>\n<p>\u82e5\u4f9d\u5e73\u53f0\u8fd8\u652f\u6301\u5c06\u5f00\u53d1\u597d\u7684\u7cfb\u7edf\u6253<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-2358.html\">ios\u6253\u5305\u6d4b\u8bd5\u63a8\u9001<\/a>\u5305\u6210APP\uff0c\u65b9\u4fbf\u7528\u6237\u968f\u65f6\u968f\u5730\u4f7f\u7528\u3002\u4e0b\u9762\u5c06\u4ecb\u7ecd\u82e5\u4f9d\u5e73\u53f0\u6253\u5305APP\u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n<p>\u4e00\u3001\u539f\u7406<\/p>\n<p>\u82e5\u4f9d\u5e73\u53f0\u6253\u5305APP\u7684\u539f\u7406\u662f\u5c06Web\u5e94\u7528\u7a0b\u5e8f\u5305\u88c5\u6210\u4e00\u4e2a\u539f\u751f\u7684APP\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u5c31\u662f\u5c06Web\u5e94\u7528\u7a0b\u5e8f\u5d4c\u5165\u5230\u4e00\u4e2a\u539f\u751fAPP\u7684WebView\u4e2d\uff0c\u7136\u540e\u5728WebView\u4e2d\u8fd0\u884cWeb\u5e94\u7528\u7a0b\u5e8f\u3002\u8fd9\u6837\uff0c\u7528\u6237\u5c31\u53ef\u4ee5\u50cf\u4f7f\u7528\u539f\u751fAPP\u4e00\u6837\u4f7f\u7528Web\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>\u4e8c\u3001\u6b65\u9aa4<\/p>\n<p>\u82e5\u4f9d\u5e73\u53f0\u6253\u5305APP\u7684\u6b65\u9aa4\u6bd4\u8f83\u7b80\u5355\uff0c\u4e3b\u8981\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n<p>1. \u5b89\u88c5\u82e5\u4f9d\u5e73\u53f0<\/p>\n<p>\u82e5\u4f9d\u5e73\u53f0\u53ef\u4ee5\u901a\u8fc7GitHub\u4e0b\u8f7d\u6e90\u4ee3\u7801\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5b98\u7f51\u4e0b\u8f7d\u5df2\u7ecf\u7f16\u8bd1\u597d\u7684war\u5305\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u5c06war\u5305\u653e\u5230Tomcat\u7684webapps\u76ee\u5f55\u4e0b\uff0c\u542f\u52a8Tomcat\u5373\u53ef\u3002<\/p>\n<p>2. \u914d\u7f6e\u82e5\u4f9d\u5e73\u53f0<\/p>\n<p>\u82e5\u4f9d\u5e73\u53f0\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u914d\u7f6e\u624d\u80fd\u591f\u6b63\u5e38\u4f7f\u7528\u3002\u4e3b\u8981\u5305\u62ec\u6570\u636e\u5e93\u914d\u7f6e\u3001\u90ae\u4ef6\u914d\u7f6e\u3001Redis\u914d\u7f6e\u7b49\u7b49\u3002\u5177\u4f53\u7684\u914d\u7f6e\u65b9\u6cd5\u53ef\u4ee5\u53c2\u8003\u82e5\u4f9d\u5b98\u7f51\u63d0\u4f9b\u7684\u6587\u6863\u3002<\/p>\n<p>3. \u5b89\u88c5Cordova<\/p>\n<p>Cordova\u662f\u4e00\u6b3e\u8de8\u5e73\u53f0\u7684\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u6846\u67b6\uff0c\u53ef\u4ee5\u5c06Web\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210\u539f\u751f\u7684APP\u3002\u82e5\u4f9d\u5e73\u53f0\u6253\u5305APP\u9700\u8981\u4f7f\u7528\u5230Cordova\uff0c\u56e0\u6b64\u9700\u8981\u5148\u5b89\u88c5Cordova\u3002Cordova\u7684\u5b89\u88c5\u65b9\u6cd5\u53ef\u4ee5\u53c2\u8003\u5b98\u7f51\u63d0\u4f9b\u7684\u6587\u6863\u3002<\/p>\n<p>4. \u521b\u5efaCordova\u9879\u76ee<\/p>\n<p>\u5b89\u88c5\u597dCordova\u4e4b\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u521b\u5efa\u4e00\u4e2aCordova\u9879\u76ee\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>cordova create MyApp com.example.myapp MyApp<\/p>\n<p>&#8220;`<\/p>\n<p>\u5176\u4e2d\uff0cMyApp\u662f\u9879\u76ee\u540d\u79f0\uff0ccom.example.myapp\u662f\u9879\u76ee\u7684\u5305\u540d\uff0cMyApp\u662f\u9879\u76ee\u7684\u6807\u9898\u3002\u6267\u884c\u5b8c\u6210\u540e\uff0c\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3aMyApp\u7684\u6587\u4ef6\u5939\uff0c\u91cc\u9762\u5305\u542b\u4e86Cordova\u9879\u76ee\u7684\u7ed3\u6784\u3002<\/p>\n<p>5. \u6dfb\u52a0\u5e73\u53f0<\/p>\n<p>\u521b\u5efa\u597dCordova\u9879\u76ee\u4e4b\u540e\uff0c\u9700\u8981\u4e3a\u9879\u76ee\u6dfb\u52a0\u5e73\u53f0\u3002\u82e5\u4f9d\u5e73\u53f0\u6253\u5305APP\u9700\u8981\u4f7f\u7528\u7684\u5e73\u53f0\u6709Android\u548ciOS\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>cordova platform add android<\/p>\n<p>cordova platform add ios<\/p>\n<p>&#8220;`<\/p>\n<p>\u6267\u884c\u5b8c\u6210\u540e\uff0c\u4f1a\u5728Cordova\u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2aplatforms\u6587\u4ef6\u5939\uff0c\u91cc\u9762\u5305\u542b\u4e86Android\u548ciOS\u4e24\u4e2a\u5e73\u53f0\u7684\u4ee3\u7801\u3002<\/p>\n<p>6. \u914d\u7f6e\u63d2\u4ef6<\/p>\n<p>\u82e5\u4f9d\u5e73\u53f0\u6253\u5305APP\u9700\u8981\u4f7f\u7528\u5230\u4e00\u4e9bCordova\u63d2\u4ef6\uff0c\u5982\u7f51\u7edc\u63d2\u4ef6\u3001\u6587\u4ef6\u63d2\u4ef6\u7b49\u7b49\u3002\u9700\u8981\u5728Cordova\u9879\u76ee\u4e2d\u914d\u7f6e\u8fd9\u4e9b\u63d2\u4ef6\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>cordova plugin add cordova-plugin-network-information<\/p>\n<p>cordova plugin add cordova-plugin-file<\/p>\n<p>&#8220;`<\/p>\n<p>\u6267\u884c\u5b8c\u6210\u540e\uff0c\u4f1a\u5728Cordova\u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2aplugins\u6587\u4ef6\u5939\uff0c\u91cc\u9762\u5305\u542b\u4e86\u5b89\u88c5\u7684\u63d2\u4ef6\u3002<\/p>\n<p>7. \u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>\u82e5\u4f9d\u5e73\u53f0\u6253\u5305APP\u9700\u8981\u4fee\u6539Cordova\u9879\u76ee\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u4e3b\u8981\u5305\u62ecconfig.xml\u548cindex.html\u4e24\u4e2a\u6587\u4ef6\u3002<\/p>\n<p>config.xml\u6587\u4ef6\u662fCordova\u9879\u76ee\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u7528\u4e8e\u914d\u7f6e\u5e94\u7528\u7a0b\u5e8f\u7684\u540d\u79f0\u3001\u7248\u672c\u3001\u56fe\u6807\u3001\u542f\u52a8\u9875\u9762\u7b49\u7b49\u3002\u9700\u8981\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u4fee\u6539config.xml\u6587\u4ef6\u3002<\/p>\n<p>index.html\u6587\u4ef6\u662fWeb\u5e94\u7528\u7a0b\u5e8f\u7684\u5165\u53e3\u6587\u4ef6\uff0c\u9700\u8981\u5c06Web\u5e94\u7528\u7a0b\u5e8f\u7684URL\u586b\u5199\u5230index.html\u6587\u4ef6\u4e2d\u3002<\/p>\n<p>8. \u6253\u5305APP<\/p>\n<p>\u914d\u7f6e\u597dCordova\u9879\u76ee\u4e4b\u540e\uff0c\u5c31\u53ef\u4ee5\u6253\u5305APP\u4e86\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>cordova build android<\/p>\n<p>cordova build ios<\/p>\n<p>&#8220;`<\/p>\n<p>\u6267\u884c\u5b8c\u6210\u540e\uff0c\u4f1a\u5728Cordova\u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u7684platforms\u6587\u4ef6\u5939\u4e2d\u751f\u6210\u4e00\u4e2aapk\u6587\u4ef6\u548c\u4e00\u4e2aipa\u6587\u4ef6\uff0c\u5206\u522b\u662fAndroid\u548ciOS\u5e73\u53f0\u7684\u5b89\u88c5\u5305\u3002<\/p>\n<p>\u4e09\u3001\u603b\u7ed3<\/p>\n<p>\u82e5\u4f9d\u5e73\u53f0\u6253\u5305APP\u7684\u539f\u7406\u662f\u5c06Web\u5e94\u7528\u7a0b\u5e8f\u5305\u88c5\u6210\u4e00\u4e2a\u539f\u751f\u7684APP\uff0c\u4e3b\u8981\u662f\u5c06Web\u5e94\u7528\u7a0b\u5e8f\u5d4c\u5165\u5230\u4e00\u4e2a\u539f\u751fAPP\u7684WebView\u4e2d\u3002\u82e5\u4f9d\u5e73\u53f0\u6253\u5305APP\u7684\u6b65\u9aa4\u6bd4\u8f83\u7b80\u5355\uff0c\u4e3b\u8981\u5305\u62ec\u5b89\u88c5\u82e5\u4f9d\u5e73\u53f0\u3001\u914d\u7f6e\u82e5\u4f9d\u5e73\u53f0\u3001\u5b89\u88c5Cordova\u3001\u521b\u5efaCordova\u9879\u76ee\u3001\u6dfb\u52a0\u5e73\u53f0\u3001\u914d\u7f6e\u63d2\u4ef6\u3001\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u548c\u6253\u5305APP\u7b49\u7b49\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u82e5\u4f9d\uff08Ruoyi\uff09\u662f\u4e00\u6b3e\u57fa\u4e8eSpringBoot\u548cVue.js\u5f00\u53d1\u7684\u5feb\u901f\u5f00\u53d1\u5e73\u53f0\uff0c\u53ef\u4ee5\u5feb\u901f\u642d\u5efa\u4f01\u4e1a\u7ea7\u540e\u53f0\u7ba1\u7406\u7cfb\u7edf\u3002\u82e5\u4f9d\u5e73\u53f0\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u7684\u57fa\u7840\u7ec4\u4ef6\u548c\u5e38\u89c1\u4e1a\u52a1\u6a21\u5757\uff0c\u5982\u7528\u6237\u7ba1\u7406\u3001\u89d2\u8272\u7ba1\u7406\u3001\u6743\u9650\u7ba1\u7406\u7b49\u7b49\u3002\u540c<\/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":[21829,114,11,25419,913],"topic":[],"class_list":["post-23119","post","type-post","status-publish","format-standard","hentry","category-sjapp","tag-iapp","tag-114","tag-11","tag-ios","tag-913"],"_links":{"self":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/23119","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=23119"}],"version-history":[{"count":1,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/23119\/revisions"}],"predecessor-version":[{"id":23155,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/23119\/revisions\/23155"}],"wp:attachment":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/media?parent=23119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/categories?post=23119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/tags?post=23119"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/topic?post=23119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}