diff --git a/App.vue b/App.vue index 6dc2038..ba75e15 100644 --- a/App.vue +++ b/App.vue @@ -38,6 +38,7 @@ data } = await userInfo(); this.$store.commit('setUserInfo', data); + this.$isResolve() // uni.$emit('home_initUserInfo', data); return ; }catch(e){ diff --git a/config/app.js b/config/app.js index b3b505d..06364d8 100644 --- a/config/app.js +++ b/config/app.js @@ -2,8 +2,8 @@ let httpApiThree; let httpApi; // 总域名 let httpApiTwo; // 物流系统域名 -const env = 'dev'; // 开发 -// const env = 'prod'; // 生产 +// const env = 'dev'; // 开发 +const env = 'prod'; // 生产 // const env = 'prew'; // 预上线 switch(env){ diff --git a/main.js b/main.js index 9f7ad40..47965e2 100644 --- a/main.js +++ b/main.js @@ -14,6 +14,10 @@ Vue.use(mybtn) Vue.use(company) // initRouter() +// 让app的onLaunch先执行,主要是用来进行登录 +Vue.prototype.$onLaunched = new Promise(resolve => { + Vue.prototype.$isResolve = resolve +}) // #ifndef VUE3 diff --git a/manifest.json b/manifest.json index 4a6d424..2935d26 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "里海社区", "appid" : "__UNI__B5B1EDD", "description" : "", - "versionName" : "1.0.6", - "versionCode" : 106, + "versionName" : "1.0.8", + "versionCode" : 108, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/oaHome/oaHome.vue b/pages/oaHome/oaHome.vue index 0094e25..a7db19f 100644 --- a/pages/oaHome/oaHome.vue +++ b/pages/oaHome/oaHome.vue @@ -239,7 +239,8 @@ showOaHomeData: false, //更新首页计算的值 }; }, - onLoad() { + async onLoad() { + await this.$onLaunched; this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO")).is_captain this.options.data = bj; // uni.$on('home_initUserInfo', (data=null)=>{ @@ -257,9 +258,10 @@ }); // #endif }, - onShow() { + async onShow() { // this.getUserIndex() // this.getIndexList() + await this.$onLaunched; if(uni.getStorageSync('uniMP'))this.uniMP = true; userInfo().then(({data})=>{ this.$store.commit('setUserInfo', data);