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
7051fca6
authored
Jan 09, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
d2bf031a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
Public/static/js/common.js
+14
-0
No files found.
Public/static/js/common.js
View file @
7051fca6
...
@@ -391,6 +391,8 @@ function createPoster() {
...
@@ -391,6 +391,8 @@ function createPoster() {
decorate
.
onload
=
function
()
{
decorate
.
onload
=
function
()
{
posterCtx
.
drawImage
(
decorate
,
pxToRem
(
170
),
pxToRem
(
305
),
pxToRem
(
300
),
pxToRem
(
150
));
posterCtx
.
drawImage
(
decorate
,
pxToRem
(
170
),
pxToRem
(
305
),
pxToRem
(
300
),
pxToRem
(
150
));
flagTextDraw
(
posterCtx
,
signature
,
pxToRem
(
40
),
'#222222'
,
pxToRem
(
230
),
bottomHalfTop
+
pxToRem
(
103
));
flagTextDraw
(
posterCtx
,
signature
,
pxToRem
(
40
),
'#222222'
,
pxToRem
(
230
),
bottomHalfTop
+
pxToRem
(
103
));
flagTextDraw
(
posterCtx
,
getTime
(),
pxToRem
(
20
),
'#222222'
,
pxToRem
(
230
),
bottomHalfTop
+
pxToRem
(
136
));
}
}
}
}
}
}
...
@@ -924,4 +926,15 @@ function calculateStringLength(str) {
...
@@ -924,4 +926,15 @@ function calculateStringLength(str) {
}
}
}
}
return
len
;
return
len
;
}
function
getTime
()
{
let
date
=
new
Date
();
let
year
=
date
.
getFullYear
();
let
month
=
date
.
getMonth
()
+
1
;
let
day
=
date
.
getDate
();
let
hour
=
date
.
getHours
()
<
10
?
"0"
+
date
.
getHours
()
:
date
.
getHours
();
let
minute
=
date
.
getMinutes
()
<
10
?
"0"
+
date
.
getMinutes
()
:
date
.
getMinutes
();
return
'立于'
+
year
+
'/'
+
month
+
'/'
+
day
+
' '
+
hour
+
':'
+
minute
;
}
}
\ No newline at end of file
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