// 倒计时 countdown() { var reg = /^\d{2}$/ var ending = new Date(this.days) var now = new Date() if (now >= ending) { clearTimeout(this.timeout) return } var disc = ending - now this.hour = parseInt(disc / 1000 / 60 / 60 % 24) this.hour = !reg.test(this.hour) ? '0' + this.hour : this.hour this.minutes = parseInt(disc / 1000 / 60 % 60) this.minutes = !reg.test(this.minutes) ? '0' + this.minutes : this.minutes this.seconds = parseInt(disc / 1000 % 60) this.seconds = !reg.test(this.seconds) ? '0' + this.seconds : this.seconds this.timeout = setTimeout(this.countdown, 1000) return this.minutes }, // 当前时间往后固定时间 getTime(day) { var today = new Date() var endMouth = today.getMonth() + 1 if (endMouth < 10) { endMouth = '0' + endMouth } var beforMilliseconds = today.getTime() + 1000 * 3600 * 24 * day var beforday = new Date() beforday.setTime(beforMilliseconds) var strYear = beforday.getFullYear() var strDay = beforday.getDate() var strMonth = beforday.getMonth() + 1 let hour = beforday.getHours() let minute = beforday.getMinutes() let second = beforday.getSeconds() if (strMonth < 10) { strMonth = '0' + strMonth } return strYear + '/' + strMonth + '/' + strDay + ' ' + hour + ':' + minute + ':' + second },
created() { this.days = this.getTime(0.03125) },