Commit 7051fca6 by doszhang

dos

parent d2bf031a
...@@ -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
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