cyl/master-0804
wangxia 5 months ago
parent b9ab7b9ea8
commit be20e0b72f

@ -112,6 +112,7 @@ export default {
data() { data() {
return { return {
localBaseImg: this.G.store().localBaseImg, localBaseImg: this.G.store().localBaseImg,
agencyInfo: uni.getStorageSync("agencyInfo"),
cdnBaseImg: this.G.store().cdnBaseImg, cdnBaseImg: this.G.store().cdnBaseImg,
wxCode: "", wxCode: "",
appCodeSize: 0, appCodeSize: 0,
@ -327,6 +328,7 @@ export default {
return new Promise((resolve) => { return new Promise((resolve) => {
var mycenter = 0; // var mycenter = 0; //
var myheight = 0; // var myheight = 0; //
var baseColor = this.agencyInfo.themeColor; //
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
query query
.select("#canvasId") .select("#canvasId")
@ -354,21 +356,42 @@ export default {
console.log("img111", img); console.log("img111", img);
img.onload = (info) => { img.onload = (info) => {
// //
that.G.roundRect1(ctx, 0, 0, canvas.width, canvas.height, 0, "#fea702"); that.G.roundRect1(ctx, 0, 0, canvas.width, canvas.height, 0, baseColor);
// //
that.G.roundRect1(ctx, (mycenter - canvas.width + 120 ) / 2, 280, (canvas.width - 120), (canvas.height - 360), 180, "#fff"); that.G.roundRect1(ctx, (mycenter - canvas.width + 120 ) / 2, 280, (canvas.width - 120), (canvas.height - 360), 180, "#fff");
// //
that.G.roundRect1(ctx, (mycenter - 800 ) / 2, canvas.height - 300, 800, 136, 136, "#fea702"); that.G.roundRect1(ctx, (mycenter - 800 ) / 2, canvas.height - 300, 800, 136, 136, baseColor);
// that.G.fillTextLineBreak(ctx, '',(mycenter - 800 ) / 2 + 50, canvas.height - 320, '' * 88, 88, "#333", 88, 600); // let qrTop = 1195
//
that.G.roundRect1(ctx, (mycenter - 600 ) / 2 - 5, qrTop, 136, 136, 80, baseColor);
//
that.G.roundRect1(ctx, (mycenter - 600 ) / 2 + 470, qrTop, 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.fillTextLineBreak(ctx, '扫一扫关注我的发单号',mycenter / 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");
uni.getImageInfo({
console.log("info111", info); src: 'https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/phone.png', //
resolve(true); success(res) {
const img = canvas.createImage();
console.log("res333", res);
img.src = res.path;
img.onload = () => {
that.G.roundRect(ctx, img, (mycenter - 800 ) / 2 + 100, canvas.height - 265, 70, 70, 0);
resolve(true);
}
}
})
}; };
}, },
fail(err) {}, fail(err) {
console.log('errerrerrerrerrerrerr',err);
},
}); });
}).then(() => { }).then(() => {
//使 //使
@ -455,7 +478,7 @@ export default {
console.log("res333", res); console.log("res333", res);
img.src = res.path; img.src = res.path;
img.onload = () => { img.onload = () => {
that.G.roundRect(ctx, img, (mycenter - 600) / 2, 1260, 600, 600, 0); that.G.roundRect(ctx, img, (mycenter - 600) / 2, 1200, 600, 600, 35);
let info = that.recommendList; let info = that.recommendList;
console.log("info", info); console.log("info", info);
if (!info.logo) { if (!info.logo) {
@ -474,22 +497,21 @@ export default {
let numBase3 = numBase + (info.jobNum.toString().length * 88 + "总职位".length * 56 + 80) + (info.recruitmentJobNum.toString().length * 88 + "在招数".length * 56 + 80) let numBase3 = numBase + (info.jobNum.toString().length * 88 + "总职位".length * 56 + 80) + (info.recruitmentJobNum.toString().length * 88 + "在招数".length * 56 + 80)
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, 900,mycenter - 360, 56, "#999", 56, 500,'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.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"); //
that.G.fillTextLineBreak(ctx, info.jobNum.toString(), numBase, 760, info.jobNum.toString().length * 88, 88, "#333", 88, 600); // 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 * 88, 88, "#333", 88, 600); // 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 * 88, 88, "#333", 88, 600); //
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, "#999", 56, 500); // that.G.fillTextLineBreak(ctx, "总职位",numBase + 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, "#999", 56, 500); // that.G.fillTextLineBreak(ctx, "在招数", numBase2 + 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, "#999", 56, 500); // that.G.fillTextLineBreak(ctx, "粉丝", numBase3 + info.downNum.toString().length * 60, 755, "粉丝".length * 56, 56, "#666", 56, 400); //
imgres(canvas); imgres(canvas);
}; };
}, },

@ -1296,7 +1296,7 @@ export default {
jobDetail: { jobDetail: {
title: that.jobDetail.jobName, title: that.jobDetail.jobName,
info: (that.jobDetail.addss ? that.jobDetail.addss + "丨" : "") + that.jobDetail.genderRestrict + "丨" + that.jobDetail.age, info: (that.jobDetail.addss ? that.jobDetail.addss + "丨" : "") + that.jobDetail.genderRestrict + "丨" + that.jobDetail.age,
label: that.jobDetail.jobRequestLabelNames.length > 0 ? that.jobDetail.jobRequestLabelNames : "", label: that.jobDetail.jobSpecialLabelNames.length > 0 ? that.jobDetail.jobSpecialLabelNames : "",
salaryClassifyValue: that.jobDetail.priceStr, salaryClassifyValue: that.jobDetail.priceStr,
serviceFee: that.jobDetail.fuWuFei, serviceFee: that.jobDetail.fuWuFei,
monthPay: that.jobDetail.monthPay, monthPay: that.jobDetail.monthPay,
@ -1387,13 +1387,13 @@ export default {
that.G.fillTextLineBreak(ctx, that.jobDetail.priceStr, baseLeft, line3, 600, 40, "#ff4400", titleFontSize + 6, "600", "left"); that.G.fillTextLineBreak(ctx, that.jobDetail.priceStr, baseLeft, line3, 600, 40, "#ff4400", titleFontSize + 6, "600", "left");
}else{ }else{
// //
that.G.fillTextLineBreak(ctx, that.jobDetail.monthPay, 750 - ctx.measureText(that.jobDetail.monthPay).width + 20, line3 + 6, 400, 20, "#ff4400", titleFontSize, "400");
that.G.fillTextLineBreak(ctx, that.G.getSalaryClassifyValue(that.jobDetail.salaryClassify, that.jobDetail.salaryClassifyValue), baseLeft, line3, 400, 40, "#ff4400", titleFontSize + 6, "600", "left"); that.G.fillTextLineBreak(ctx, that.G.getSalaryClassifyValue(that.jobDetail.salaryClassify, that.jobDetail.salaryClassifyValue), baseLeft, line3, 400, 40, "#ff4400", titleFontSize + 6, "600", "left");
that.G.fillTextLineBreak(ctx, that.jobDetail.monthPay, 750 - that.jobDetail.monthPay.length * 20 , line3 + 6, 400, 20, "#ff4400", titleFontSize, "400");
} }
if (that.jobDetail.jobRequestLabelNames.length > 0) { if (that.jobDetail.jobSpecialLabelNames.length > 0) {
that.jobDetail.jobRequestLabelNames.forEach((item1, index) => { that.jobDetail.jobSpecialLabelNames.forEach((item1, index) => {
if (index <= 3) { if (index <= 3) {
that.G.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 80, line4 + 4, 500, 40, "#666", mainFontSize); that.G.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 80, line4 + 4, 500, 40, "#666", mainFontSize);
labelLeft += ctx.measureText(item1).width + 40; labelLeft += ctx.measureText(item1).width + 40;

@ -31,6 +31,7 @@ let data = {
uni.removeStorageSync("apply-agencyId"); uni.removeStorageSync("apply-agencyId");
uni.removeStorageSync("apply-supplierAccount"); uni.removeStorageSync("apply-supplierAccount");
uni.removeStorageSync("apply-uid"); uni.removeStorageSync("apply-uid");
uni.removeStorageSync('agencyInfo') // 1是创建者 2是普通成员
}, },
/* /*
*/ */

Loading…
Cancel
Save