Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
maf
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
f3ea629e
authored
Jan 17, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
4fbab266
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
Public/static/js/common.js
+13
-5
No files found.
Public/static/js/common.js
View file @
f3ea629e
...
...
@@ -86,6 +86,8 @@ let submitStatus = true;
let
checkedRule
=
false
;
//滚动防抖定时器
let
timer
;
//海报生成状态
let
posterStatus
=
false
;
let
myScroll
;
...
...
@@ -251,9 +253,13 @@ function showRule() {
}
function
retry
()
{
initQuestion
();
$
(
'.poster-page'
).
hide
();
$
(
'.question-page'
).
show
();
if
(
posterStatus
)
{
initQuestion
();
$
(
'.poster-page'
).
hide
();
$
(
'.question-page'
).
show
();
posterStatus
=
false
;
}
}
function
submit
()
{
...
...
@@ -297,11 +303,12 @@ function submit() {
}
function
tryprize
()
{
$
(
'.prize-page'
).
show
();
if
(
posterStatus
)
{
$
(
'.prize-page'
).
show
();
}
}
function
createPoster
(
callback
)
{
console
.
log
(
resultType
);
MtaH5
.
clickStat
(
canvasArr
[
resultType
-
1
][
7
]);
...
...
@@ -377,6 +384,7 @@ function createPoster(callback) {
drawRoundRectImg
(
posterCtx
,
designPxToRealPx
(
5
)
*
2
,
designPxToRealPx
(
canvasArr
[
resultType
-
1
][
5
]),
designPxToRealPx
(
canvasArr
[
resultType
-
1
][
4
]),
designPxToRealPx
(
46
)
*
2
,
designPxToRealPx
(
46
)
*
2
,
headimg
);
txtDraw
(
posterCtx
,
'@'
+
window
.
nickname
,
designPxToRealPx
(
canvasArr
[
resultType
-
1
][
5
]
+
128
),
designPxToRealPx
(
canvasArr
[
resultType
-
1
][
4
]
+
84
),
designPxToRealPx
(
20
),
'normal'
,
canvasArr
[
resultType
-
1
][
6
]);
$
(
'.posterImg'
).
attr
(
'src'
,
getManBase64
(
posterCanvas
));
posterStatus
=
true
;
callback
();
}
}
...
...
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