Commit 0828b7ba by kubisk

dos

parent ac61b6ba
...@@ -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];
...@@ -205,7 +205,8 @@ function checkInfo() { ...@@ -205,7 +205,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 {
...@@ -300,6 +301,11 @@ function createPoster() { ...@@ -300,6 +301,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();
...@@ -313,7 +319,8 @@ function createPoster() { ...@@ -313,7 +319,8 @@ function createPoster() {
logoObj.onload = function () { logoObj.onload = function () {
txtDraw(posterCtx, username, '#464646', 520 * 2, 300 * 2, 45 * 2, 'bolder'); txtDraw(posterCtx, username, '#464646', 520 * 2, 300 * 2, 45 * 2, 'bolder');
txtDraw(posterCtx, '中信保诚人寿', '#464646', 520 * 2, 337 * 2, 20 * 2); txtDraw(posterCtx, '中信保诚人寿', '#464646', 520 * 2, 337 * 2, 20 * 2);
txtDraw(posterCtx, company + '分公司', '#464646', 520 * 2, 365 * 2, 20 * 2); txtDraw(posterCtx, company, '#464646', 520 * 2, 365 * 2, 20 * 2);
// txtDraw(posterCtx, company + '分公司', '#464646', 520 * 2, 365 * 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) {
...@@ -418,12 +425,12 @@ function bindUpload(that, ctx, myCanvas, index, callback, imgInfo) { ...@@ -418,12 +425,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