{"id":1322,"date":"2023-03-18T12:08:10","date_gmt":"2023-03-18T04:08:10","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1322"},"modified":"2023-04-29T09:11:16","modified_gmt":"2023-04-29T01:11:16","slug":"uni-app-mini-program-sdk","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/18\/uni-app-mini-program-sdk\/","title":{"rendered":"uni-app\u5c0f\u7a0b\u5e8fSDK"},"content":{"rendered":"<h2>\u7b80\u4ecb<\/h2>\n<p>\u5b98\u7f51\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/nativesupport.dcloud.net.cn\/\">https:\/\/nativesupport.dcloud.net.cn\/<\/a><\/p>\n<p>uni\u5c0f\u7a0b\u5e8fSDK\uff0c\u662f\u4e3a\u539f\u751fApp\u6253\u9020\u7684\u53ef\u8fd0\u884c\u57fa\u4e8e<code>uni-app<\/code>\u5f00\u53d1\u7684\u5c0f\u7a0b\u5e8f\u524d\u7aef\u9879\u76ee\u7684\u6846\u67b6\uff0c\u4ece\u800c\u5e2e\u52a9\u539f\u751fApp\u5feb\u901f\u83b7\u53d6\u5c0f\u7a0b\u5e8f\u7684\u80fd\u529b\uff0c\u6548\u679c\u5982\u4e0b\uff1a<\/p>\n<p><!-- more --><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img-cdn-qiniu.dcloud.net.cn\/uploads\/article\/20200208\/17968bd5afe1e15f1b0b4965a194726f.gif\" alt=\"uni\u5c0f\u7a0b\u5e8fSDK\u5b9e\u73b0\u5c0f\u7a0b\u5e8f\" \/><\/p>\n<h2>\u57fa\u672c\u6982\u5ff5<\/h2>\n<h3>uni-app<\/h3>\n<p><a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/uniapp.dcloud.io\/\" title=\"uni-app\">uni-app<\/a> \u662f\u4e00\u4e2a\u4f7f\u7528 <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/vuejs.org\/\" title=\"Vue.js\">Vue.js<\/a> \u5f00\u53d1\u6240\u6709\u524d\u7aef\u5e94\u7528\u7684\u6846\u67b6\uff0c\u5f00\u53d1\u8005\u7f16\u5199\u4e00\u5957\u4ee3\u7801\uff0c\u53ef\u53d1\u5e03\u5230 H5\u3001\u4ee5\u53ca\u5404\u79cd\u5c0f\u7a0b\u5e8f\uff08\u5fae\u4fe1\/\u652f\u4ed8\u5b9d\/\u767e\u5ea6\/\u5934\u6761\/QQ\/\u9489\u9489\/\u6dd8\u5b9d\uff09\u3001\u5feb\u5e94\u7528\u7b49\u591a\u4e2a\u5e73\u53f0\uff0c\u5e76\u4e14\u5728 <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/www.dcloud.io\/hbuilderx.html\" title=\"HBuilderX\">HBuilderX<\/a> \u4e2d\u53ef\u76f4\u63a5\u6253\u5305\u751f\u6210 Android\u3001iOS App\u3002<\/p>\n<h3>uni\u5c0f\u7a0b\u5e8fSDK<\/h3>\n<p>uni\u5c0f\u7a0b\u5e8fSDK\u662f\u539f\u751fSDK\uff0c\u63d0\u4f9b Android \u7248\u672c \u548c iOS \u7248\u672c\uff0c\u9700\u8981\u5728\u539f\u751f\u5de5\u7a0b\u4e2d\u96c6\u6210\uff0c\u7136\u540e\u5373\u53ef\u8fd0\u884c\u7528<code>uni-app<\/code>\u6846\u67b6\u5f00\u53d1\u7684\u5c0f\u7a0b\u5e8f\u524d\u7aef\u9879\u76ee\uff0c\u4e00\u5957\u4ee3\u7801\u4e24\u7aef\u8fd0\u884c<\/p>\n<p><strong>\u540d\u8bcd\u89e3\u91ca<\/strong><\/p>\n<ul>\n<li>\u5bbf\u4e3b\uff1a\u60f3\u8981\u6784\u5efa\u5c0f\u7a0b\u5e8f\u7684\u539f\u751fApp\uff0c\u96c6\u6210uni\u5c0f\u7a0b\u5e8fSDK\u7684\u5bbf\u4e3b<\/li>\n<li>\u5c0f\u7a0b\u5e8f\uff1a\u8fd0\u884c\u5728\u5bbf\u4e3b\u4e2d\u7684\u524d\u7aef\u4ee3\u7801\u7f16\u5199\u7684\u5c0f\u7a0b\u5e8f\u9879\u76ee\uff0c\u4f7f\u7528<code>uni-app<\/code>\u6846\u67b6\u5f00\u53d1<\/li>\n<li><code>wgt<\/code>\uff1a\u5c0f\u7a0b\u5e8f\u5e94\u7528\u8d44\u6e90\u5305\uff0c\u5373\u4f7f\u7528<code>uni-app<\/code>\u6846\u67b6\u5f00\u53d1\u7684\u9879\u76ee\uff0c\u5bfc\u51fa\u7684\u5c0f\u7a0b\u5e8f\u5e94\u7528\u8d44\u6e90\u5305<\/li>\n<li><code>HBuilderX<\/code>\uff1a\u5f00\u53d1<code>uni-app<\/code>\u7684 IDE \u5de5\u5177<\/li>\n<\/ul>\n<p><strong>\u6ce8\u610f<\/strong><\/p>\n<ul>\n<li>uni\u5c0f\u7a0b\u5e8fSDK \u4ec5\u652f\u6301\u4f7f\u7528<code>uni-app<\/code>\u5f00\u53d1\u7684\u5c0f\u7a0b\u5e8f\uff0c\u4e0d\u652f\u6301\u7eaf<code>wxml<\/code>\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u8fd0\u884c\u3002\u4f46<code>uni-app<\/code>\u652f\u6301\u4f7f\u7528<code>wxml<\/code>\u683c\u5f0f\u7684\u5c0f\u7a0b\u5e8f\u7ec4\u4ef6<\/li>\n<li>uni\u5c0f\u7a0b\u5e8fSDK \u4ec5\u652f\u6301<code>uni-app<\/code>\u7684<code>v3<\/code>\u7f16\u8bd1\u5668\u3002\u4f7f\u7528\u8001\u7248\u7684\u5f00\u53d1\u8005\uff0c\u9700\u9996\u5148\u4fdd\u969c\u5e94\u7528\u53ef\u4ee5\u8fd0\u884c\u5728 v3 \u7f16\u8bd1\u6a21\u5f0f\u4e0b<\/li>\n<\/ul>\n<h2>\u7279\u8272<\/h2>\n<p><code>uni-app<\/code>\u5728 app \u7aef\u662f\u53cc\u6e32\u67d3\u5f15\u64ce\uff0c\u53ef\u4ee5\u50cf\u5fae\u4fe1\u90a3\u6837\u4f7f\u7528<code>webview<\/code>\u6e32\u67d3\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u6539\u9020\u7248\u7684<code>weex<\/code>\u8fdb\u884c\u539f\u751f\u6e32\u67d3\u3002\u5176\u4e2d<code>webview<\/code>\u6e32\u67d3\u5728 Android \u4e0a\u4e5f\u540c\u65f6\u652f\u6301\u7cfb\u7edf<code>webview<\/code>\u6e32\u67d3\u548c<code>x5<\/code>\u6e32\u67d3\u3002<\/p>\n<ul>\n<li><strong>\u6027\u80fd<\/strong> uni\u5c0f\u7a0b\u5e8fsdk\u7684\u6027\u80fd\uff0c\u4e0e<code>uni-app<\/code>\u7684app\u7aef<code>v3<\/code>\u7f16\u8bd1\u5668\u76f8\u540c\uff0c\u6027\u80fd\u8d85\u8fc7\u5e02\u9762\u5176\u4ed6\u5c0f\u7a0b\u5e8f\u5f15\u64ce\u3002\u5728\u542f\u52a8\u901f\u5ea6\u3001\u9875\u9762\u52a0\u8f7d\u901f\u5ea6\u3001\u903b\u8f91\u5c42\u4e0e\u89c6\u56fe\u5c42\u901a\u4fe1\u4f18\u5316\u7b49\u65b9\u9762\u5747\u4f18\u6709\u66f4\u4f18\u79c0\u7684\u8868\u73b0<\/li>\n<li><strong>\u529f\u80fd<\/strong> uni\u5c0f\u7a0b\u5e8fsdk\u7684\u529f\u80fd\uff0c\u4e0e<code>uni-app<\/code>\u7684app\u7aef\u529f\u80fd\u76f8\u540c\uff0c\u6240\u6709\u539f\u751f\u80fd\u529b\u5747\u53ef\u8c03\u7528\u3002\u4e0d\u540c\u4e8e\u5c0f\u7a0b\u5e8f\u7684\u9650\u5236\u548c\u6709\u9650API\uff0cuni\u5c0f\u7a0b\u5e8fsdk\u7684\u529f\u80fd\u66f4\u52a0\u5f3a\u5927<\/li>\n<li><strong>\u63d2\u4ef6\u751f\u6001<\/strong> <code>uni-app<\/code>\u63d2\u4ef6\u5e02\u573a\u6709\u5927\u91cf\u4e30\u5bcc\u7684\u63d2\u4ef6<\/li>\n<\/ul>\n<h2>\u5e94\u7528\u573a\u666f<\/h2>\n<ul>\n<li>\u5bbf\u4e3bApp\u6784\u5efa\u81ea\u5df1\u7684\u5e94\u7528\u751f\u6001\uff0c\u53ef\u4ee5\u9762\u5411\u5e7f\u6cdb\u5f00\u53d1\u8005\uff0c\u4e5f\u53ef\u4ee5\u5b9a\u5411\u90e8\u5206\u5f00\u53d1\u8005<\/li>\n<li>\u539f\u751fApp\u5229\u7528\u5c0f\u7a0b\u5e8f\u6a21\u5f0f\u5bf9\u6a21\u5757\u89e3\u8026\uff0c\u8ba9\u4e0d\u540c\u6a21\u5757\u7684\u5f00\u53d1\u56e2\u961f\u5404\u81ea\u72ec\u7acb\u53d1\u7248\uff0c\u7075\u6d3b\u66f4\u65b0<\/li>\n<li>\u539f\u751fApp\u4e2d\u90e8\u5206\u529f\u80fd\u4f7f\u7528<code>uni-app<\/code>\u5b9e\u73b0\uff0c\u964d\u4f4e\u5f00\u53d1\u6210\u672c\u3001\u63d0\u5347\u53d1\u5e03\u6548\u7387<\/li>\n<\/ul>\n<h2>\u96c6\u6210\u6d41\u7a0b<\/h2>\n<ul>\n<li>\u5bbf\u4e3b\u5f00\u53d1\u8005\u4e0b\u8f7duni\u5c0f\u7a0b\u5e8fsdk\uff0c\u6839\u636e\u6587\u6863\u96c6\u6210\u5230\u5bbf\u4e3bApp\u4e2d<\/li>\n<li>\u5c0f\u7a0b\u5e8f\u5f00\u53d1\u8005\u4f7f\u7528<code>HBuilderX<\/code>\u521b\u5efa<code>uni-app<\/code>\u9879\u76ee\u5e76\u5f00\u53d1\u529f\u80fd\uff0c\u5f00\u53d1\u9636\u6bb5\u53ef\u4ee5\u76f4\u63a5\u5728<code>HBuilderX<\/code>\u5185\u7f6e\u57fa\u5ea7\u8fdb\u884c\u6d4b\u8bd5\uff0c\u5f00\u53d1\u5b8c\u6bd5\u540e\u5728\u53d1\u884c\u83dc\u5355\u5bfc\u51fa<code>wgt<\/code>\u5305<\/li>\n<li>\u5bbf\u4e3b\u5f00\u53d1\u8005\u5c06<code>wgt<\/code>\u96c6\u6210\u5230\u5bbf\u4e3bApp\u4e2d\uff0c\u53ef\u79bb\u7ebf\u96c6\u6210\u76f4\u63a5\u6253\u5305\u8fdb\u53bb\uff0c\u4e5f\u53ef\u4ee5\u5728\u7ebf\u4e0b\u8f7d<code>wgt<\/code><\/li>\n<li>\u901a\u8fc7 uni\u5c0f\u7a0b\u5e8fsdk \u7684<code>api<\/code>\u5c06<code>wgt<\/code>\u8d44\u6e90\u90e8\u7f72\u5230\u8fd0\u884c\u8def\u5f84\uff0c\u7136\u540e\u5373\u53ef\u8df3\u8f6c\u5230\u8be5\u8d44\u6e90\u5bf9\u5e94\u7684\u5c0f\u7a0b\u5e8f\u5e94\u7528\u4e2d<\/li>\n<li>uni\u5c0f\u7a0b\u5e8f\u652f\u6301<code>wgt<\/code>\u5347\u7ea7\uff0c\u53ef\u4ee5\u5728\u5c0f\u7a0b\u5e8f\u4e2d\u76f4\u63a5\u8c03\u7528<code>api<\/code>\u5728\u7ebf\u66f4\u65b0<code>wgt<\/code>\u8d44\u6e90\uff0c\u5373\u70ed\u66f4\u65b0 <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/ask.dcloud.net.cn\/article\/35667\" title=\"\u53c2\u8003\u6587\u6863\">\u53c2\u8003\u6587\u6863<\/a><\/li>\n<\/ul>\n<h2>\u6ce8\u610f<\/h2>\n<ul>\n<li>\u76ee\u524d uni\u5c0f\u7a0b\u5e8fsdk \u4ec5\u652f\u6301\u5728\u539f\u751fApp\u4e2d\u96c6\u6210\u4f7f\u7528\uff0c\u6682\u4e0d\u652f\u6301<code>HBuilderX<\/code>\u6253\u5305\u751f\u6210\u7684App\u4e2d\u96c6\u6210<\/li>\n<li>\u76ee\u524d uni\u5c0f\u7a0b\u5e8fsdk \u4ec5\u652f\u6301\u540c\u65f6\u8fd0\u884c\u4e00\u4e2a\u5c0f\u7a0b\u5e8f\u5b9e\u4f8b\uff0c\u542f\u52a8\u4e0b\u4e00\u4e2a\u5c0f\u7a0b\u5e8f\u9700\u5173\u95ed\u4e0a\u4e00\u4e2a\u5c0f\u7a0b\u5e8f<\/li>\n<li>uni\u5c0f\u7a0b\u5e8fsdk \u65e0\u6cd5\u4f7f\u7528\u63d2\u4ef6\u5e02\u573a\u4e2d\u4ed8\u8d39\u7684\u539f\u751f\u63d2\u4ef6<\/li>\n<\/ul>\n<h2>FAQ<\/h2>\n<p>Q\uff1auni\u5c0f\u7a0b\u5e8fsdk \u4e0e App\u79bb\u7ebfsdk \u7684\u5dee\u522b\u662f\u4ec0\u4e48\uff1f<br \/>\nA\uff1a\u89e3\u51b3\u4e24\u79cd\u4e0d\u540c\u7684\u9700\u6c42\u573a\u666f\uff0c\u524d\u8005\u7684\u4f7f\u7528\u573a\u666f\u662f\u4f60\u5df2\u7ecf\u6709\u539f\u751fApp\uff0c\u5728\u6b64\u57fa\u7840\u4e0a\u6269\u5c55\u5bbf\u4e3bApp\u7684\u5c0f\u7a0b\u5e8f\u80fd\u529b\uff0c\u6216\u8005\u7528\u5c0f\u7a0b\u5e8f\u66ff\u6362\u539f\u751fApp\u7684\u90e8\u5206\u529f\u80fd\u6a21\u5757\uff0c\u4ec5\u652f\u6301uni-app\u5e76\u4f7f\u7528v3\u7f16\u8bd1\u5668\uff1b\u540e\u8005\u7684\u4f7f\u7528\u573a\u666f\u662f\u4f60\u6ca1\u6709\u539f\u751fApp\uff0c\u7528DCloud\u7684\u5de5\u5177\u6765\u5f00\u53d1App\uff0c\u53c8\u4e0d\u60f3\u4f7f\u7528\u4e91\u6253\u5305\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528App\u79bb\u7ebfsdk\u6253\u5305\u53d1\u5e03\u4e3a\u539f\u751fApp\uff0cApp\u79bb\u7ebfsdk\u652f\u63015+ App\u3001uni-app\uff0c\u4e0d\u652f\u6301wap2app\u3002\u867d\u7136App\u79bb\u7ebfsdk\u4e5f\u53ef\u4ee5\u96c6\u6210\u5230\u5df2\u6709\u539f\u751fApp\u4e2d\uff0c\u4f46\u81ea\u4eceuni\u5c0f\u7a0b\u5e8fsdk\u63a8\u51fa\u540e\uff0c\u5c06\u4e0d\u518d\u63a8\u8350\u8fd9\u79cd\u7528\u6cd5\u3002<\/p>\n<p>Q\uff1a\u60f3\u4e86\u89e3 uni\u5c0f\u7a0b\u5e8fsdk \u90fd\u6709\u54ea\u4e9bjs api\uff0c\u548c\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u76f8\u6bd4\u5982\u4f55\uff1f<br \/>\nA\uff1auni\u5c0f\u7a0b\u5e8fsdk\u7684js api\u6bd4\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u66f4\u591a\uff0c\u4e0d\u540c\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684\u201c\u5c0f\u201d\u7684\u9650\u5236\uff0cuni\u5c0f\u7a0b\u5e8fsdk\u7684\u529f\u80fd\u66f4\u63a5\u8fd1\u4e8e\u6b63\u5e38\u7684app\uff0c\u6ca1\u6709\u5305\u4f53\u79ef\u9650\u5236\uff0c\u5e76\u4e14\u63d0\u4f9b\u4e86\u66f4\u4e30\u5bcc\u7684api\uff0c\u4ee5\u652f\u6301\u5b8c\u6574app\u7684\u5f00\u53d1\u3002\u6587\u6863\u548c\u6f14\u793ademo\u89c1\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/uniapp.dcloud.io\/\">https:\/\/uniapp.dcloud.io\/<\/a><\/p>\n<p>Q: uni\u5c0f\u7a0b\u5e8f\u4e0d\u9700\u8981\u96c6\u6210\u5206\u4eab\u3001\u652f\u4ed8\u7b49\u7b2c\u4e09\u65b9\u7684\u529f\u80fd\u3002\u96c6\u6210\u5230\u6211\u7684Android\u9879\u76ee\u4e2dAPK\u7684\u4f53\u79ef\u4f1a\u589e\u52a0\u591a\u5c11\uff1f<br \/>\nA: \u5982\u679c\u6392\u9664\u89c6\u9891\u3001\u5730\u56fe\u3001\u5206\u4eab\u3001\u652f\u4ed8\u3001\u767b\u5f55\u3001\u76f4\u64adpusher\u7b49sdk\uff0c\u53ea\u96c6\u6210\u57fa\u7840\u6a21\u5757\u3002\u5360\u7528APK\u4f53\u79ef\u5927\u5c0f\u5982\u4e0b\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">cpu\u578b\u53f7.so\u9009\u62e9<\/th>\n<th style=\"text-align: left;\">apk\u5360\u7528\u5927\u5c0f<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>armeabi-v7a<\/code><\/td>\n<td style=\"text-align: left;\">\u7ea67MB\u5de6\u53f3<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>armeabi-v7a<\/code>\u3001<code>x86<\/code>\u3001<code>arm64-v8a<\/code><\/td>\n<td style=\"text-align: left;\">\u7ea616MB\u5de6\u53f3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb \u5b98\u7f51\uff1ahttps:\/\/nativesupport.dcloud.net.cn\/ uni\u5c0f\u7a0b\u5e8fSDK\uff0c\u662f\u4e3a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[329,330],"class_list":["post-1322","post","type-post","status-publish","format-standard","hentry","category-uni-app","tag-uni-app","tag-330"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1322"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1322\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}