Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
citic-honor
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6c332600
authored
Oct 25, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
67451c95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
48 deletions
+3
-48
Public/static/js/common.js
+3
-48
No files found.
Public/static/js/common.js
View file @
6c332600
...
@@ -109,17 +109,6 @@ $(document).ready(function () {
...
@@ -109,17 +109,6 @@ $(document).ready(function () {
});
});
$
(
'.btn-createposter'
).
on
(
'click'
,
createPoster
);
$
(
'.btn-createposter'
).
on
(
'click'
,
createPoster
);
// $('.btn-retry').on('click', () => {
// $('input[name=btn-upload]').click()
// });
// //上传头像确认
// $('.page1 .btn-ok').on('click', confirmAvatar);
// //检查用户输入后生成海报
// $('.page1 .btn-go').on('click', checkInfo);
// //返回到首页
// $('.poster-page .btn-backtohome').on('click', backToHome);
// //换一句
// $('.poster-page .btn-change').on('click', changePoster);
});
});
function
showIcon
()
{
function
showIcon
()
{
...
@@ -278,8 +267,8 @@ function createPoster() {
...
@@ -278,8 +267,8 @@ function createPoster() {
logoObj
.
src
=
'/Public/static/image2/logo.png'
;
logoObj
.
src
=
'/Public/static/image2/logo.png'
;
logoObj
.
onload
=
function
()
{
logoObj
.
onload
=
function
()
{
txtDraw
(
posterCtx
,
username
,
'#464646'
,
522
*
2
,
236
*
2
,
45
*
2
,
'bolder'
);
txtDraw
(
posterCtx
,
username
,
'#464646'
,
522
*
2
,
236
*
2
,
45
*
2
,
'bolder'
);
txtDraw
(
posterCtx
,
'中信保诚人寿'
,
'#
fff
'
,
522
*
2
,
268
*
2
,
20
*
2
);
txtDraw
(
posterCtx
,
'中信保诚人寿'
,
'#
464646
'
,
522
*
2
,
268
*
2
,
20
*
2
);
txtDraw
(
posterCtx
,
company
+
'分公司'
,
'#
fff
'
,
522
*
2
,
295
*
2
,
20
*
2
);
txtDraw
(
posterCtx
,
company
+
'分公司'
,
'#
464646
'
,
522
*
2
,
295
*
2
,
20
*
2
);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
posterCtx
.
drawImage
(
logoObj
,
52
*
2
,
38
*
2
,
243
*
2
,
67
*
2
);
posterCtx
.
drawImage
(
logoObj
,
52
*
2
,
38
*
2
,
243
*
2
,
67
*
2
);
var
posterBottomObj
=
new
Image
();
var
posterBottomObj
=
new
Image
();
...
@@ -299,40 +288,6 @@ function createPoster() {
...
@@ -299,40 +288,6 @@ function createPoster() {
},
500
);
},
500
);
}
}
}
}
// var posterObj = new Image();
// posterObj.src = '/Public/static/image2/poster' + level + '.jpg';
// posterObj.onload = function () {
// posterCtx.drawImage(posterObj, 0, 0, posterCanvas.width, posterCanvas.height);
// $('#notification_area').remove();
// $('.upload-page').hide();
// $('.poster-page').show();
// // var headimgObj = new Image();
// // headimgObj.src = getManBase64(uploadCanvas);
// // headimgObj.onload = function () {
// // posterCtx.beginPath();
// // posterCtx.arc(214 * 2, 446 * 2, 46 * 2, 0, 2 * Math.PI);
// // posterCtx.fillStyle = "#fff"; //填充颜色,默认是黑色
// // posterCtx.fill(); //画实心圆
// // posterCtx.closePath();
// // posterCtx.drawImage(headimgObj, 170 * 2, 402 * 2, 88 * 2, 88 * 2);
// // drawUserInfo(name, business, 20, 'bolder');
// // setTimeout(function () {
// // drawNum();
// // }, 200);
// // setTimeout(function () {
// // $('.poster-canvas .posterimg').remove();
// // $('.poster-canvas').append('<img class="posterimg" />');
// // $('.posterimg').attr('src', getManBase64(posterCanvas));
// // $('.page1').hide();
// // $('.poster-page').show();
// // $('#notification_area').remove();
// // createPosterLock = false;
// // }, 500);
// // }
// }
}
}
function
confirmAvatar
()
{
function
confirmAvatar
()
{
...
@@ -530,7 +485,7 @@ function getX(name, business) {
...
@@ -530,7 +485,7 @@ function getX(name, business) {
function
txtDraw
(
ctx
,
content
,
color
,
x
,
y
,
fontsize
,
fontWeight
=
'normal'
)
{
function
txtDraw
(
ctx
,
content
,
color
,
x
,
y
,
fontsize
,
fontWeight
=
'normal'
)
{
ctx
.
font
=
fontWeight
+
' '
+
fontsize
+
'px zkkh'
;
ctx
.
font
=
fontWeight
+
' '
+
fontsize
+
'px zkkh'
;
var
width
=
ctx
.
measureText
(
content
).
width
;
var
width
=
ctx
.
measureText
(
content
).
width
;
var
cx
=
x
-
width
;
var
cx
=
x
-
width
/
2
;
ctx
.
fillStyle
=
color
;
ctx
.
fillStyle
=
color
;
ctx
.
fillText
(
content
,
cx
,
y
);
ctx
.
fillText
(
content
,
cx
,
y
);
}
}
...
...
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