You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
oa-base/App.vue

53 lines
903 B
Vue

3 months ago
<script>
export default {
2 months ago
methods:{
networkStatusChange(res){
if(res.isConnected){
uni.redirectTo({
url:'/pages/index/index'
})
}else{
uni.redirectTo({
2 months ago
url:'/pages/networko/index',
2 months ago
})
}
}
},
3 months ago
onLaunch: function() {
},
onShow: function() {
2 months ago
uni.getNetworkType({
success:(res)=> {
if(res.networkType==='none') {
uni.redirectTo({
2 months ago
url: '/pages/networko/index',
success:()=>{
plus.navigator.closeSplashscreen()
}
2 months ago
})
2 months ago
}else{
uni.redirectTo({
url:'/pages/index/index',
success:()=>{
plus.navigator.closeSplashscreen()
}
})
}
2 months ago
}
})
2 months ago
uni.onNetworkStatusChange(this.networkStatusChange);
3 months ago
},
onHide: function() {
2 months ago
uni.offNetworkStatusChange(this.networkStatusChange)
3 months ago
}
}
5 months ago
</script>
<style>
3 months ago
/*每个页面公共css */
5 months ago
</style>