From 5941c016c8b899b250aac52bf1473808a90ff634 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 22 Sep 2023 10:15:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BB=BB=E5=8A=A1=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E7=9A=84=E7=B1=BB=E5=9E=8B,=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/task/taskItem.vue | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/components/task/taskItem.vue b/components/task/taskItem.vue index c161127..b260f56 100644 --- a/components/task/taskItem.vue +++ b/components/task/taskItem.vue @@ -62,6 +62,15 @@ 进行中 + + + {{extend.not_done_count||0}}/{{extend.total||0}} + + + {{extend.done_count||0}}/{{extend.total||0}} + + 进行中 @@ -106,19 +115,15 @@ }, data() { return { - + extend: {} }; }, - created() { - try { - - } catch (e) { - //TODO handle the exception - } + mounted() { + this.$props.datas.extend ? this.extend = this.$props.datas.extend : null; }, methods: { navTo(url) { - if(this.isTimeInRange()) return Toast('任务正在结算中') + if (this.isTimeInRange()) return Toast('任务正在结算中') if (url) { uni.showLoading({ title: '加载中', @@ -146,7 +151,7 @@ this.navTo(`/subpkg/property/vehicle?task_id=${this.$props.datas?.id}`) } else if (this.$props.datas.type == 33) { let is_show = true; - if(uni.$u.timeFormat(Date.now(), 'yyyy-mm-dd')!=this.$props.datas?.end_time) is_show = false; + if (uni.$u.timeFormat(Date.now(), 'yyyy-mm-dd') != this.$props.datas?.end_time) is_show = false; this.navTo(`/subpkg/blockTransaction/blockTransaction?task_id=${this.$props.datas?.id}&is_show=${is_show}`) } else if (this.$props.datas.type == 34) { this.navTo(`/subpkg/otherTask/otherTask?task_id=${this.$props.datas?.id}`) @@ -158,17 +163,17 @@ const now = new Date(); const startTime = new Date(now.getTime()); const endTime = new Date(now.getTime()); - + // 设置开始时间为当天的 22:55:00 startTime.setHours(22); startTime.setMinutes(55); startTime.setSeconds(0); - + // 设置结束时间为当天的 23:59:59 endTime.setHours(23); endTime.setMinutes(59); endTime.setSeconds(59); - + // 判断当前时间是否在时间范围内 return now >= startTime && now <= endTime; }