Commit dcddddc4 by zhanghaozhe

周年庆

parent 8b1e6bde
......@@ -532,8 +532,7 @@ class Anniversary2020 extends Component {
}
setupCountDown = (totalSeconds) => {
this.countDownTimer = setTimeout(() => {
totalSeconds--
totalSeconds -= 60
const d = Math.floor(totalSeconds / 60 / 60 / 24)
const h = Math.floor(totalSeconds / 60 / 60) % 24
const m = Math.floor(totalSeconds / 60) % 60
......@@ -541,12 +540,13 @@ class Anniversary2020 extends Component {
countDown: `${d}${h}${m}分`,
}, () => {
if (totalSeconds > 0) {
this.countDownTimer = setTimeout(() => {
this.setupCountDown(totalSeconds)
}, 1000 * 60)
} else {
this.getActivityStage()
}
});
}, 1000 * 60)
}
render() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment