Commit 16a6f457 by doszhang

dos

parent 87773e2d
......@@ -172,6 +172,10 @@ let agreeSuggestion = false;
//同意按钮闪烁timer
let agreeTimer;
//倒计时canvas
let countDownCanvas;
let countDownCtx;
//记录初始状态下fontsize
const fontSize = parseFloat($('html').css('fontSize'));
......@@ -185,6 +189,12 @@ $('input[name=customize-flag]').attr('placeholder', '也能在这里写你的fla
//署名的placeholder
$('input[name=signature]').attr('placeholder', '准备好了,就在此署名吧').attr('id', 'signature');
//倒计时canvas定义
('.countdown-canvas').html('<canvas id="countDownCanvas" width="' + 254 + '" height="' + 251 + '"></canvas>');
let canvasinfo = initCanvas('countDownCanvas', 254, 251);
countDownCanvas = canvasinfo[0];
countDownCtx = canvasinfo[1];
//初始化小装饰
initDecorate();
......@@ -297,6 +307,8 @@ function showCountDownPage() {
my_notify('请填写名字');
return false;
}
countDownCtx.fillStyle = bgColor;
countDownCtx.fillRect(0, 0, countDownCanvas.width, countDownCanvas.height);
$('.suggest-page .suggest-wrap').addClass('animate');
setTimeout(function () {
$('.suggest-page').fadeOut(300);
......@@ -614,6 +626,15 @@ function fadeInTextUp(text, fadeTime, divName) {
}, 3000);
}
function initCanvas(id, canvasWidth, canvasHeight) {
canvas = $(id)[0];
ctx = canvas.getContext("2d");
ctx.scale(2, 2);
canvas.width = canvasWidth;
canvas.height = canvasHeight;
return [canvas, ctx];
}
function getTranslateDistance(cardinal = 0) {
var wrapInnerTransform = $('.wrap-inner').css('transform');
var wrapInnertop = parseFloat($('.wrap-inner').css('top'));
......
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