解决在app中断网没有及时更新首页的问题

master
lemon橪 2022-06-24 16:59:04 +08:00
parent 905e965917
commit ca32c11296
2 changed files with 11 additions and 2 deletions

View File

@ -50,7 +50,7 @@
<!-- <integral v-if="item.type == 'integral'" :res="item.options" /> -->
<!-- <spike v-if="item.type == 'spike'" :res="item.options" /> -->
</div>
<u-no-network></u-no-network>
<u-no-network @retry='init' @isConnected='isConnected'></u-no-network>
</div>
</template>
@ -127,7 +127,11 @@ export default {
this.pageData = JSON.parse(res.data.result.pageData);
}
});
},
},
//
isConnected(val){
val ? this.init() : ''
},
/**
* TODO 扫码功能后续还会后续增加

View File

@ -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');