|
|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view class="p-root-sharejob g_w_all g_bg_f_5" hover-class="none" hover-stop-propagation="false">
|
|
|
|
|
<!-- {{ shareJobBaseImg }}
|
|
|
|
|
<img :src="shareJobBaseImg" alt="" /> -->
|
|
|
|
|
<scroll-view class="m-list" id="listBox" :style="{ height: `calc(100vh - 74px)` }" :scroll-y="true" @scrolltolower="reachBottom">
|
|
|
|
|
<!-- <div class="g_kuaishou"> -->
|
|
|
|
|
<div>
|
|
|
|
|
@ -126,6 +128,7 @@ export default {
|
|
|
|
|
// path += (path.indexOf("?") >= 0 ? "&" : "?") + "agencyUserId=" + app.globalData.loginUserInfo.id;
|
|
|
|
|
// }
|
|
|
|
|
if (this.checkedList.length == 0) {
|
|
|
|
|
console.log("unpass");
|
|
|
|
|
throw Error;
|
|
|
|
|
} else {
|
|
|
|
|
return {
|
|
|
|
|
@ -135,14 +138,17 @@ export default {
|
|
|
|
|
arr.push(item.id);
|
|
|
|
|
});
|
|
|
|
|
this.getCanvas(this.shareJobBaseImg, "setJob").then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
console.log("this.shareJobBaseImg", res);
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
resolve({
|
|
|
|
|
title: "你想找的厂都有,立即查看",
|
|
|
|
|
imageUrl: res.tempFilePath,
|
|
|
|
|
path: `/root/home/shareList?scene=i=${arr.join("_")},u=${this.userInfo.agencyId}_${this.userInfo.id}`,
|
|
|
|
|
// path: '/pages/shareList/index'
|
|
|
|
|
});
|
|
|
|
|
// }, 100);
|
|
|
|
|
|
|
|
|
|
// return
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
@ -227,7 +233,7 @@ export default {
|
|
|
|
|
checkedList: [],
|
|
|
|
|
posterShow: false,
|
|
|
|
|
navInfo: {},
|
|
|
|
|
shareJobBaseImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/poster0106.png", // 分享职位基础图片
|
|
|
|
|
shareJobBaseImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/poster0106_1.png", // 分享职位基础图片
|
|
|
|
|
sharelImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/2023-09-01/7ca85384-9f22-474d-893f-092b61de684d_share.png", // 分享职位基础图片
|
|
|
|
|
currCode: "",
|
|
|
|
|
posterImg: "", // 海报图片
|
|
|
|
|
@ -582,7 +588,7 @@ export default {
|
|
|
|
|
.select("#canvasId")
|
|
|
|
|
.fields({ node: true, size: true })
|
|
|
|
|
.exec((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
console.log("getCanvas", res);
|
|
|
|
|
const canvas = res[0].node;
|
|
|
|
|
const ctx = canvas.getContext("2d");
|
|
|
|
|
new Promise(function (resolve) {
|
|
|
|
|
@ -590,6 +596,7 @@ export default {
|
|
|
|
|
uni.getImageInfo({
|
|
|
|
|
src: sharelImg, // 网络图片
|
|
|
|
|
success(res) {
|
|
|
|
|
console.log("getImageInfo", res);
|
|
|
|
|
console.log(res);
|
|
|
|
|
var width = res.width;
|
|
|
|
|
var height = res.height;
|
|
|
|
|
@ -619,6 +626,7 @@ export default {
|
|
|
|
|
uni.canvasToTempFilePath({
|
|
|
|
|
canvas: canvas1,
|
|
|
|
|
success(res) {
|
|
|
|
|
console.log("setShareJobImg", res);
|
|
|
|
|
console.log(res);
|
|
|
|
|
resolve(res);
|
|
|
|
|
},
|
|
|
|
|
@ -801,6 +809,9 @@ export default {
|
|
|
|
|
*/
|
|
|
|
|
setShareJobImg(ctx, canvas, funObj) {
|
|
|
|
|
let that = this;
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: "生成中...",
|
|
|
|
|
});
|
|
|
|
|
return new Promise((imgres) => {
|
|
|
|
|
// ctx.arcTo()
|
|
|
|
|
let baseTop, logoLeft, titleSize, ageTop, salaryClassifyValueLeft, salaryClassifyValueTop, monthlyPaySize, roundRectHeight, fubiaotiTop;
|
|
|
|
|
@ -823,7 +834,7 @@ export default {
|
|
|
|
|
that.G.fillTextLineBreak(ctx, item.jobName, logoLeft, baseTop + baseMiddle * index, 800, 20, "#333", titleSize, "500"); // 岗位标题
|
|
|
|
|
// 薪资位置更新(保留副本)
|
|
|
|
|
// 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"); // 时薪
|
|
|
|
|
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(() => {
|
|
|
|
|
// that.G.fillTextLineBreak(ctx, item.monthlyPay, salaryClassifyValueLeft + ctx.measureText(item.salaryClassifyValue + " ").width, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 , 20, "#ff4400", monthlyPaySize, "400"); // 月工资
|
|
|
|
|
// }, 0);
|
|
|
|
|
@ -833,7 +844,7 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
imgres(canvas);
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log('error',error);
|
|
|
|
|
console.log("error", error);
|
|
|
|
|
}
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// },500);
|
|
|
|
|
|