2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-23 03:20:52 +08:00
This commit is contained in:
leiyilu 2022-06-28 23:53:58 +08:00
parent c2f4a3e61c
commit 2e44eb91b1

View File

@ -123,6 +123,9 @@ export async function Note(e, {
} }
// console.log(data.expeditions) // console.log(data.expeditions)
for (let val of data.expeditions) { for (let val of data.expeditions) {
if(val.remained_time<= 0){
val.percentage=100;
}
if (val.remained_time > 0) { if (val.remained_time > 0) {
// console.log(val.remained_time) // console.log(val.remained_time)
val.dq_time = val.remained_time; val.dq_time = val.remained_time;
@ -137,7 +140,6 @@ export async function Note(e, {
time_cha = 12; time_cha = 12;
} }
val.percentage = ((val.dq_time / 60 / 60 * 1 / time_cha) * 100 / 10).toFixed(0) * 10; 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); let remainedDate = new Date(val.remained_time);
val.remained_time = format("hh:mm", remainedDate); val.remained_time = format("hh:mm", remainedDate);
let Time_day = await dateTime_(remainedDate) let Time_day = await dateTime_(remainedDate)