Commit f95fb550 by doszhang

dos

parent e6a0affe
...@@ -444,7 +444,7 @@ input[name=signature]::-webkit-input-placeholder { ...@@ -444,7 +444,7 @@ input[name=signature]::-webkit-input-placeholder {
} }
.countdown-page canvas { .countdown-page canvas {
/* transform: rotate(-90deg); */ transform: rotate(-90deg);
} }
.countdown-num { .countdown-num {
......
...@@ -450,17 +450,17 @@ function showCountDownPage() { ...@@ -450,17 +450,17 @@ function showCountDownPage() {
} }
function countDown(callback) { function countDown(callback) {
let angle = 360; let angle = 0;
let countdown = 3; let countdown = 3;
let timer; let timer;
countDownCtx.fillStyle = bgColor; countDownCtx.fillStyle = bgColor;
timer = setInterval(function () { timer = setInterval(function () {
$('.countdown-num').text(countdown).addClass('animate'); $('.countdown-num').text(countdown).addClass('animate');
angle = ((angle * 10) - 36) / 10; angle = ((angle * 10) + 36) / 10;
countDownCtx.clearRect(0, 0, countDownCanvas.width, countDownCanvas.height); countDownCtx.clearRect(0, 0, countDownCanvas.width, countDownCanvas.height);
countDownCtx.sector(countDownCanvas.width / 2, countDownCanvas.height / 2, countDownCanvas.width / 2, 0, angle).fill(); countDownCtx.sector(countDownCanvas.width / 2, countDownCanvas.height / 2, countDownCanvas.width / 2, 0, angle).fill();
if (angle <= 0) { if (angle >= 360) {
countdown--; countdown--;
if (countdown == 0) { if (countdown == 0) {
clearInterval(timer); clearInterval(timer);
......
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