diff --git a/pages/tabbar/home/views.vue b/pages/tabbar/home/views.vue index 56f7683..4001ee8 100644 --- a/pages/tabbar/home/views.vue +++ b/pages/tabbar/home/views.vue @@ -50,7 +50,7 @@ - + @@ -127,7 +127,11 @@ export default { this.pageData = JSON.parse(res.data.result.pageData); } }); - }, + }, + // 是否有网络链接 + isConnected(val){ + val ? this.init() : '' + }, /** * TODO 扫码功能后续还会后续增加 diff --git a/uview-ui/components/u-no-network/u-no-network.vue b/uview-ui/components/u-no-network/u-no-network.vue index c784562..867ed5e 100644 --- a/uview-ui/components/u-no-network/u-no-network.vue +++ b/uview-ui/components/u-no-network/u-no-network.vue @@ -58,6 +58,11 @@ uZIndex() { return this.zIndex ? this.zIndex : this.$u.zIndex.noNetwork; } + }, + watch:{ + isConnected(val){ + this.$emit('isConnected',val) + } }, mounted() { this.isIOS = (uni.getSystemInfoSync().platform === 'ios');