From 2e44eb91b1f04b72f4a3893c287250d42af72ff6 Mon Sep 17 00:00:00 2001 From: leiyilu <1509167646@qq.com> Date: Tue, 28 Jun 2022 23:53:58 +0800 Subject: [PATCH] ... --- apps/Note.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/Note.js b/apps/Note.js index 8252312..cdf73e1 100644 --- a/apps/Note.js +++ b/apps/Note.js @@ -123,6 +123,9 @@ export async function Note(e, { } // console.log(data.expeditions) for (let val of data.expeditions) { + if(val.remained_time<= 0){ + val.percentage=100; + } if (val.remained_time > 0) { // console.log(val.remained_time) val.dq_time = val.remained_time; @@ -137,7 +140,6 @@ export async function Note(e, { time_cha = 12; } val.percentage = ((val.dq_time / 60 / 60 * 1 / time_cha) * 100 / 10).toFixed(0) * 10; - if(val.dq_time==0) val.percentage=100; let remainedDate = new Date(val.remained_time); val.remained_time = format("hh:mm", remainedDate); let Time_day = await dateTime_(remainedDate)