diff --git a/pages/homeIndex/index.vue b/pages/homeIndex/index.vue index 23a3708..0268cac 100644 --- a/pages/homeIndex/index.vue +++ b/pages/homeIndex/index.vue @@ -59,6 +59,7 @@ const warnetm = moment().format("YYYY-MM-DD HH:mm:ss") import SkInfo from '../skInfo/index.vue' import YlzList from '../ylzList/index.vue' + let timer= null; export default { components: { SkInfo, @@ -143,14 +144,15 @@ }) }, getList() { - uni.$http.post('/gunshiApp/xyt/messageCenter/list', { - start: '', - end: '' - }).then(res => { - if (res.data.code == 200) { - this.messagelist = res.data.data - } - }) + console.log(11); + uni.$http.post('/gunshiApp/xyt/messageCenter/list', { + start: '', + end: '' + }).then(res => { + if (res.data.code == 200) { + this.messagelist = res.data.data + } + }) }, todetailmessgae() { uni.navigateTo({ @@ -253,12 +255,22 @@ }, onShow() { - this.getList(); + var that = this; + that.getList(); + timer = setInterval(function() { + that.getList(); + }, 10000); + this.setInsert() this.getXcrwData(); this.getHandleData(); this.getYjData(); }, + onHide() { + console.log(222); + clearInterval(timer) + timer = null; + }, }