{"id":4463,"date":"2023-05-08T17:26:19","date_gmt":"2023-05-08T09:26:19","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/?p=4463"},"modified":"2023-05-08T17:26:19","modified_gmt":"2023-05-08T09:26:19","slug":"app%e5%92%8ch5%e6%b7%b7%e5%90%88%e5%bc%80%e5%8f%91%e6%98%af%e4%bb%80%e4%b9%88%e6%84%8f%e6%80%9d%e5%91%a2","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/appkaifa\/4463.html","title":{"rendered":"app\u548ch5\u6df7\u5408\u5f00\u53d1\u662f\u4ec0\u4e48\u610f\u601d\u5462?"},"content":{"rendered":"<p>App\u548cH5\u6df7\u5408\u5f00\u53d1\u662f\u4e00\u79cd\u7ed3\u5408\u4e86\u539f\u751f\u5e94\u7528\u548cH5\u7f51\u9875\u7684\u5f00\u53d1\u65b9\u5f0f\uff0c\u5b83\u5c06\u539f\u751f\u5e94\u7528\u548cH5\u7f51\u9875\u6709\u673a\u5730\u7ed3\u5408\u5728\u4e00\u8d77\uff0c\u65e2\u517c\u987e\u4e86\u539f\u751f\u5e94\u7528\u7684\u6027\u80fd\u548c\u7528\u6237\u4f53\u9a8c\uff0c\u53c8\u5177\u5907\u4e86H5\u7f51\u9875\u7684\u8de8\u5e73\u53f0\u7279\u6027\u548c\u7075\u6d3b\u6027\u3002\u672c\u6587\u5c06\u4ece\u539f\u7406\u548c\u8be6\u7ec6\u4ecb\u7ecd\u4e24\u4e2a\u65b9\u9762\u6765\u4ecb\u7ecdApp\u548cH5\u6df7\u5408\u5f00\u53d1\u3002<\/p>\n<p>\u4e00\u3001\u539f\u7406<\/p>\n<p>App\u548cH5\u6df7\u5408\u5f00\u53d1\u7684\u539f\u7406\u662f\u5c06H5\u7f51\u9875\u5d4c\u5165\u5230\u539f\u751f\u5e94\u7528\u4e2d\uff0c\u901a\u8fc7Webview\u7ec4\u4ef6\u5c06\u7f51\u9875\u5448\u73b0\u51fa\u6765\uff0c\u540c\u65f6\u901a\u8fc7JavaScript\u6865\u63a5\u6280\u672f\u5b9e\u73b0\u539f\u751f\u5e94\u7528\u548cH5\u7f51\u9875\u4e4b\u95f4\u7684\u901a\u4fe1\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u5c31\u662f\u901a\u8fc7JavaScript\u4ee3\u7801\u8c03\u7528\u539f\u751f\u5e94\u7528\u7684API\uff0c\u5b9e\u73b0\u539f\u751f\u5e94\u7528\u7684\u529f\u80fd\uff0c\u540c\u65f6\u901a\u8fc7\u539f\u751f\u5e94\u7528\u7684API\u8c03\u7528JavaScript\u4ee3\u7801\uff0c\u5b9e\u73b0H5\u7f51\u9875\u7684\u529f\u80fd\u3002<\/p>\n<p>\u4e8c\u3001\u8be6\u7ec6\u4ecb\u7ecd<\/p>\n<p>1. \u5f00\u53d1\u73af\u5883<\/p>\n<p>\u5f00\u53d1App\u548cH5\u6df7\u5408\u5e94\u7528\u9700\u8981\u4f7f\u7528\u4e13\u95e8\u7684\u5f00\u53d1\u5de5\u5177\uff0c\u76ee\u524d\u5e02\u9762\u4e0a\u6bd4\u8f83\u6d41\u884c\u7684\u5f00\u53d1\u5de5\u5177\u6709Cordova\u3001React Native\u3001Weex\u7b49\u3002\u8fd9\u4e9b\u5de5\u5177\u90fd\u63d0\u4f9b\u4e86\u4e00\u5957\u5b8c\u6574\u7684\u5f00\u53d1\u6846\u67b6\u548cAPI\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u8fdb\u884c\u5feb\u901f\u5f00\u53d1\u548c\u8c03\u8bd5\u3002<\/p>\n<p>2. \u539f\u751f\u5e94\u7528\u548cH5\u7f51\u9875\u7684\u7ed3\u5408<\/p>\n<p>\u5728App\u548cH5\u6df7\u5408\u5f00\u53d1\u4e2d<a href=\"https:\/\/www.yimenapp.cn\/fengzhuang-1902.html\">\u624b\u673a \u81ea\u52a8\u5236\u4f5capp<\/a>\uff0c\u539f\u751f\u5e94\u7528\u548cH5\u7f51\u9875\u662f\u901a\u8fc7Webview\u7ec4\u4ef6\u8fdb\u884c\u7ed3\u5408\u7684\u3002Webview\u662f\u4e00\u79cd\u5728\u539f\u751f\u5e94\u7528\u4e2d\u5d4c\u5165H5\u7f51\u9875\u7684\u7ec4\u4ef6\uff0c\u5b83\u53ef\u4ee5\u5c06H5\u7f51\u9875\u5448\u73b0\u51fa\u6765\uff0c\u5e76\u4e14\u652f\u6301\u539f\u751f\u5e94\u7528\u548cH5\u7f51\u9875\u4e4b\u95f4\u7684\u901a\u4fe1\u3002Webview\u7ec4\u4ef6\u5728\u4e0d\u540c\u7684\u5f00\u53d1\u5de5\u5177\u4e2d\u6709\u6240\u4e0d\u540c\uff0c\u4f46\u662f\u57fa\u672c\u4e0a\u90fd\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5e38\u7528\u7684API\uff0c\u4f8b\u5982\u52a0\u8f7d\u7f51\u9875\u3001\u8fd4\u56de\u4e0a\u4e00\u9875\u3001\u5237\u65b0\u7f51\u9875\u7b49\u3002<\/p>\n<p>3. JavaScript\u6865\u63a5\u6280\u672f<\/p>\n<p>JavaScript\u6865\u63a5\u6280\u672f\u662f\u5b9e\u73b0\u539f\u751f\u5e94\u7528\u548cH5\u7f51\u9875\u4e4b\u95f4\u901a\u4fe1\u7684\u91cd\u8981\u6280\u672f\u3002\u5b83\u901a\u8fc7JavaScript\u4ee3\u7801\u8c03\u7528\u539f\u751f\u5e94\u7528\u7684API\uff0c\u5b9e\u73b0\u539f\u751f\u5e94\u7528\u7684\u529f\u80fd\uff0c\u540c\u65f6\u901a\u8fc7\u539f\u751f\u5e94\u7528\u7684API\u8c03\u7528JavaScript\u4ee3\u7801\uff0c\u5b9e\u73b0H5\u7f51\u9875\u7684\u529f\u80fd\u3002\u8fd9\u79cd\u901a\u4fe1\u65b9\u5f0f\u53ef\u4ee5\u5b9e\u73b0\u539f\u751f\u5e94\u7528\u548cH5\u7f51\u9875\u7684\u65e0\u7f1d\u7ed3\u5408\uff0c\u4f7f\u5f97\u7528\u6237\u53ef\u4ee5\u4eab\u53d7\u5230\u539f\u751f\u5e94\u7528\u7684\u6027\u80fd\u548c\u7528\u6237\u4f53\u9a8c\uff0c\u540c\u65f6\u4e5f\u53ef\u4ee5\u4eab\u53d7\u5230H5\u7f51\u9875\u7684\u8de8\u5e73\u53f0\u7279\u6027\u548c\u7075\u6d3b\u6027\u3002<\/p>\n<p>4. \u5f00\u53d1\u6280\u5de7<\/p>\n<p>\u5728App\u548cH5\u6df7\u5408\u5f00\u53d1\u4e2d\uff0c\u9700\u8981\u6ce8\u610f\u4e00\u4e9b\u5f00\u53d1\u6280\u5de7\uff0c\u4ee5\u4fdd\u8bc1\u5e94\u7528\u7684\u6027\u80fd\u548c\u7528\u6237\u4f53\u9a8c\u3002\u4f8b\u5982\uff0c\u9700\u8981\u907f\u514d\u9891\u7e41\u7684\u5237\u65b0\u7f51\u9875<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/2023-03\/14\/15\/16121506579.jpg\" \/><\/figure>\n<\/p>\n<p>\uff0c\u53ef\u4ee5\u4f7f\u7528\u7f13\u5b58\u6280\u672f\uff1b\u9700\u8981\u907f\u514d\u8fc7\u591a\u7684JavaScript\u4ee3\u7801\uff0c\u53ef\u4ee5\u4f7f\u7528\u539f\u751f\u5e94\u7528\u7684API\u4ee3\u66ff\uff1b\u9700\u8981\u907f\u514d\u8fc7\u591a\u7684\u7f51\u7edc\u8bf7\u6c42\uff0c\u53ef\u4ee5\u4f7f\u7528\u672c\u5730\u5b58\u50a8\u6280\u672f\u7b49\u3002<\/p>\n<p>\u603b\u4e4b\uff0cApp\u548cH5\u6df7\u5408\u5f00\u53d1\u662f\u4e00\u79cd\u7ed3\u5408\u4e86\u539f\u751f\u5e94\u7528\u548cH5<a href=\"https:\/\/www.yimenapp.cn\/fengzhuang-3112.html\">webapp\u524d\u7aef\u5f00\u53d1\u6846\u67b6<\/a>\u7f51\u9875\u7684\u5f00\u53d1\u65b9\u5f0f\uff0c\u5b83\u65e2\u517c\u987e\u4e86\u539f\u751f\u5e94\u7528\u7684\u6027\u80fd\u548c\u7528\u6237\u4f53\u9a8c\uff0c\u53c8\u5177\u5907\u4e86H5\u7f51\u9875\u7684\u8de8\u5e73\u53f0\u7279\u6027\u548c\u7075\u6d3b\u6027\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u548c\u6280\u672f\u6c34\u5e73\u9009\u62e9\u5408\u9002\u7684\u5f00\u53d1\u5de5\u5177\u548c\u6280\u672f\uff0c\u8fdb\u884c\u5feb\u901f\u5f00\u53d1\u548c\u8c03\u8bd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>App\u548cH5\u6df7\u5408\u5f00\u53d1\u662f\u4e00\u79cd\u7ed3\u5408\u4e86\u539f\u751f\u5e94\u7528\u548cH5\u7f51\u9875\u7684\u5f00\u53d1\u65b9\u5f0f\uff0c\u5b83\u5c06\u539f\u751f\u5e94\u7528\u548cH5\u7f51\u9875\u6709\u673a\u5730\u7ed3\u5408\u5728\u4e00\u8d77\uff0c\u65e2\u517c\u987e\u4e86\u539f\u751f\u5e94\u7528\u7684\u6027\u80fd\u548c\u7528\u6237\u4f53\u9a8c\uff0c\u53c8\u5177\u5907\u4e86H5\u7f51\u9875\u7684\u8de8\u5e73\u53f0\u7279\u6027\u548c\u7075\u6d3b\u6027\u3002\u672c\u6587\u5c06\u4ece\u539f\u7406\u548c\u8be6\u7ec6\u4ecb\u7ecd\u4e24<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[5951,2735,2180,5952,1014],"class_list":["post-4463","post","type-post","status-publish","format-standard","hentry","category-appkaifa","tag-vueapp","tag-2735","tag-2180","tag-apk","tag-1014"],"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/4463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=4463"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/4463\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=4463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=4463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=4463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}