Commit 90f4700e by kubisk

dos

parent 7ff9ce2b
...@@ -73,8 +73,8 @@ preloadimages(preloadImageList, function () { ...@@ -73,8 +73,8 @@ preloadimages(preloadImageList, function () {
initPage(); initPage();
$('.page1').show(); $('.page1').show();
$('input[name=name]').attr('placeholder', '请输入姓名').attr('id', 'name').attr('value', '一'); $('input[name=name]').attr('placeholder', '请输入姓名').attr('id', 'name');
$('input[name=job-number]').attr('placeholder', '请输入工号').attr('type', 'tel').attr('value', '123456'); $('input[name=job-number]').attr('placeholder', '请输入工号').attr('type', 'tel');
let canvasinfo = initCanvas('.upload-canvas-block', 'uploadCanvas', 640 * 2, canvasHeight * 2); let canvasinfo = initCanvas('.upload-canvas-block', 'uploadCanvas', 640 * 2, canvasHeight * 2);
uploadCanvas = canvasinfo[0]; uploadCanvas = canvasinfo[0];
uploadCtx = canvasinfo[1]; uploadCtx = canvasinfo[1];
...@@ -161,7 +161,8 @@ function checkInfo() { ...@@ -161,7 +161,8 @@ function checkInfo() {
toUploadPage(); toUploadPage();
showIcon(); showIcon();
$('.username').text(username); $('.username').text(username);
$('.company').html('中信保诚人寿<br/>' + company + '分公司'); $('.company').html('中信保诚人寿<br/>' + company);
// $('.company').html('中信保诚人寿<br/>' + company + '分公司');
setShare(); setShare();
} else { } else {
...@@ -256,6 +257,11 @@ function createPoster() { ...@@ -256,6 +257,11 @@ function createPoster() {
posterCanvas = canvasinfo[0]; posterCanvas = canvasinfo[0];
posterCtx = canvasinfo[1]; posterCtx = canvasinfo[1];
posterCtx.fillStyle = "#ffffff";
posterCtx.beginPath();
posterCtx.fillRect(0, 0, posterCanvas.width, posterCanvas.height);
posterCtx.closePath();
showIcon(); showIcon();
var photo = new Image(); var photo = new Image();
...@@ -269,7 +275,8 @@ function createPoster() { ...@@ -269,7 +275,8 @@ function createPoster() {
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, '中信保诚人寿', '#464646', 522 * 2, 268 * 2, 20 * 2); txtDraw(posterCtx, '中信保诚人寿', '#464646', 522 * 2, 268 * 2, 20 * 2);
txtDraw(posterCtx, company + '分公司', '#464646', 522 * 2, 295 * 2, 20 * 2); txtDraw(posterCtx, company, '#464646', 522 * 2, 295 * 2, 20 * 2);
// txtDraw(posterCtx, company + '分公司', '#464646', 522 * 2, 295 * 2, 20 * 2);
var titleObj = new Image(); var titleObj = new Image();
var jobTitle = (level == 1 || level == 2 || level == 3) ? level : false; var jobTitle = (level == 1 || level == 2 || level == 3) ? level : false;
if (jobTitle) { if (jobTitle) {
...@@ -374,12 +381,12 @@ function bindUpload(that, ctx, myCanvas, index, callback, imgInfo) { ...@@ -374,12 +381,12 @@ function bindUpload(that, ctx, myCanvas, index, callback, imgInfo) {
imgInfo = { imgInfo = {
x: 0, x: 0,
y: 0, y: 0,
scale: 1, scale: 0.5,
rotation: 0 rotation: 0
}, oldpoz = { }, oldpoz = {
x: 0, x: 0,
y: 0, y: 0,
scale: 1, scale: 0.5,
rotation: 0 rotation: 0
} }
event.preventDefault(); event.preventDefault();
......
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