倒计时优化

develop
jialong.yu 3 years ago
parent 9e5a041508
commit f6b96bacf3
  1. 16
      src/components/TestPanel.vue

@ -469,14 +469,14 @@ export default {
let leave1 = counterTime % (24 * 3600) // let leave1 = counterTime % (24 * 3600) //
let leave2 = leave1 % 3600 // let leave2 = leave1 % 3600 //
let leave3 = leave2 % 60 // let leave3 = leave2 % 60 //
let day = Math.floor(counterTime / (24 * 3600 * 1)) // let day = Math.floor(counterTime / (24 * 3600)) //
let hour = Math.floor(leave1 / (3600 * 1)) // let hour = Math.floor(leave1 / 3600) //
let minutes = Math.floor(leave2 / (60 * 1)) // let minutes = Math.floor(leave2 / 60) //
let seconds = Math.round(leave3 / 1) // let seconds = Math.round(leave3) //
day = day >= 10 ? day : "0" + day day = this.timeFormat(day)
hour = hour >= 10 ? hour : "0" + hour hour = this.timeFormat(hour)
minutes = minutes >= 10 ? minutes : "0" + minutes minutes = this.timeFormat(minutes)
seconds = seconds >= 10 ? seconds : "0" + seconds seconds = this.timeFormat(seconds)
this.day = day this.day = day
this.hour = hour this.hour = hour
this.minutes = minutes this.minutes = minutes

Loading…
Cancel
Save