diff --git a/src/components/TestPanel.vue b/src/components/TestPanel.vue index afda6f4..2abb299 100644 --- a/src/components/TestPanel.vue +++ b/src/components/TestPanel.vue @@ -469,14 +469,14 @@ export default { let leave1 = counterTime % (24 * 3600) //计算天数后剩余的毫秒数 let leave2 = leave1 % 3600 //计算小时数后剩余的毫秒数 let leave3 = leave2 % 60 //计算分钟数后剩余的毫秒数 - let day = Math.floor(counterTime / (24 * 3600 * 1)) //计算相差天数 - let hour = Math.floor(leave1 / (3600 * 1)) //计算相差小时 - let minutes = Math.floor(leave2 / (60 * 1)) //计算相差分钟 - let seconds = Math.round(leave3 / 1) //计算相差秒 - day = day >= 10 ? day : "0" + day - hour = hour >= 10 ? hour : "0" + hour - minutes = minutes >= 10 ? minutes : "0" + minutes - seconds = seconds >= 10 ? seconds : "0" + seconds + let day = Math.floor(counterTime / (24 * 3600)) //计算相差天数 + let hour = Math.floor(leave1 / 3600) //计算相差小时 + let minutes = Math.floor(leave2 / 60) //计算相差分钟 + let seconds = Math.round(leave3) //计算相差秒 + day = this.timeFormat(day) + hour = this.timeFormat(hour) + minutes = this.timeFormat(minutes) + seconds = this.timeFormat(seconds) this.day = day this.hour = hour this.minutes = minutes