|
|
|
@ -216,7 +216,13 @@ |
|
|
|
uni.getNetworkType({ |
|
|
|
success: (res) => { |
|
|
|
console.log(res.networkType, s); |
|
|
|
if (res.networkType !== 'none') { |
|
|
|
if (res.networkType == 'none') { |
|
|
|
uni.showToast({ |
|
|
|
icon: 'none', |
|
|
|
title: 'Please connect to the network', |
|
|
|
duration: 3000, |
|
|
|
}) |
|
|
|
} else if (res.networkType !== 'none') { |
|
|
|
that.typee = 2; |
|
|
|
clearInterval(time); |
|
|
|
let home = 'HOME' |
|
|
|
@ -244,7 +250,7 @@ |
|
|
|
}) |
|
|
|
s++; |
|
|
|
}, 5000); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
@ -323,18 +329,18 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
checkNetwork(){ |
|
|
|
checkNetwork() { |
|
|
|
uni.getNetworkType({ |
|
|
|
complete:function(res){ |
|
|
|
complete: function(res) { |
|
|
|
// console.log(res.networkType) |
|
|
|
if(res.networkType=='none'){ |
|
|
|
setTimeout(()=>{ |
|
|
|
if (res.networkType == 'none') { |
|
|
|
setTimeout(() => { |
|
|
|
uni.showToast({ |
|
|
|
icon:'none', |
|
|
|
title:'Please connect to the network', |
|
|
|
duration:3000, |
|
|
|
icon: 'none', |
|
|
|
title: 'Please connect to the network', |
|
|
|
duration: 3000, |
|
|
|
}) |
|
|
|
},200) |
|
|
|
}, 200) |
|
|
|
// return false |
|
|
|
} |
|
|
|
} |
|
|
|
|