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
0dc4a522
authored
Oct 23, 2020
by
dos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
170d772b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
12 deletions
+27
-12
Public/static/css/index.css
+3
-1
Public/static/image2/logo.png
+0
-0
Public/static/js/common.js
+24
-11
No files found.
Public/static/css/index.css
View file @
0dc4a522
...
@@ -153,6 +153,7 @@ input[name=job-number] {
...
@@ -153,6 +153,7 @@ input[name=job-number] {
z-index
:
1
;
z-index
:
1
;
}
}
.btn-createposter
{
.btn-createposter
,
.btn-next
{
z-index
:
2
;
z-index
:
2
;
}
}
\ No newline at end of file
Public/static/image2/logo.png
0 → 100644
View file @
0dc4a522
21.2 KB
Public/static/js/common.js
View file @
0dc4a522
...
@@ -96,6 +96,7 @@ $(document).ready(function () {
...
@@ -96,6 +96,7 @@ $(document).ready(function () {
$
(
'input[name=btn-upload]'
).
change
(
function
()
{
$
(
'input[name=btn-upload]'
).
change
(
function
()
{
$
(
'.hide-block'
).
hide
();
$
(
'.hide-block'
).
hide
();
$
(
'.show-block'
).
show
();
$
(
'.show-block'
).
show
();
showIcon
();
bindUpload
(
this
,
uploadCtx
,
uploadCanvas
,
1
,
function
(
img
,
imgInfo
)
{
bindUpload
(
this
,
uploadCtx
,
uploadCanvas
,
1
,
function
(
img
,
imgInfo
)
{
$
(
'.btn-upload-block'
).
css
(
'left'
,
'53px'
);
$
(
'.btn-upload-block'
).
css
(
'left'
,
'53px'
);
$
(
'.btn-createposter'
).
show
();
$
(
'.btn-createposter'
).
show
();
...
@@ -121,6 +122,19 @@ $(document).ready(function () {
...
@@ -121,6 +122,19 @@ $(document).ready(function () {
// $('.poster-page .btn-change').on('click', changePoster);
// $('.poster-page .btn-change').on('click', changePoster);
});
});
function
showIcon
()
{
if
(
level
==
1
)
{
$
(
'.mdrt-1'
).
show
();
$
(
'.mdrt-2'
).
hide
();
}
else
if
(
level
==
2
)
{
$
(
'.mdrt-2'
).
show
();
$
(
'.mdrt-1'
).
hide
();
}
else
{
$
(
'.mdrt-1'
).
hide
();
$
(
'.mdrt-2'
).
hide
();
}
}
function
toUploadPage
()
{
function
toUploadPage
()
{
$
(
'.page1'
).
hide
();
$
(
'.page1'
).
hide
();
$
(
'.upload-page'
).
show
();
$
(
'.upload-page'
).
show
();
...
@@ -251,8 +265,7 @@ function createPoster() {
...
@@ -251,8 +265,7 @@ function createPoster() {
posterCanvas
=
canvasinfo
[
0
];
posterCanvas
=
canvasinfo
[
0
];
posterCtx
=
canvasinfo
[
1
];
posterCtx
=
canvasinfo
[
1
];
$
(
'.poster'
).
hide
();
showIcon
();
$
(
'.poster'
+
level
).
show
();
var
photo
=
new
Image
();
var
photo
=
new
Image
();
photo
.
src
=
getManBase64
(
uploadCanvas
);
photo
.
src
=
getManBase64
(
uploadCanvas
);
...
@@ -260,18 +273,18 @@ function createPoster() {
...
@@ -260,18 +273,18 @@ function createPoster() {
photo
.
onload
=
function
()
{
photo
.
onload
=
function
()
{
posterCtx
.
drawImage
(
photo
,
0
,
0
,
posterCanvas
.
width
,
posterCanvas
.
height
);
posterCtx
.
drawImage
(
photo
,
0
,
0
,
posterCanvas
.
width
,
posterCanvas
.
height
);
var
posterTop
Obj
=
new
Image
();
var
logo
Obj
=
new
Image
();
posterTopObj
.
src
=
'/Public/static/image2/poster'
+
level
+
'-1.png?version=1.0.0
'
;
logoObj
.
src
=
'/Public/static/image2/logo.png
'
;
posterTop
Obj
.
onload
=
function
()
{
logo
Obj
.
onload
=
function
()
{
txtDraw
(
posterCtx
,
username
,
'#fff'
,
598
*
2
,
347
*
2
,
45
*
2
,
'bolder'
);
//
txtDraw(posterCtx, username, '#fff', 598 * 2, 347 * 2, 45 * 2, 'bolder');
txtDraw
(
posterCtx
,
'中信保诚人寿'
,
'#fff'
,
598
*
2
,
381
*
2
,
20
*
2
);
//
txtDraw(posterCtx, '中信保诚人寿', '#fff', 598 * 2, 381 * 2, 20 * 2);
txtDraw
(
posterCtx
,
company
+
'分公司'
,
'#fff'
,
598
*
2
,
407
*
2
,
20
*
2
);
//
txtDraw(posterCtx, company + '分公司', '#fff', 598 * 2, 407 * 2, 20 * 2);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
posterCtx
.
drawImage
(
posterTopObj
,
38
*
2
,
0
,
564
*
2
,
153
*
2
);
posterCtx
.
drawImage
(
logoObj
,
52
*
2
,
38
*
2
,
243
*
2
,
67
*
2
);
var
posterBottomObj
=
new
Image
();
var
posterBottomObj
=
new
Image
();
posterBottomObj
.
src
=
'/Public/static/image2/poster
'
+
level
+
'-2.png?version=1.0.0
'
;
posterBottomObj
.
src
=
'/Public/static/image2/poster
-bottom.png
'
;
posterBottomObj
.
onload
=
function
()
{
posterBottomObj
.
onload
=
function
()
{
posterCtx
.
drawImage
(
posterBottomObj
,
0
,
(
canvasHeight
-
281
)
*
2
,
posterCanvas
.
width
,
28
1
*
2
);
posterCtx
.
drawImage
(
posterBottomObj
,
0
,
(
canvasHeight
-
521
)
*
2
,
posterCanvas
.
width
,
52
1
*
2
);
$
(
'#notification_area'
).
remove
();
$
(
'#notification_area'
).
remove
();
$
(
'.upload-page'
).
hide
();
$
(
'.upload-page'
).
hide
();
$
(
'.poster-page'
).
show
();
$
(
'.poster-page'
).
show
();
...
...
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