|
|
|
@ -162,6 +162,13 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
// #endif
|
|
|
|
// #endif
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
lifetimes: {
|
|
|
|
|
|
|
|
// 组件生命周期函数,在组件实例被从页面节点树移除时执行
|
|
|
|
|
|
|
|
detached() {
|
|
|
|
|
|
|
|
console.log('detacheddetacheddetacheddetacheddetached');
|
|
|
|
|
|
|
|
uni.removeStorageSync("poster_img");
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
shareJobImg(newValue, oldValue) {
|
|
|
|
shareJobImg(newValue, oldValue) {
|
|
|
|
console.log("shareJobImg123", newValue);
|
|
|
|
console.log("shareJobImg123", newValue);
|
|
|
|
@ -491,17 +498,17 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 如果数字小于1000,直接返回
|
|
|
|
// 如果数字小于1000,直接返回
|
|
|
|
if (num < 1000) {
|
|
|
|
if (num < 10000) {
|
|
|
|
return num.toString();
|
|
|
|
return num.toString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 如果数字小于10000,转换为千
|
|
|
|
// 如果数字小于10000,转换为千
|
|
|
|
if (num < 10000) {
|
|
|
|
// if (num < 10000) {
|
|
|
|
return (num / 1000).toFixed(fixed) + "千";
|
|
|
|
// return (num / 1000).toFixed(fixed) + "K";
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// 如果数字大于等于10000,转换为万
|
|
|
|
// 如果数字大于等于10000,转换为万
|
|
|
|
return (num / 10000).toFixed(fixed) + "万";
|
|
|
|
return (num / 10000).toFixed(fixed);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 设置分享布局
|
|
|
|
// 设置分享布局
|
|
|
|
setShareJobImg(ctx, canvas, mycenter, funObj) {
|
|
|
|
setShareJobImg(ctx, canvas, mycenter, funObj) {
|
|
|
|
@ -539,14 +546,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
// 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"); // 今日更新职位
|
|
|
|
console.log("that.formatNumberAdvanced(info.jobNum)", that.formatNumberAdvanced(info.jobNum));
|
|
|
|
console.log("that.formatNumberAdvanced(info.jobNum)", that.formatNumberAdvanced(info.jobNum));
|
|
|
|
const textSegments = [
|
|
|
|
const textSegments = [{ content: that.formatNumberAdvanced(info.jobNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: info.jobNum < 10000 ? 10 : 0 }, info.jobNum < 10000 ? null : { content: "万", color: "#000", fontWeight: 500, fontSize: 64, space: 10 }, { content: "总职位", color: "#666", fontWeight: 500, fontSize: 56, space: 70 }, { content: that.formatNumberAdvanced(info.recruitmentJobNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 10 }, { content: "在招", color: "#666", fontWeight: 500, fontSize: 56, space: 70 }, { content: that.formatNumberAdvanced(info.downNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 10 }, { content: "粉丝", color: "#666", fontWeight: 500, fontSize: 56, space: 40 }];
|
|
|
|
{ content: that.formatNumberAdvanced(info.jobNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 10 },
|
|
|
|
|
|
|
|
{ content: "总职位", color: "#666", fontWeight: 500, fontSize: 56, space: 70 },
|
|
|
|
|
|
|
|
{ content: that.formatNumberAdvanced(info.recruitmentJobNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 10 },
|
|
|
|
|
|
|
|
{ content: "在招数", color: "#666", fontWeight: 500, fontSize: 56, space: 70 },
|
|
|
|
|
|
|
|
{ content: that.formatNumberAdvanced(info.downNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 10 },
|
|
|
|
|
|
|
|
{ content: "粉丝", color: "#666", fontWeight: 500, fontSize: 56, space: 40 },
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
that.G.drawCenteredText(ctx, mycenter + 20, 745, textSegments);
|
|
|
|
that.G.drawCenteredText(ctx, mycenter + 20, 745, textSegments);
|
|
|
|
imgres(canvas);
|
|
|
|
imgres(canvas);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|