|
|
|
|
@ -111,7 +111,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import _G from "./utils/commonSub.js";
|
|
|
|
|
// import that.G from "./utils/commonSub.js";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {},
|
|
|
|
|
@ -689,7 +689,7 @@ export default {
|
|
|
|
|
bottomSloganTop1 = 2 * 790;
|
|
|
|
|
bottomSloganLeft = 64;
|
|
|
|
|
bottomSloganLeft1 = 64;
|
|
|
|
|
QRSize = 2 * 110;
|
|
|
|
|
QRSize = 2 * 120;
|
|
|
|
|
QRLeft = 900;
|
|
|
|
|
QRTop = 1400;
|
|
|
|
|
}
|
|
|
|
|
@ -715,47 +715,46 @@ export default {
|
|
|
|
|
img.src = res.path;
|
|
|
|
|
img.onload = () => {
|
|
|
|
|
if (that.checkedList.length == 1) {
|
|
|
|
|
_G.roundRect1(ctx, mycenter - 580 / 2, baseTop + 740, 580, 580, 0, "#fff");
|
|
|
|
|
// roundRect1(ctx, mycenter - 600 / 2, baseTop + 750, 600, 560, 0, "#fff");
|
|
|
|
|
_G.roundRect(ctx, img, mycenter - res.width / 2 - 120, baseTop + 770, QRSize, QRSize, 0);
|
|
|
|
|
// _G.roundRect(ctx, img, mycenter - res.width / 2 - 120, baseTop + 770, QRSize, QRSize, 0);
|
|
|
|
|
that.G.roundRect1(ctx, mycenter - 580 / 2, baseTop + 740, 580, 580, 0, "#fff");
|
|
|
|
|
that.G.roundRect(ctx, img, mycenter - res.width / 2 - 120, baseTop + 770, QRSize, QRSize, 0);
|
|
|
|
|
// that.G.roundRect(ctx, img, mycenter - res.width / 2 - 120, baseTop + 770, QRSize, QRSize, 0);
|
|
|
|
|
} else {
|
|
|
|
|
_G.roundRect1(ctx, QRLeft - 10, baseTop + QRTop - 10, QRSize + 20, QRSize + 20, 0, "#fff");
|
|
|
|
|
_G.roundRect(ctx, img, QRLeft, baseTop + QRTop, QRSize, QRSize, 0);
|
|
|
|
|
that.G.roundRect1(ctx, QRLeft - 10, baseTop + QRTop - 10, QRSize + 20, QRSize + 20, 0, "#fff");
|
|
|
|
|
that.G.roundRect(ctx, img, QRLeft, baseTop + QRTop, QRSize, QRSize, 0);
|
|
|
|
|
}
|
|
|
|
|
that.checkedList.forEach((item, index) => {
|
|
|
|
|
let labelLeft = 0;
|
|
|
|
|
console.log("item2", item);
|
|
|
|
|
_G.roundRect1(ctx, 24 * 2, baseTop - 100 + baseMiddle * index, 1104, roundRectHeight, 32, "#fff");
|
|
|
|
|
that.G.roundRect1(ctx, 24 * 2, baseTop - 100 + baseMiddle * index, 1104, roundRectHeight, 32, "#fff");
|
|
|
|
|
item.jobSpecialLabelNameArray.forEach((item1, index1) => {
|
|
|
|
|
if (index1 < 4) {
|
|
|
|
|
_G.fillTextLineBreak(ctx, item1, 60 * 2 + labelLeft, baseTop + markTop + 30 * 2 + baseMiddle * index, 400 * 2, 20, "#333", monthlyPaySize); // 标签字符
|
|
|
|
|
_G.roundRect1(ctx, 52 * 2 + labelLeft, baseTop + markTop + baseMiddle * index, ctx.measureText(item1).width + 16 * 2, 40 * 2, 2 * 2, "#00000010"); // 标签背景色
|
|
|
|
|
that.G.fillTextLineBreak(ctx, item1, 60 * 2 + labelLeft, baseTop + markTop + 30 * 2 + baseMiddle * index, 400 * 2, 20, "#333", monthlyPaySize); // 标签字符
|
|
|
|
|
that.G.roundRect1(ctx, 52 * 2 + labelLeft, baseTop + markTop + baseMiddle * index, ctx.measureText(item1).width + 16 * 2, 40 * 2, 2 * 2, "#00000010"); // 标签背景色
|
|
|
|
|
labelLeft += ctx.measureText(item1).width + 32 * 2;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_G.fillTextLineBreak(ctx, item.jobName, logoLeft, baseTop + baseMiddle * index, 800 * 2, 20, "#333", titleSize, "600"); // 岗位标题
|
|
|
|
|
that.G.fillTextLineBreak(ctx, item.jobName, logoLeft, baseTop + baseMiddle * index, 800 * 2, 20, "#333", titleSize, "600"); // 岗位标题
|
|
|
|
|
|
|
|
|
|
_G.fillTextLineBreak(ctx, item.salaryClassifyValue, logoLeft, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 * 2, 20, "#ff4400", titleSize - 4, "600"); // 时薪
|
|
|
|
|
that.G.fillTextLineBreak(ctx, item.salaryClassifyValue, logoLeft, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 * 2, 20, "#ff4400", titleSize - 4, "600"); // 时薪
|
|
|
|
|
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
_G.fillTextLineBreak(ctx, item.monthlyPay, logoLeft + ctx.measureText(item.salaryClassifyValue + " ").width, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 * 2, 20, "#ff4400", monthlyPaySize, "400"); // 月工资
|
|
|
|
|
that.G.fillTextLineBreak(ctx, item.monthlyPay, logoLeft + ctx.measureText(item.salaryClassifyValue + " ").width, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 * 2, 20, "#ff4400", monthlyPaySize, "400"); // 月工资
|
|
|
|
|
// }, 0);
|
|
|
|
|
|
|
|
|
|
_G.fillTextLineBreak(ctx, item.district, logoLeft, baseTop + ageTop + baseMiddle * index, 500 * 2, 20, "#333", monthlyPaySize); // 省市
|
|
|
|
|
that.G.fillTextLineBreak(ctx, item.district, logoLeft, baseTop + ageTop + baseMiddle * index, 500 * 2, 20, "#333", monthlyPaySize); // 省市
|
|
|
|
|
|
|
|
|
|
_G.fillTextLineBreak(ctx, "丨" + item.age, logoLeft + ctx.measureText(item.district).width, baseTop + ageTop + baseMiddle * index, 500 * 2, 20, "#333", monthlyPaySize); // 年龄
|
|
|
|
|
that.G.fillTextLineBreak(ctx, "丨" + item.age, logoLeft + ctx.measureText(item.district).width, baseTop + ageTop + baseMiddle * index, 500 * 2, 20, "#333", monthlyPaySize); // 年龄
|
|
|
|
|
|
|
|
|
|
_G.fillTextLineBreak(ctx, that.userInfo.fullName || that.userInfo.agencyName, mycenter - ctx.measureText(that.userInfo.fullName || that.userInfo.agencyName).width / 2, fubiaotiTop, 400 * 2, 20, "#fff", monthlyPaySize, "600"); // 代理名称
|
|
|
|
|
that.G.fillTextLineBreak(ctx, that.userInfo.fullName || that.userInfo.agencyName, mycenter - ctx.measureText(that.userInfo.fullName || that.userInfo.agencyName).width / 2, fubiaotiTop, 400 * 2, 20, "#fff", monthlyPaySize, "600"); // 代理名称
|
|
|
|
|
|
|
|
|
|
if (that.checkedList.length == 1) {
|
|
|
|
|
// roundRect1(ctx, mycenter - 600 / 2, baseTop + 750, 600, 560, 32, "#fff");
|
|
|
|
|
// _G.fillTextLineBreak(ctx, "长按查看职位详情", mycenter - ctx.measureText("长按查看职位详情").width / 2, baseTop + bottomSloganTop, 300 * 2, 20, "#fff", monthlyPaySize); // 底部slogan
|
|
|
|
|
_G.fillTextLineBreak(ctx, "长按查看职位详情", mycenter - ctx.measureText("长按查看职位详情").width / 1.45, baseTop + bottomSloganTop1, 500 * 2, 20, "#fff", titleSize); // 底部slogan
|
|
|
|
|
// that.G.fillTextLineBreak(ctx, "长按查看职位详情", mycenter - ctx.measureText("长按查看职位详情").width / 2, baseTop + bottomSloganTop, 300 * 2, 20, "#fff", monthlyPaySize); // 底部slogan
|
|
|
|
|
that.G.fillTextLineBreak(ctx, "长按查看职位详情", (canvas.width - ctx.measureText("长按查看职位详情").width) / 2.25, baseTop + bottomSloganTop1, ctx.measureText("长按查看职位详情").width + 100, 20, "#fff", titleSize); // 底部slogan
|
|
|
|
|
} else {
|
|
|
|
|
_G.fillTextLineBreak(ctx, "长按查看职位详情", bottomSloganLeft, baseTop + bottomSloganTop, 300 * 2, 20, "#fff", monthlyPaySize + 8); // 底部slogan
|
|
|
|
|
_G.fillTextLineBreak(ctx, "好工作 放心干", bottomSloganLeft1, baseTop + bottomSloganTop1, 500 * 2, 20, "#fff", titleSize); // 底部slogan
|
|
|
|
|
that.G.fillTextLineBreak(ctx, "长按查看职位详情", bottomSloganLeft, baseTop + bottomSloganTop, 300 * 2, 20, "#fff", monthlyPaySize + 8); // 底部slogan
|
|
|
|
|
that.G.fillTextLineBreak(ctx, "好工作 放心干", bottomSloganLeft1, baseTop + bottomSloganTop1, 500 * 2, 20, "#fff", titleSize); // 底部slogan
|
|
|
|
|
}
|
|
|
|
|
imgres(canvas);
|
|
|
|
|
//生成logo图片
|
|
|
|
|
@ -769,7 +768,7 @@ export default {
|
|
|
|
|
// img.src = res.path;
|
|
|
|
|
// img.onload = () => {
|
|
|
|
|
// // setTimeout(() => {
|
|
|
|
|
// _G.roundRect(ctx, img, logoLeft, baseTop + 40 + baseMiddle * index, logoSize, logoSize, 8);
|
|
|
|
|
// that.G.roundRect(ctx, img, logoLeft, baseTop + 40 + baseMiddle * index, logoSize, logoSize, 8);
|
|
|
|
|
// // }, 500);
|
|
|
|
|
// if (index == that.checkedList.length - 1) {
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
@ -820,16 +819,16 @@ export default {
|
|
|
|
|
if (index <= 2) {
|
|
|
|
|
let labelLeft = 0;
|
|
|
|
|
console.log("item1", item);
|
|
|
|
|
_G.roundRect1(ctx, 32, baseTop - 60 + baseMiddle * index, 776, roundRectHeight, 24, "#fff");
|
|
|
|
|
_G.fillTextLineBreak(ctx, item.jobName, logoLeft, baseTop + baseMiddle * index, 800, 20, "#333", titleSize, "500"); // 岗位标题
|
|
|
|
|
that.G.roundRect1(ctx, 32, baseTop - 60 + baseMiddle * index, 776, roundRectHeight, 24, "#fff");
|
|
|
|
|
that.G.fillTextLineBreak(ctx, item.jobName, logoLeft, baseTop + baseMiddle * index, 800, 20, "#333", titleSize, "500"); // 岗位标题
|
|
|
|
|
// 薪资位置更新(保留副本)
|
|
|
|
|
// _G.fillTextLineBreak(ctx, item.cus_price == "月薪" ? item.monthlyPay : item.salaryClassifyValue, salaryClassifyValueLeft + 500, baseTop - 10 + salaryClassifyValueTop + baseMiddle * index, 400, 20, "#ff4400", titleSize - 4, "600"); // 时薪
|
|
|
|
|
_G.fillTextLineBreak(ctx, item.cus_price == "月薪" ? item.monthlyPay : item.salaryClassifyValue, canvas.width - ctx.measureText(item.cus_price == "月薪" ? item.monthlyPay : item.salaryClassifyValue).width - 40 , baseTop + ageTop + baseMiddle * index, 400, 20, "#ff4400", titleSize - 4, "600"); // 时薪
|
|
|
|
|
// that.G.fillTextLineBreak(ctx, item.cus_price == "月薪" ? item.monthlyPay : item.salaryClassifyValue, salaryClassifyValueLeft + 500, baseTop - 10 + salaryClassifyValueTop + baseMiddle * index, 400, 20, "#ff4400", titleSize - 4, "600"); // 时薪
|
|
|
|
|
that.G.fillTextLineBreak(ctx, item.cus_price == "月薪" ? item.monthlyPay : item.salaryClassifyValue, canvas.width - ctx.measureText(item.cus_price == "月薪" ? item.monthlyPay : item.salaryClassifyValue).width - 40 , baseTop + ageTop + baseMiddle * index, 400, 20, "#ff4400", titleSize - 4, "600"); // 时薪
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// _G.fillTextLineBreak(ctx, item.monthlyPay, salaryClassifyValueLeft + ctx.measureText(item.salaryClassifyValue + " ").width, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 , 20, "#ff4400", monthlyPaySize, "400"); // 月工资
|
|
|
|
|
// that.G.fillTextLineBreak(ctx, item.monthlyPay, salaryClassifyValueLeft + ctx.measureText(item.salaryClassifyValue + " ").width, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 , 20, "#ff4400", monthlyPaySize, "400"); // 月工资
|
|
|
|
|
// }, 0);
|
|
|
|
|
_G.fillTextLineBreak(ctx, item.district, logoLeft, baseTop + ageTop + baseMiddle * index, 500, 20, "#999", monthlyPaySize); // 省市
|
|
|
|
|
_G.fillTextLineBreak(ctx, "丨" + item.age, logoLeft + ctx.measureText(item.district).width, baseTop + ageTop + baseMiddle * index, 500, 20, "#999", monthlyPaySize); // 年龄
|
|
|
|
|
that.G.fillTextLineBreak(ctx, item.district, logoLeft, baseTop + ageTop + baseMiddle * index, 500, 20, "#999", monthlyPaySize); // 省市
|
|
|
|
|
that.G.fillTextLineBreak(ctx, "丨" + item.age, logoLeft + ctx.measureText(item.district).width, baseTop + ageTop + baseMiddle * index, 500, 20, "#999", monthlyPaySize); // 年龄
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
imgres(canvas);
|
|
|
|
|
|