Browse Source

修改IOS白屏问题

master
zhengshuiqi 4 years ago
parent
commit
54ca16d40d
  1. 94
      pages/index/index.vue

94
pages/index/index.vue

@ -156,26 +156,26 @@
}, 2000) }, 2000)
}, },
onReady() { // onReady() {
// //
// typee = 2 // typee = 2
//(IOS) //(IOS)
let that = this; // let that = this;
let s = 0; // let s = 0;
let time = setInterval(()=>{ // let time = setInterval(()=>{
console.log('6666') // console.log('6666')
uni.getNetworkType({ // uni.getNetworkType({
success:(res)=>{ // success:(res)=>{
console.log(res.networkType,s); // console.log(res.networkType,s);
if(res.networkType !== 'none'){ // if(res.networkType !== 'none'){
that.typee = 2; // that.typee = 2;
clearInterval(time); // clearInterval(time);
console.log('清楚网络..') // console.log('..')
} // }
} // }
}) // })
s++; // s++;
},1000); // },1000);
/* uni.getNetworkType({ /* uni.getNetworkType({
success: function(res) { success: function(res) {
console.log(res.networkType); console.log(res.networkType);
@ -201,29 +201,45 @@
}, 3000) }, 3000)
} }
}); */ }); */
}, // },
onLoad() { onLoad() {
let home = 'HOME' let that = this;
this.getIndex(home) let s = 0;
this.isLogin = uni.getStorageSync('isLogin') let time = setInterval(()=>{
// //////console.info(this.curEndTime) console.log('6666')
this.getList() uni.getNetworkType({
this.getMes() success:(res)=>{
this.getPullMes() console.log(res.networkType,s);
this.getInfo() if(res.networkType !== 'none'){
if (this.countdownTime2 != 0) { that.typee = 2;
uni.hideTabBar() // clearInterval(time);
} else if (this.countdownTime2 == 0 || !this.popImg) { // console.log('..')
//uni.showTabBar() let home = 'HOME'
uni.setTabBarStyle({ this.getIndex(home)
backgroundColor: "#fff", this.isLogin = uni.getStorageSync('isLogin')
borderStyle: "black", // //////console.info(this.curEndTime)
// selectedColor: "#999", this.getList()
// color: "#999", this.getMes()
}); this.getPullMes()
} this.getInfo()
if (this.countdownTime2 != 0) {
uni.hideTabBar()
} else if (this.countdownTime2 == 0 || !this.popImg) {
//uni.showTabBar()
uni.setTabBarStyle({
backgroundColor: "#fff",
borderStyle: "black",
// selectedColor: "#999",
// color: "#999",
});
}
}
}
})
s++;
},5000);
}, },
mounted() { mounted() {

Loading…
Cancel
Save