|
|
|
|
@ -1643,14 +1643,15 @@ Page({
|
|
|
|
|
// });
|
|
|
|
|
// index++;
|
|
|
|
|
// }, 5000);
|
|
|
|
|
console.log('this.data.templateList', app.globalData.templateList);
|
|
|
|
|
if (app.globalData.templateList) {
|
|
|
|
|
app.globalData.templateList.forEach((element) => {
|
|
|
|
|
console.log(element);
|
|
|
|
|
if (element.title == "伯才小程序首页海报分享封面") {
|
|
|
|
|
if (element.title == "稻田小程序首页海报分享封面") {
|
|
|
|
|
this.setData({
|
|
|
|
|
sharelImg: element.img,
|
|
|
|
|
});
|
|
|
|
|
console.log(this.data.sharelImg);
|
|
|
|
|
console.log('this.data.sharelImg', this.data.sharelImg);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -2019,9 +2020,9 @@ Page({
|
|
|
|
|
console.log(that.data.storeJobListSearchForm);
|
|
|
|
|
// /yishoudan/store/job/platform/list
|
|
|
|
|
// /overall/store/job/list
|
|
|
|
|
customRequest("/yishoudan/store/job/platform/list", { header: 'headers', method: 'POST', data: that.data.storeJobListSearchForm }).then((res) => {
|
|
|
|
|
console.log('res',res);
|
|
|
|
|
let data = res.data.data.pageBean
|
|
|
|
|
customRequest("/yishoudan/custom/job/listV2", { header: 'headers', method: 'POST', data: that.data.storeJobListSearchForm }).then((res) => {
|
|
|
|
|
console.log('res', res);
|
|
|
|
|
let data = res.data.data
|
|
|
|
|
that.setData({
|
|
|
|
|
totalPage: data.pageCount,
|
|
|
|
|
currPage: data.currentPage,
|
|
|
|
|
@ -2032,6 +2033,49 @@ Page({
|
|
|
|
|
triggered: false,
|
|
|
|
|
});
|
|
|
|
|
}, 1000);
|
|
|
|
|
data.recordList.forEach((item, index) => {
|
|
|
|
|
console.log('item,item', item);
|
|
|
|
|
if (app.isNotEmptyCheck(item.logo)) {
|
|
|
|
|
item["logo"] = item.logo.indexOf("https") > -1 ? item.logo : item.logo.replace("http:", "https:");
|
|
|
|
|
}
|
|
|
|
|
if (app.isNotEmptyCheck(item.returnFeeType) || item.returnFeeType == "0" || item.returnFee == "0") {
|
|
|
|
|
item["fuWuFei"] = commonUtil.getReturnFeeTypeName1ById(item.returnFeeType, item.returnFee / 100);
|
|
|
|
|
} else {
|
|
|
|
|
item["fuWuFei"] = "";
|
|
|
|
|
}
|
|
|
|
|
item.minMonthlyPay = item.minMonthlyPay / 100
|
|
|
|
|
item.maxMonthlyPay = item.maxMonthlyPay / 100
|
|
|
|
|
if (item.jobSpecialLabelNames && item.jobSpecialLabelNames.length > 0) {
|
|
|
|
|
item.labelGroup = item.jobSpecialLabelNames.split(', ').filter((itm, inx) => {
|
|
|
|
|
return inx < 6
|
|
|
|
|
}).map(itm => {
|
|
|
|
|
return itm
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
item.labelGroup = [];
|
|
|
|
|
}
|
|
|
|
|
// 简版弹窗通告显示
|
|
|
|
|
// if (item.id == that.data.currentJobDrawer.id) {
|
|
|
|
|
// item["jobDesp"] = item.jobDesp.replace(/\*\*\*\*\*/g, "").split("————————")[0];
|
|
|
|
|
// 展示用字段
|
|
|
|
|
// item["jobDesp1"] = item.jobDesp.replace("⚠", "<i class='t-icon t-icon-zhuyi' style='margin-bottom:-2px;width:17px;height:17px;background-repeat:no-repeat;background-size:100% 100%'></i>");
|
|
|
|
|
// item["jobDesp1"] = item.jobDesp1.replace("[红包]", "<i class='t-icon t-icon-hongbao' style='margin-bottom:-2px;width:17px;height:17px;background-repeat:no-repeat;background-size:100% 100%'></i>");
|
|
|
|
|
that.data.currentJobDrawer = { ...item, index: that.data.currentJobDrawer.index ? that.data.currentJobDrawer.index : null };
|
|
|
|
|
// }
|
|
|
|
|
// if (index == 0 || index == 1 || index == 2) {
|
|
|
|
|
// that.data.checkedList.push(item);
|
|
|
|
|
// }
|
|
|
|
|
try {
|
|
|
|
|
that.data.checkedList.forEach((item1, index1) => {
|
|
|
|
|
if (item1.id == item.id) {
|
|
|
|
|
item.checked = true;
|
|
|
|
|
throw Error;
|
|
|
|
|
} else {
|
|
|
|
|
item.checked = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} catch (error) { }
|
|
|
|
|
});
|
|
|
|
|
if (data.recordList == null || data.recordList.length == 0 || data.recordList.length < that.data.storeJobListSearchForm.pageSize) {
|
|
|
|
|
var jobListTemp = commonUtil.disposeJobListData(data.recordList);
|
|
|
|
|
that.data.recordList = that.data.recordList.concat(jobListTemp);
|
|
|
|
|
@ -2060,38 +2104,7 @@ Page({
|
|
|
|
|
resolve();
|
|
|
|
|
that.getTag();
|
|
|
|
|
|
|
|
|
|
that.data.recordList.forEach((item, index) => {
|
|
|
|
|
// console.log(item);
|
|
|
|
|
if (app.isNotEmptyCheck(item.logo)) {
|
|
|
|
|
item["logo"] = item.logo.indexOf("https") > -1 ? item.logo : item.logo.replace("http:", "https:");
|
|
|
|
|
}
|
|
|
|
|
if (app.isNotEmptyCheck(item.returnFeeType) || item.returnFeeType == "0" || item.returnFee == "0") {
|
|
|
|
|
item["fuWuFei"] = commonUtil.getReturnFeeTypeName1ById(item.returnFeeType, item.returnFee);
|
|
|
|
|
} else {
|
|
|
|
|
item["fuWuFei"] = "";
|
|
|
|
|
}
|
|
|
|
|
// 简版弹窗通告显示
|
|
|
|
|
// if (item.id == that.data.currentJobDrawer.id) {
|
|
|
|
|
item["jobDesp"] = item.jobDesp.replace(/\*\*\*\*\*/g, "").split("————————")[0];
|
|
|
|
|
// 展示用字段
|
|
|
|
|
item["jobDesp1"] = item.jobDesp.replace("⚠", "<i class='t-icon t-icon-zhuyi' style='margin-bottom:-2px;width:17px;height:17px;background-repeat:no-repeat;background-size:100% 100%'></i>");
|
|
|
|
|
item["jobDesp1"] = item.jobDesp1.replace("[红包]", "<i class='t-icon t-icon-hongbao' style='margin-bottom:-2px;width:17px;height:17px;background-repeat:no-repeat;background-size:100% 100%'></i>");
|
|
|
|
|
that.data.currentJobDrawer = { ...item, index: that.data.currentJobDrawer.index ? that.data.currentJobDrawer.index : null };
|
|
|
|
|
// }
|
|
|
|
|
// if (index == 0 || index == 1 || index == 2) {
|
|
|
|
|
// that.data.checkedList.push(item);
|
|
|
|
|
// }
|
|
|
|
|
try {
|
|
|
|
|
that.data.checkedList.forEach((item1, index1) => {
|
|
|
|
|
if (item1.id == item.id) {
|
|
|
|
|
item.checked = true;
|
|
|
|
|
throw Error;
|
|
|
|
|
} else {
|
|
|
|
|
item.checked = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} catch (error) { }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
that.setData({
|
|
|
|
|
recordList: that.data.recordList,
|
|
|
|
|
currentJobDrawer: that.data.currentJobDrawer,
|
|
|
|
|
@ -2263,7 +2276,7 @@ Page({
|
|
|
|
|
titleSize = 40;
|
|
|
|
|
roundRectHeight = 156;
|
|
|
|
|
ageTop = 62;
|
|
|
|
|
salaryClassifyValueLeft = 56;
|
|
|
|
|
salaryClassifyValueLeft = 6;
|
|
|
|
|
salaryClassifyValueTop = 10;
|
|
|
|
|
monthlyPaySize = 32;
|
|
|
|
|
console.log(123);
|
|
|
|
|
@ -2323,11 +2336,12 @@ Page({
|
|
|
|
|
monthlyPaySize = 2 * 24;
|
|
|
|
|
markTop = 2 * 115;
|
|
|
|
|
console.log(123);
|
|
|
|
|
console.log('app.globalData.ip + that.data.currCode', app.globalData.ip + that.data.currCode);
|
|
|
|
|
wx.getImageInfo({
|
|
|
|
|
// src: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/qrcode.png", //网络图片,如果不行请换一个
|
|
|
|
|
src: app.globalData.ip + that.data.currCode,
|
|
|
|
|
success (res) {
|
|
|
|
|
// console.log(res);
|
|
|
|
|
console.log('setShareImg', res);
|
|
|
|
|
const img = canvas.createImage();
|
|
|
|
|
img.src = res.path;
|
|
|
|
|
img.onload = () => {
|
|
|
|
|
@ -2339,74 +2353,90 @@ Page({
|
|
|
|
|
funObj.roundRect1(ctx, QRLeft - 10, baseTop + QRTop - 10, QRSize + 20, QRSize + 20, 0, "#fff");
|
|
|
|
|
funObj.roundRect(ctx, img, QRLeft, baseTop + QRTop, QRSize, QRSize, 0);
|
|
|
|
|
}
|
|
|
|
|
// if (index == that.data.checkedList.length - 1) {
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// imgres();
|
|
|
|
|
// }, 200);
|
|
|
|
|
// }
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
fail (err) {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
that.data.checkedList.forEach((item, index) => {
|
|
|
|
|
let labelLeft = 0;
|
|
|
|
|
|
|
|
|
|
funObj.roundRect1(ctx, 24 * 2, baseTop - 100 + baseMiddle * index, 1104, roundRectHeight, 32, "#fff");
|
|
|
|
|
item.jobSpecialLabelNameArray.forEach((item1) => {
|
|
|
|
|
funObj.fillTextLineBreak(ctx, item1, 60 * 2 + labelLeft, baseTop + markTop + 30 * 2 + baseMiddle * index, 400 * 2, 20, "#333", monthlyPaySize); // 标签字符
|
|
|
|
|
funObj.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;
|
|
|
|
|
});
|
|
|
|
|
that.data.checkedList.forEach((item, index) => {
|
|
|
|
|
let labelLeft = 0;
|
|
|
|
|
|
|
|
|
|
funObj.roundRect1(ctx, 24 * 2, baseTop - 100 + baseMiddle * index, 1104, roundRectHeight, 32, "#fff");
|
|
|
|
|
if (item.jobSpecialLabelNameArray.length > 0) {
|
|
|
|
|
item.jobSpecialLabelNameArray.forEach((item1) => {
|
|
|
|
|
funObj.fillTextLineBreak(ctx, item1, 60 * 2 + labelLeft, baseTop + markTop + 30 * 2 + baseMiddle * index, 400 * 2, 20, "#333", monthlyPaySize); // 标签字符
|
|
|
|
|
funObj.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;
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
funObj.fillTextLineBreak(ctx, '暂无特色', 60 * 2, baseTop + markTop + 30 * 2 + baseMiddle * index, 400 * 2, 20, "#333", monthlyPaySize); // 标签字符
|
|
|
|
|
funObj.roundRect1(ctx, 52 * 2, baseTop + markTop + baseMiddle * index, ctx.measureText('暂无特色').width + 16 * 2, 40 * 2, 2 * 2, "#00000010"); //
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
funObj.fillTextLineBreak(ctx, item.jobName, logoLeft, baseTop + baseMiddle * index, 500 * 2, 20, "#333", titleSize, "600"); // 岗位标题
|
|
|
|
|
|
|
|
|
|
funObj.fillTextLineBreak(ctx, item.salaryClassifyValueHaibao, salaryClassifyValueLeft, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 * 2, 20, "#1890ff", titleSize - 4, "600"); // 时薪
|
|
|
|
|
funObj.fillTextLineBreak(ctx, item.jobName, logoLeft, baseTop + baseMiddle * index, 500 * 2, 20, "#333", titleSize, "600"); // 岗位标题
|
|
|
|
|
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
funObj.fillTextLineBreak(ctx, item.monthlyPay, salaryClassifyValueLeft + ctx.measureText(item.salaryClassifyValueHaibao + " ").width, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 * 2, 20, "#1890ff", monthlyPaySize, "400"); // 月工资
|
|
|
|
|
// }, 0);
|
|
|
|
|
funObj.fillTextLineBreak(ctx, item.salaryClassifyValueHaibao, logoLeft, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 * 2, 20, "#1890ff", titleSize - 4, "600"); // 时薪
|
|
|
|
|
|
|
|
|
|
funObj.fillTextLineBreak(ctx, item.district, salaryClassifyValueLeft, baseTop + ageTop + baseMiddle * index, 500 * 2, 20, "#333", monthlyPaySize); // 省市
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
funObj.fillTextLineBreak(ctx, item.monthlyPay, logoLeft + ctx.measureText(item.salaryClassifyValueHaibao + " ").width, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 * 2, 20, "#1890ff", monthlyPaySize, "400"); // 月工资
|
|
|
|
|
// }, 0);
|
|
|
|
|
|
|
|
|
|
funObj.fillTextLineBreak(ctx, " | " + item.age, salaryClassifyValueLeft + ctx.measureText(item.district).width, baseTop + ageTop + baseMiddle * index, 500 * 2, 20, "#333", monthlyPaySize); // 年龄
|
|
|
|
|
funObj.fillTextLineBreak(ctx, item.district, logoLeft, baseTop + ageTop + baseMiddle * index, 500 * 2, 20, "#333", monthlyPaySize); // 省市
|
|
|
|
|
|
|
|
|
|
funObj.fillTextLineBreak(ctx, that.data.userInfo.agencyName, mycenter - ctx.measureText(that.data.userInfo.agencyName).width / 2, fubiaotiTop, 400 * 2, 20, "#fff", monthlyPaySize, "600"); // 代理名称
|
|
|
|
|
funObj.fillTextLineBreak(ctx, " | " + item.age, logoLeft + ctx.measureText(item.district).width, baseTop + ageTop + baseMiddle * index, 500 * 2, 20, "#333", monthlyPaySize); // 年龄
|
|
|
|
|
|
|
|
|
|
if (that.data.checkedList.length == 1) {
|
|
|
|
|
// roundRect1(ctx, mycenter - 600 / 2, baseTop + 750, 600, 560, 32, "#fff");
|
|
|
|
|
funObj.fillTextLineBreak(ctx, "长按查看职位详情", mycenter - ctx.measureText("长按查看职位详情").width / 2, baseTop + bottomSloganTop, 300 * 2, 20, "#fff", monthlyPaySize); // 底部slogan
|
|
|
|
|
funObj.fillTextLineBreak(ctx, "好工作 放心干", mycenter - ctx.measureText("好工作 放心干").width / 1.45, baseTop + bottomSloganTop1, 500 * 2, 20, "#fff", titleSize); // 底部slogan
|
|
|
|
|
} else {
|
|
|
|
|
funObj.fillTextLineBreak(ctx, "长按查看职位详情", bottomSloganLeft, baseTop + bottomSloganTop, 300 * 2, 20, "#fff", monthlyPaySize + 8); // 底部slogan
|
|
|
|
|
funObj.fillTextLineBreak(ctx, "好工作 放心干", bottomSloganLeft1, baseTop + bottomSloganTop1, 500 * 2, 20, "#fff", titleSize); // 底部slogan
|
|
|
|
|
}
|
|
|
|
|
//生成logo图片
|
|
|
|
|
wx.getImageInfo({
|
|
|
|
|
src: item.logo, //网络图片,如果不行请换一个
|
|
|
|
|
success (res) {
|
|
|
|
|
// console.log(res);
|
|
|
|
|
funObj.fillTextLineBreak(ctx, that.data.userInfo.agencyName, mycenter - ctx.measureText(that.data.userInfo.agencyName).width / 2, fubiaotiTop, 400 * 2, 20, "#fff", monthlyPaySize, "600"); // 代理名称
|
|
|
|
|
|
|
|
|
|
const img = canvas.createImage();
|
|
|
|
|
// console.log(ctx);
|
|
|
|
|
img.src = res.path;
|
|
|
|
|
img.onload = () => {
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
funObj.roundRect(ctx, img, logoLeft, baseTop + 40 + baseMiddle * index, logoSize, logoSize, 8);
|
|
|
|
|
// }, 500);
|
|
|
|
|
if (that.data.checkedList.length == 1) {
|
|
|
|
|
// roundRect1(ctx, mycenter - 600 / 2, baseTop + 750, 600, 560, 32, "#fff");
|
|
|
|
|
funObj.fillTextLineBreak(ctx, "长按查看职位详情", mycenter - ctx.measureText("长按查看职位详情").width / 2, baseTop + bottomSloganTop, 300 * 2, 20, "#fff", monthlyPaySize); // 底部slogan
|
|
|
|
|
funObj.fillTextLineBreak(ctx, "好工作 放心干", mycenter - ctx.measureText("好工作 放心干").width / 1.45, baseTop + bottomSloganTop1, 500 * 2, 20, "#fff", titleSize); // 底部slogan
|
|
|
|
|
} else {
|
|
|
|
|
funObj.fillTextLineBreak(ctx, "长按查看职位详情", bottomSloganLeft, baseTop + bottomSloganTop, 300 * 2, 20, "#fff", monthlyPaySize + 8); // 底部slogan
|
|
|
|
|
funObj.fillTextLineBreak(ctx, "好工作 放心干", bottomSloganLeft1, baseTop + bottomSloganTop1, 500 * 2, 20, "#fff", titleSize); // 底部slogan
|
|
|
|
|
}
|
|
|
|
|
//生成logo图片
|
|
|
|
|
if (index == that.data.checkedList.length - 1) {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
imgres(canvas);
|
|
|
|
|
}, 100);
|
|
|
|
|
}, 200);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
fail (err) {
|
|
|
|
|
console.log(err);
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
// wx.getImageInfo({
|
|
|
|
|
// src: item.logo, //网络图片,如果不行请换一个
|
|
|
|
|
// success (res) {
|
|
|
|
|
// // console.log(res);
|
|
|
|
|
|
|
|
|
|
// const img = canvas.createImage();
|
|
|
|
|
// // console.log(ctx);
|
|
|
|
|
// img.src = res.path;
|
|
|
|
|
// img.onload = () => {
|
|
|
|
|
// // setTimeout(() => {
|
|
|
|
|
// funObj.roundRect(ctx, img, logoLeft, baseTop + 40 + baseMiddle * index, logoSize, logoSize, 8);
|
|
|
|
|
// // }, 500);
|
|
|
|
|
// if (index == that.data.checkedList.length - 1) {
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// imgres(canvas);
|
|
|
|
|
// }, 100);
|
|
|
|
|
// }
|
|
|
|
|
// };
|
|
|
|
|
// },
|
|
|
|
|
// fail (err) {
|
|
|
|
|
// console.log(err);
|
|
|
|
|
// },
|
|
|
|
|
// });
|
|
|
|
|
});
|
|
|
|
|
// if (index == that.data.checkedList.length - 1) {
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// imgres();
|
|
|
|
|
// }, 200);
|
|
|
|
|
// }
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
fail (err) {
|
|
|
|
|
console.log('err', err);
|
|
|
|
|
wx.showToast({
|
|
|
|
|
title: '生成失败,请重试',
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// },500);
|
|
|
|
|
|
|
|
|
|
|