Commit 1d3013a4 by doszhang

dos

parent 2211372e
......@@ -27,6 +27,7 @@ class IndexController extends Controller
'status' => 1,
'poster' => 1,
'msg' => '查询成功',
'branch'=> '广东',
'step' => 1
));
$referer = $_SERVER['HTTP_REFERER'];
......@@ -50,6 +51,7 @@ class IndexController extends Controller
'status' => 1,
'poster' => $job_number['level'],
'msg' => '查询成功',
'branch'=> $job_number['branch'],
'step' => 1
));
return;
......
......@@ -137,3 +137,9 @@ input[name=job-number] {
.upload-page .bottom {
z-index: 1;
}
.company {
color: #fff;
text-align: right;
font-size: 20px;
}
\ No newline at end of file

73.3 KB | W: | H:

70.6 KB | W: | H:

Public/static/image2/poster1.png
Public/static/image2/poster1.png
Public/static/image2/poster1.png
Public/static/image2/poster1.png
  • 2-up
  • Swipe
  • Onion skin

73.6 KB | W: | H:

71.3 KB | W: | H:

Public/static/image2/poster2.png
Public/static/image2/poster2.png
Public/static/image2/poster2.png
Public/static/image2/poster2.png
  • 2-up
  • Swipe
  • Onion skin

75.2 KB | W: | H:

71.9 KB | W: | H:

Public/static/image2/poster3.png
Public/static/image2/poster3.png
Public/static/image2/poster3.png
Public/static/image2/poster3.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -72,6 +72,7 @@ let createPosterLock = false;
let level = 0;
let username = '';
let company = '';
......@@ -161,6 +162,7 @@ function checkInfo() {
if (resp.status == 1) {
level = resp.poster;
username = name;
company = resp.branch;
toUploadPage();
} else {
$('#notification_area').remove();
......@@ -306,13 +308,16 @@ function createPoster() {
var posterObj = new Image();
posterObj.src = '/Public/static/image2/poster' + level + '.png';
posterObj.onload = function () {
txtDraw(posterCtx, username, '#fff', 531 * 2, 472 * 2, 45 * 2);
txtDraw(posterCtx, username, '#fff', 598 * 2, 347 * 2, 45 * 2, 'bolder');
txtDraw(posterCtx, '中信保诚人寿', '#fff', 598 * 2, 381 * 2, 20 * 2);
txtDraw(posterCtx, company + '分公司', '#fff', 598 * 2, 407 * 2, 20 * 2);
setTimeout(function () {
posterCtx.drawImage(posterObj, 0, 0, posterCanvas.width, posterCanvas.height);
$('#notification_area').remove();
$('.upload-page').hide();
$('.poster-page').show();
$('.username').text(username);
$('.company').html('中信保诚人寿<br/>' + company + '分公司');
$('.show-img').append('<img class="showimg" />');
$('.showimg').attr('src', getManBase64(uploadCanvas));
......@@ -544,10 +549,10 @@ function getX(name, business) {
};
}
function txtDraw(ctx, content, color, x, y, fontsize) {
ctx.font = 'bolder ' + fontsize + 'px zkkh';
function txtDraw(ctx, content, color, x, y, fontsize, fontWeight = 'normal') {
ctx.font = fontWeight + ' ' + fontsize + 'px zkkh';
var width = ctx.measureText(content).width;
var cx = x - width / 2;
var cx = x - width;
ctx.fillStyle = color;
ctx.fillText(content, cx, y);
}
......
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