|
@@ -40,7 +40,7 @@
|
|
<!-- 赏金 -->
|
|
<!-- 赏金 -->
|
|
<view v-if="info.hire" class="topLine mt-5" style="display: flex; align-items: center;">
|
|
<view v-if="info.hire" class="topLine mt-5" style="display: flex; align-items: center;">
|
|
<view class="iconfont icon-a-1_zhaopin" style="color: #e03506; font-size: 30px;"></view>
|
|
<view class="iconfont icon-a-1_zhaopin" style="color: #e03506; font-size: 30px;"></view>
|
|
- <view class="hirePrice">{{ `赏金:${commissionCalculation(info.hirePrice, 1)}元` }}</view>
|
|
|
|
|
|
+ <view class="hirePrice">{{ `赏金:${commissionCalculation(info.hirePrice / 100, 1)}元` }}</view>
|
|
</view>
|
|
</view>
|
|
<!-- 企业信息 -->
|
|
<!-- 企业信息 -->
|
|
<view class="topLine mt-5 d-flex" @click="handleToEnterprise">
|
|
<view class="topLine mt-5 d-flex" @click="handleToEnterprise">
|
|
@@ -289,7 +289,7 @@ const getImageTempRatio = (url) => {
|
|
maxLine:最多绘制的行数
|
|
maxLine:最多绘制的行数
|
|
**/
|
|
**/
|
|
//处理文字多出省略号显示
|
|
//处理文字多出省略号显示
|
|
-const dealWords = (ctx, fontSize, text, maxWidth, x, y, maxLine) => {
|
|
|
|
|
|
+const dealWords = (ctx, fontSize, text, maxWidth, x, y, maxLine, isEnterpriseName) => {
|
|
ctx.setFontSize(fontSize);//设置字体大小
|
|
ctx.setFontSize(fontSize);//设置字体大小
|
|
var allRow = Math.ceil(ctx.measureText(text).width / maxWidth);//实际总共能分多少行
|
|
var allRow = Math.ceil(ctx.measureText(text).width / maxWidth);//实际总共能分多少行
|
|
var count = allRow >= maxLine ? maxLine : allRow;//实际能分多少行与设置的最大显示行数比,谁小就用谁做循环次数
|
|
var count = allRow >= maxLine ? maxLine : allRow;//实际能分多少行与设置的最大显示行数比,谁小就用谁做循环次数
|
|
@@ -310,8 +310,9 @@ const dealWords = (ctx, fontSize, text, maxWidth, x, y, maxLine) => {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- } else {//如果当前的字符串宽度小于最大宽度就直接输出
|
|
|
|
- ctx.fillText(nowStr.slice(0), x, y + (j + 1) * 30);
|
|
|
|
|
|
+ } else {
|
|
|
|
+ //如果当前的字符串宽度小于最大宽度就直接输出
|
|
|
|
+ ctx.fillText(nowStr.slice(0), x, (isEnterpriseName ? y + 20 : y) + (j + 1) * 30);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -359,7 +360,7 @@ const createPoster = async () => {
|
|
|
|
|
|
// 企业名称
|
|
// 企业名称
|
|
context.setFillStyle('#000000')
|
|
context.setFillStyle('#000000')
|
|
- dealWords(context, 25, anotherName, 250, 150, 210, 2)
|
|
|
|
|
|
+ dealWords(context, 25, anotherName, 250, 150, 210, 2, true)
|
|
|
|
|
|
// 企业行业类型、规模
|
|
// 企业行业类型、规模
|
|
context.setFontSize(20)
|
|
context.setFontSize(20)
|
|
@@ -386,7 +387,7 @@ onShareAppMessage((res) => {
|
|
console.log(1, 'onShareAppMessage', res)
|
|
console.log(1, 'onShareAppMessage', res)
|
|
let path = `/pagesB/positionDetail/index?jobId=${info.value.id}`
|
|
let path = `/pagesB/positionDetail/index?jobId=${info.value.id}`
|
|
if (info.value.hire) {
|
|
if (info.value.hire) {
|
|
- path += `&sharedById=${info.value.userId}`
|
|
|
|
|
|
+ path += `&sharedById=${useUserStore.accountInfo.userId}`
|
|
}
|
|
}
|
|
if(!canvasToTempFilePath.value){
|
|
if(!canvasToTempFilePath.value){
|
|
setTimeout(() => {},1000)
|
|
setTimeout(() => {},1000)
|