Browse Source

修改IOS白屏问题

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

54
pages/index/index.vue

@ -156,26 +156,26 @@
}, 2000)
},
onReady() {
// onReady() {
//
// typee = 2
//(IOS)
let that = this;
let s = 0;
let time = setInterval(()=>{
console.log('6666')
uni.getNetworkType({
success:(res)=>{
console.log(res.networkType,s);
if(res.networkType !== 'none'){
that.typee = 2;
clearInterval(time);
console.log('清楚网络..')
}
}
})
s++;
},1000);
// let that = this;
// let s = 0;
// let time = setInterval(()=>{
// console.log('6666')
// uni.getNetworkType({
// success:(res)=>{
// console.log(res.networkType,s);
// if(res.networkType !== 'none'){
// that.typee = 2;
// clearInterval(time);
// console.log('..')
// }
// }
// })
// s++;
// },1000);
/* uni.getNetworkType({
success: function(res) {
console.log(res.networkType);
@ -201,8 +201,20 @@
}, 3000)
}
}); */
},
// },
onLoad() {
let that = this;
let s = 0;
let time = setInterval(()=>{
console.log('6666')
uni.getNetworkType({
success:(res)=>{
console.log(res.networkType,s);
if(res.networkType !== 'none'){
that.typee = 2;
// clearInterval(time);
// console.log('..')
let home = 'HOME'
this.getIndex(home)
this.isLogin = uni.getStorageSync('isLogin')
@ -223,7 +235,11 @@
});
}
}
}
})
s++;
},5000);
},
mounted() {

Loading…
Cancel
Save