This commit is contained in:
weipengfei 2023-09-09 09:03:38 +08:00
parent ea3f8f8a84
commit baea439695
5 changed files with 13 additions and 6 deletions

View File

@ -38,6 +38,7 @@
data
} = await userInfo();
this.$store.commit('setUserInfo', data);
this.$isResolve()
// uni.$emit('home_initUserInfo', data);
return ;
}catch(e){

View File

@ -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){

View File

@ -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

View File

@ -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" : {

View File

@ -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);