mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-16 23:45:53 +08:00
解决在app中断网没有及时更新首页的问题
This commit is contained in:
@@ -50,7 +50,7 @@
|
|||||||
<!-- <integral v-if="item.type == 'integral'" :res="item.options" /> -->
|
<!-- <integral v-if="item.type == 'integral'" :res="item.options" /> -->
|
||||||
<!-- <spike v-if="item.type == 'spike'" :res="item.options" /> -->
|
<!-- <spike v-if="item.type == 'spike'" :res="item.options" /> -->
|
||||||
</div>
|
</div>
|
||||||
<u-no-network></u-no-network>
|
<u-no-network @retry='init' @isConnected='isConnected'></u-no-network>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -127,7 +127,11 @@ export default {
|
|||||||
this.pageData = JSON.parse(res.data.result.pageData);
|
this.pageData = JSON.parse(res.data.result.pageData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 是否有网络链接
|
||||||
|
isConnected(val){
|
||||||
|
val ? this.init() : ''
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO 扫码功能后续还会后续增加
|
* TODO 扫码功能后续还会后续增加
|
||||||
|
|||||||
@@ -58,6 +58,11 @@
|
|||||||
uZIndex() {
|
uZIndex() {
|
||||||
return this.zIndex ? this.zIndex : this.$u.zIndex.noNetwork;
|
return this.zIndex ? this.zIndex : this.$u.zIndex.noNetwork;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
isConnected(val){
|
||||||
|
this.$emit('isConnected',val)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.isIOS = (uni.getSystemInfoSync().platform === 'ios');
|
this.isIOS = (uni.getSystemInfoSync().platform === 'ios');
|
||||||
|
|||||||
Reference in New Issue
Block a user