Commit 0dc4a522 by dos

dos

parent 170d772b
...@@ -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
...@@ -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 posterTopObj = new Image(); var logoObj = new Image();
posterTopObj.src = '/Public/static/image2/poster' + level + '-1.png?version=1.0.0'; logoObj.src = '/Public/static/image2/logo.png';
posterTopObj.onload = function () { logoObj.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, 281 * 2); posterCtx.drawImage(posterBottomObj, 0, (canvasHeight - 521) * 2, posterCanvas.width, 521 * 2);
$('#notification_area').remove(); $('#notification_area').remove();
$('.upload-page').hide(); $('.upload-page').hide();
$('.poster-page').show(); $('.poster-page').show();
......
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