Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
chinaamc-2020flag
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b65ab595
authored
Jan 09, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
b2a279fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
Public/static/js/common.js
+23
-3
No files found.
Public/static/js/common.js
View file @
b65ab595
...
...
@@ -191,7 +191,7 @@ $('input[name=signature]').attr('placeholder', '准备好了,就在此署名
//倒计时canvas定义
let
canvasinfo
=
initCanvas
(
'.countdown-canvas'
,
'countDownCanvas'
,
254
,
25
1
,
true
);
let
canvasinfo
=
initCanvas
(
'.countdown-canvas'
,
'countDownCanvas'
,
254
,
25
4
,
true
);
countDownCanvas
=
canvasinfo
[
0
];
countDownCtx
=
canvasinfo
[
1
];
...
...
@@ -308,8 +308,8 @@ function showCountDownPage() {
return
false
;
}
$
(
'.countdown-page'
).
css
(
'background'
,
bgColor
);
countDownCtx
.
fillStyle
=
bgColor
;
countDownCtx
.
fillRect
(
0
,
0
,
countDownCanvas
.
width
,
countDownCanvas
.
height
);
countDownCtx
(
);
$
(
'.countdown-page'
).
show
();
$
(
'.suggest-page .suggest-wrap'
).
addClass
(
'animate'
);
setTimeout
(
function
()
{
...
...
@@ -317,6 +317,16 @@ function showCountDownPage() {
},
500
);
}
function
countDownCtx
()
{
let
angle
=
360
;
let
Timer
;
countDownCtx
.
fillStyle
=
'#000'
;
setInterval
(
function
()
{
angle
+=
3.6
;
countDownCtx
.
sector
(
countDownCanvas
.
width
/
4
,
countDownCanvas
.
height
/
4
,
countDownCanvas
.
width
/
4
,
angle
);
},
10
);
}
function
agreeSuggest
()
{
$
(
'.suggest-page .agree'
).
hide
();
$
(
'.suggest-page .agree-active'
).
show
();
...
...
@@ -643,6 +653,16 @@ function initCanvas(target, id, canvasWidth, canvasHeight, useRem = false) {
return
[
canvas
,
ctx
];
}
CanvasRenderingContext2D
.
prototype
.
sector
=
function
(
x
,
y
,
r
,
angle1
,
angle2
)
{
this
.
save
();
this
.
beginPath
();
this
.
moveTo
(
x
,
y
);
this
.
arc
(
x
,
y
,
r
,
angle1
*
Math
.
PI
/
180
,
angle2
*
Math
.
PI
/
180
,
false
);
this
.
closePath
();
this
.
restore
();
return
this
;
}
function
getTranslateDistance
(
cardinal
=
0
)
{
var
wrapInnerTransform
=
$
(
'.wrap-inner'
).
css
(
'transform'
);
var
wrapInnertop
=
parseFloat
(
$
(
'.wrap-inner'
).
css
(
'top'
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment