shijian() {const EndTIME = new Date(开始时间变量); const NowTime = new Date(); const usedTime = EndTIME - NowTime; const days = Math.floor(usedTime / (24 * 3600 * 1000)); const leavel = usedTime % (24 * 3600 * 1000); const hours = Math.floor(leavel / (3600 * 1000)); const leavel2 = leavel % (3600 * 1000); const minutes = Math.floor(leavel2 / (60 * 1000)); const leavel3 = leavel2 % (60 * 1000);const seconds = Math.round(leavel3 / 1000);this.day = days < 10 ? `0${days}` : days;this.hour = hours < 10 ? `0${hours}` : hours;this.minutes = minutes < 10 ? `0${minutes}` : minutes;this.second = seconds < 10 ? `0${seconds}` : seconds;},
this.shijian();setInterval(() => {this.shijian();}, 1000);