@@ -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;
@@ -814,27 +825,27 @@ export default {
salaryClassifyValueTop = 10;
monthlyPaySize = 32;
console.log(123);
- try {
- that.checkedList.forEach((item, index) => {
- if (index <= 2) {
- let labelLeft = 0;
- console.log("item1", item);
- 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"); // 岗位标题
- // 薪资位置更新(保留副本)
- // 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(() => {
- // that.G.fillTextLineBreak(ctx, item.monthlyPay, salaryClassifyValueLeft + ctx.measureText(item.salaryClassifyValue + " ").width, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 , 20, "#ff4400", monthlyPaySize, "400"); // 月工资
- // }, 0);
- 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);
- } catch (error) {
- console.log('error',error);
- }
+ try {
+ that.checkedList.forEach((item, index) => {
+ if (index <= 2) {
+ let labelLeft = 0;
+ console.log("item1", item);
+ 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"); // 岗位标题
+ // 薪资位置更新(保留副本)
+ // 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(() => {
+ // that.G.fillTextLineBreak(ctx, item.monthlyPay, salaryClassifyValueLeft + ctx.measureText(item.salaryClassifyValue + " ").width, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 , 20, "#ff4400", monthlyPaySize, "400"); // 月工资
+ // }, 0);
+ 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);
+ } catch (error) {
+ console.log("error", error);
+ }
// setTimeout(() => {
// },500);
});
diff --git a/root/home/shareList.vue b/root/home/shareList.vue
index c8f50d4..af056e8 100644
--- a/root/home/shareList.vue
+++ b/root/home/shareList.vue
@@ -1,7 +1,7 @@
- 关注该代理可查看其佣金, 点击直接关注
+ 关注该发单号可查看其佣金, 点击直接关注
diff --git a/root/person/loginIndex.vue b/root/person/loginIndex.vue
index 46c7de1..e4067a9 100644
--- a/root/person/loginIndex.vue
+++ b/root/person/loginIndex.vue
@@ -327,7 +327,8 @@ export default {
url: that.path,
});
}
- if ($data.agencyStatus == 1) {
+ if ($data.agencyId) {
+ // if ($data.agencyStatus == 1) {
that.G.Get(that.api.login_agencyInfo, {}, (aRes) => {
console.log("获取团队信息:", aRes);
uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员