diff --git a/mobile-h5/index.html b/mobile-h5/index.html new file mode 100644 index 00000000..b5d330d1 --- /dev/null +++ b/mobile-h5/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + +
+ + + diff --git a/mobile-h5/main.js b/mobile-h5/main.js new file mode 100644 index 00000000..c1caf360 --- /dev/null +++ b/mobile-h5/main.js @@ -0,0 +1,22 @@ +import App from './App' + +// #ifndef VUE3 +import Vue from 'vue' +import './uni.promisify.adaptor' +Vue.config.productionTip = false +App.mpType = 'app' +const app = new Vue({ + ...App +}) +app.$mount() +// #endif + +// #ifdef VUE3 +import { createSSRApp } from 'vue' +export function createApp() { + const app = createSSRApp(App) + return { + app + } +} +// #endif \ No newline at end of file diff --git a/mobile-h5/manifest.json b/mobile-h5/manifest.json new file mode 100644 index 00000000..c01bfcf9 --- /dev/null +++ b/mobile-h5/manifest.json @@ -0,0 +1,72 @@ +{ + "name" : "mobile-h5", + "appid" : "", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3" +} diff --git a/mobile-h5/static/logo.png b/mobile-h5/static/logo.png new file mode 100644 index 00000000..b5771e20 Binary files /dev/null and b/mobile-h5/static/logo.png differ diff --git a/mobile-h5/uni.promisify.adaptor.js b/mobile-h5/uni.promisify.adaptor.js new file mode 100644 index 00000000..5fec4f33 --- /dev/null +++ b/mobile-h5/uni.promisify.adaptor.js @@ -0,0 +1,13 @@ +uni.addInterceptor({ + returnValue (res) { + if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { + return res; + } + return new Promise((resolve, reject) => { + res.then((res) => { + if (!res) return resolve(res) + return res[0] ? reject(res[0]) : resolve(res[1]) + }); + }); + }, +}); \ No newline at end of file