Commit 22bff923 by doszhang

dos

parent 40ee357e
...@@ -398,4 +398,11 @@ input[name=signature]::-webkit-input-placeholder { ...@@ -398,4 +398,11 @@ input[name=signature]::-webkit-input-placeholder {
.countdown-page canvas { .countdown-page canvas {
transform: rotate(-90deg); transform: rotate(-90deg);
}
.countdown-num {
line-height: 8.95rem;
font-size: 4rem;
text-align: center;
color: #fff;
} }
\ No newline at end of file
...@@ -309,7 +309,9 @@ function showCountDownPage() { ...@@ -309,7 +309,9 @@ function showCountDownPage() {
} }
$('.countdown-page').css('background', bgColor); $('.countdown-page').css('background', bgColor);
countDown(); countDown(function () {
$('.countdown-page').fadeOut(300);
});
$('.countdown-page').show(); $('.countdown-page').show();
$('.suggest-page .suggest-wrap').addClass('animate'); $('.suggest-page .suggest-wrap').addClass('animate');
setTimeout(function () { setTimeout(function () {
...@@ -317,9 +319,11 @@ function showCountDownPage() { ...@@ -317,9 +319,11 @@ function showCountDownPage() {
}, 500); }, 500);
} }
function countDown() { function countDown(callback) {
let angle = -360; let angle = -360;
let countdown = 3;
let timer; let timer;
$('.countdown-num').text(countdown);
countDownCtx.fillStyle = bgColor; countDownCtx.fillStyle = bgColor;
timer = setInterval(function () { timer = setInterval(function () {
angle = ((angle * 10) + 36) / 10; angle = ((angle * 10) + 36) / 10;
...@@ -328,7 +332,10 @@ function countDown() { ...@@ -328,7 +332,10 @@ function countDown() {
console.log(angle); console.log(angle);
if (angle >= 0) { if (angle >= 0) {
countdown--;
clearInterval(timer); clearInterval(timer);
$('.countdown-num').text(countdown);
callback();
} }
}, 10); }, 10);
} }
......
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 sign in to comment