diff --git a/pages/index/newindex.vue b/pages/index/newindex.vue index ad5f25a..97592c8 100644 --- a/pages/index/newindex.vue +++ b/pages/index/newindex.vue @@ -40,7 +40,7 @@ 已完成 - {{ threenum.workedNum }} + {{ threenum.workedNum }} 未完成 @@ -117,7 +117,7 @@ {{ item.goodsTitle }} - + @@ -196,6 +196,7 @@ export default { pageSize: 10, totalPages: 0, timer: null, + timer2: null, } }, onShow() { @@ -209,10 +210,19 @@ export default { this.getUserInfo() this.getWarnCount() this.getAppointAndPickNum() - this.getappointment() - // 初始化时间 - this.timeWeekFormat(); + // // 初始化时间 + // this.timeWeekFormat(); + let that = this + that.timeWeekFormat(); + this.timer = setInterval(function () { + that.getappointment() + }, 10000); + + }, + onHide() { + clearInterval(this.timer); + clearInterval(this.timer2); }, onLoad() { this.partnerId = uni.getStorageSync('partnerId') @@ -241,6 +251,8 @@ export default { } else { this.pageNum++ this.getappointment() + clearInterval(this.timer); + this.timer = null; } }, @@ -261,7 +273,7 @@ export default { url: '/pages/xiaoxi/notice' }) }, - goordercount(){ + goordercount() { uni.navigateTo({ url: '/pages/index/neworderStatistic' }) @@ -481,7 +493,11 @@ export default { params: data }) if (res.code == 200) { - this.goodsList = this.goodsList.concat(res.rows) + if (this.pageNum == 1) { + this.goodsList = res.rows + } else { + this.goodsList = this.goodsList.concat(res.rows) + } let total = res.total this.totalPages = Math.ceil(total / this.pageSize); } @@ -504,9 +520,12 @@ export default { minutes = minutes < 10 ? "0" + minutes : minutes; second = second < 10 ? "0" + second : second; - this.dateStr = `${year}-${month}-${day}`; - this.week = `星期${dayCycle}`; - this.time = `${hours}:${minutes}:${second}`; + this.$nextTick(() => { + this.dateStr = `${year}-${month}-${day}`; + this.week = `星期${dayCycle}`; + this.time = `${hours}:${minutes}:${second}`; + }); + } } } @@ -578,6 +597,7 @@ image { width: 56rpx; height: 56rpx; margin-left: 30rpx; + .msg-num { position: absolute; right: -15rpx; diff --git a/pages/index/neworderStatistic.vue b/pages/index/neworderStatistic.vue index 51923ea..ee4766a 100644 --- a/pages/index/neworderStatistic.vue +++ b/pages/index/neworderStatistic.vue @@ -212,7 +212,7 @@ export default { queryParams: { queryTime: null, pageNum: 1, - pageSize: 10, + pageSize: 50, chooseStatus: "1", payType: "", startTime: null, diff --git a/pages/index/selectProject.vue b/pages/index/selectProject.vue index 3d4a85e..98b2d48 100644 --- a/pages/index/selectProject.vue +++ b/pages/index/selectProject.vue @@ -1,15 +1,18 @@