cyl/master-0804
wangxia 5 months ago
parent c538338dd8
commit 727002278a

@ -370,7 +370,7 @@ export default {
that.G.roundRect1(ctx, (mycenter - 600 ) / 2 - 5, qrTop + 475, 136, 136, 80, baseColor); that.G.roundRect1(ctx, (mycenter - 600 ) / 2 - 5, qrTop + 475, 136, 136, 80, baseColor);
// //
that.G.roundRect1(ctx, (mycenter - 600 ) / 2 + 470, qrTop + 475, 136, 136, 80, baseColor); that.G.roundRect1(ctx, (mycenter - 600 ) / 2 + 470, qrTop + 475, 136, 136, 80, baseColor);
that.G.fillTextLineBreak(ctx, '扫一扫关注我的发单号',mycenter / 2 + 40, canvas.height - 215, '扫一扫关注我的发单号'.length * 54, 58, "#333", 54, 600); // that.G.fillTextLineBreak(ctx, '扫一扫关注我的发单号',(mycenter - '扫一扫关注我的发单号'.length * 54) / 2 + 40, canvas.height - 215, '扫一扫关注我的发单号'.length * 54, 58, "#333", 54, 600); //
// //
that.G.roundRect_yuan(ctx, (mycenter - 360 ) / 2, 110, 360, "#ffffff"); that.G.roundRect_yuan(ctx, (mycenter - 360 ) / 2, 110, 360, "#ffffff");
@ -466,7 +466,6 @@ export default {
}, },
}); });
}, },
// //
setShareJobImg(ctx, canvas, mycenter, funObj) { setShareJobImg(ctx, canvas, mycenter, funObj) {
let that = this; let that = this;
@ -492,15 +491,23 @@ export default {
const img = canvas.createImage(); const img = canvas.createImage();
img.src = res.path; img.src = res.path;
img.onload = () => { img.onload = () => {
let numBase = 200 // info.jobNum = 10000
let numBase2 = numBase + (info.jobNum.toString().length * 88 + "总职位".length * 56 + 80) // info.recruitmentJobNum = 1000
let numBase3 = numBase + (info.jobNum.toString().length * 88 + "总职位".length * 56 + 80) + (info.recruitmentJobNum.toString().length * 88 + "在招数".length * 56 + 80) // info.downNum = 32
let numBase = 150
let numBase2 = numBase + (ctx.measureText(info.jobNum.toString()).width + ctx.measureText("总职位").width + 150)
let numBase3 = numBase2 + (ctx.measureText(info.recruitmentJobNum.toString()).width + ctx.measureText("在招数").width + 150)
that.G.roundRect(ctx, img, (mycenter - 300) / 2, 140, 300, 300, 150); // logo that.G.roundRect(ctx, img, (mycenter - 300) / 2, 140, 300, 300, 150); // logo
that.G.fillTextLineBreak(ctx, info.fullName, (mycenter - info.fullName.length * 80) / 2, 600, info.fullName.length * 80, 200, "#333", 80, 600, "left"); // that.G.fillTextLineBreak(ctx, info.fullName, (mycenter - info.fullName.length * 80) / 2, 600, info.fullName.length * 80, 200, "#333", 80, 600, "left"); //
that.G.fillTextLineBreak(ctx, info.agencyDesp + info.agencyDesp+ info.agencyDesp+ info.agencyDesp+ info.agencyDesp+ info.agencyDesp+ info.agencyDesp+ info.agencyDesp+ info.agencyDesp,numBase - 50, 870,mycenter - 360, 86, "#666", 56, 500,'left'); // slogan that.G.fillTextLineBreak(ctx, info.agencyDesp ,numBase , 870,mycenter - 360, 86, "#666", 56, 500,'left'); // slogan
// that.G.fillTextLineBreak(ctx, "" + info.jobUpdateNum, 140, 400, ("" + info.jobUpdateNum).length * 56, 56, "#999", 56, 500, "left"); // // that.G.fillTextLineBreak(ctx, "" + info.jobUpdateNum, 140, 400, ("" + info.jobUpdateNum).length * 56, 56, "#999", 56, 500, "left"); //
let jobL =info.jobNum.toString().length
let recL =info.recruitmentJobNum.toString().length
let downL =info.downNum.toString().length
// if(){
// }
that.G.fillTextLineBreak(ctx, info.jobNum.toString(), numBase, 760, info.jobNum.toString().length * 80, 88, "#000", 80, 500); // that.G.fillTextLineBreak(ctx, info.jobNum.toString(), numBase, 760, info.jobNum.toString().length * 80, 88, "#000", 80, 500); //
that.G.fillTextLineBreak(ctx, info.recruitmentJobNum.toString(), numBase2, 760, info.recruitmentJobNum.toString().length * 80, 88, "#000", 80, 500); // that.G.fillTextLineBreak(ctx, info.recruitmentJobNum.toString(), numBase2, 760, info.recruitmentJobNum.toString().length * 80, 88, "#000", 80, 500); //
that.G.fillTextLineBreak(ctx, info.downNum.toString(),numBase3, 760, info.downNum.toString().length * 80, 88, "#000", 80, 500); // that.G.fillTextLineBreak(ctx, info.downNum.toString(),numBase3, 760, info.downNum.toString().length * 80, 88, "#000", 80, 500); //
@ -509,9 +516,13 @@ export default {
console.log('info.jobNum.toString().length * 88',info.jobNum.toString().length * 88); console.log('info.jobNum.toString().length * 88',info.jobNum.toString().length * 88);
that.G.fillTextLineBreak(ctx, "总职位",numBase + info.jobNum.toString().length * 70, 755, "总职位".length * 56, 56, "#666", 56, 400); // // that.G.fillTextLineBreak(ctx, "",numBase + (info.jobNum.toString().length <=1 ?70 * 2 :info.jobNum.toString().length * 70), 755, "".length * 56, 56, "#666", 56, 400); //
that.G.fillTextLineBreak(ctx, "在招数", numBase2 + info.recruitmentJobNum.toString().length * 70, 755, "在招数".length * 56, 56, "#666", 56, 400); // // that.G.fillTextLineBreak(ctx, "", numBase2 + (info.recruitmentJobNum.toString().length <=1 ?70 * 2 :info.recruitmentJobNum.toString().length * 70), 755, "".length * 56, 56, "#666", 56, 400); //
that.G.fillTextLineBreak(ctx, "粉丝", numBase3 + info.downNum.toString().length * 60, 755, "粉丝".length * 56, 56, "#666", 56, 400); // // that.G.fillTextLineBreak(ctx, "", numBase3 + (info.downNum.toString().length <=1 ?60 * 2 :info.downNum.toString().length * 60), 755, "".length * 56, 56, "#666", 56, 400); //
that.G.fillTextLineBreak(ctx, "总职位",numBase + (info.jobNum.toString().length <=1 ?60 * 2 :info.jobNum.toString().length * 50), 755, "总职位".length * 56, 56, "#666", 56, 400); //
that.G.fillTextLineBreak(ctx, "在招数", numBase2 + (info.recruitmentJobNum.toString().length <=1 ?60 * 2 :info.recruitmentJobNum.toString().length * 50), 755, "在招数".length * 56, 56, "#666", 56, 400); //
that.G.fillTextLineBreak(ctx, "粉丝", numBase3 + (info.downNum.toString().length <=1 ?40 * 2 :info.downNum.toString().length * 50), 755, "粉丝".length * 56, 56, "#666", 56, 400); //
imgres(canvas); imgres(canvas);
}; };
}, },

Loading…
Cancel
Save