更新
This commit is contained in:
parent
ea3f8f8a84
commit
baea439695
1
App.vue
1
App.vue
@ -38,6 +38,7 @@
|
|||||||
data
|
data
|
||||||
} = await userInfo();
|
} = await userInfo();
|
||||||
this.$store.commit('setUserInfo', data);
|
this.$store.commit('setUserInfo', data);
|
||||||
|
this.$isResolve()
|
||||||
// uni.$emit('home_initUserInfo', data);
|
// uni.$emit('home_initUserInfo', data);
|
||||||
return ;
|
return ;
|
||||||
}catch(e){
|
}catch(e){
|
||||||
|
@ -2,8 +2,8 @@ let httpApiThree;
|
|||||||
let httpApi; // 总域名
|
let httpApi; // 总域名
|
||||||
let httpApiTwo; // 物流系统域名
|
let httpApiTwo; // 物流系统域名
|
||||||
|
|
||||||
const env = 'dev'; // 开发
|
// const env = 'dev'; // 开发
|
||||||
// const env = 'prod'; // 生产
|
const env = 'prod'; // 生产
|
||||||
// const env = 'prew'; // 预上线
|
// const env = 'prew'; // 预上线
|
||||||
|
|
||||||
switch(env){
|
switch(env){
|
||||||
|
4
main.js
4
main.js
@ -14,6 +14,10 @@ Vue.use(mybtn)
|
|||||||
Vue.use(company)
|
Vue.use(company)
|
||||||
|
|
||||||
// initRouter()
|
// initRouter()
|
||||||
|
// 让app的onLaunch先执行,主要是用来进行登录
|
||||||
|
Vue.prototype.$onLaunched = new Promise(resolve => {
|
||||||
|
Vue.prototype.$isResolve = resolve
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
// #ifndef VUE3
|
// #ifndef VUE3
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
"name" : "里海社区",
|
"name" : "里海社区",
|
||||||
"appid" : "__UNI__B5B1EDD",
|
"appid" : "__UNI__B5B1EDD",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.6",
|
"versionName" : "1.0.8",
|
||||||
"versionCode" : 106,
|
"versionCode" : 108,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
@ -239,7 +239,8 @@
|
|||||||
showOaHomeData: false, //更新首页计算的值
|
showOaHomeData: false, //更新首页计算的值
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
async onLoad() {
|
||||||
|
await this.$onLaunched;
|
||||||
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO")).is_captain
|
this.is_captain = JSON.parse(uni.getStorageSync("USER_INFO")).is_captain
|
||||||
this.options.data = bj;
|
this.options.data = bj;
|
||||||
// uni.$on('home_initUserInfo', (data=null)=>{
|
// uni.$on('home_initUserInfo', (data=null)=>{
|
||||||
@ -257,9 +258,10 @@
|
|||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
onShow() {
|
async onShow() {
|
||||||
// this.getUserIndex()
|
// this.getUserIndex()
|
||||||
// this.getIndexList()
|
// this.getIndexList()
|
||||||
|
await this.$onLaunched;
|
||||||
if(uni.getStorageSync('uniMP'))this.uniMP = true;
|
if(uni.getStorageSync('uniMP'))this.uniMP = true;
|
||||||
userInfo().then(({data})=>{
|
userInfo().then(({data})=>{
|
||||||
this.$store.commit('setUserInfo', data);
|
this.$store.commit('setUserInfo', data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user