|
@@ -49,7 +49,7 @@ const getEntPositionList = async () => {
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
const params = {
|
|
const params = {
|
|
- pageSize: 2,
|
|
|
|
|
|
+ pageSize: 3,
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
jobFairId,
|
|
jobFairId,
|
|
enterpriseId,
|
|
enterpriseId,
|
|
@@ -145,8 +145,8 @@ const createPoster = async () => {
|
|
|
|
|
|
// 企业头像
|
|
// 企业头像
|
|
context.save()
|
|
context.save()
|
|
- const secondImgWidth = 80
|
|
|
|
- const secondImgHeight = 80
|
|
|
|
|
|
+ const secondImgWidth = 120
|
|
|
|
+ const secondImgHeight = 120
|
|
const x = (540 - secondImgWidth) / 2
|
|
const x = (540 - secondImgWidth) / 2
|
|
const y = 788 - secondImgHeight - 460
|
|
const y = 788 - secondImgHeight - 460
|
|
context.beginPath()
|
|
context.beginPath()
|
|
@@ -158,7 +158,7 @@ const createPoster = async () => {
|
|
|
|
|
|
// 企业名称
|
|
// 企业名称
|
|
const maxTextWidth = 400
|
|
const maxTextWidth = 400
|
|
- const fontStyle = 'bold 18px Arial'
|
|
|
|
|
|
+ const fontStyle = 'bold 24px Arial'
|
|
context.font = fontStyle
|
|
context.font = fontStyle
|
|
let truncatedText = entName
|
|
let truncatedText = entName
|
|
while (context.measureText(truncatedText + '...').width > maxTextWidth && truncatedText.length > 0) {
|
|
while (context.measureText(truncatedText + '...').width > maxTextWidth && truncatedText.length > 0) {
|
|
@@ -174,8 +174,8 @@ const createPoster = async () => {
|
|
const tagPaddingLeftRight = 20
|
|
const tagPaddingLeftRight = 20
|
|
const tagPaddingTopBottom = 10
|
|
const tagPaddingTopBottom = 10
|
|
const tagRadius = 8
|
|
const tagRadius = 8
|
|
- const tagSpacing = 30
|
|
|
|
- let tagY = textY + tagSpacing
|
|
|
|
|
|
+ const tagSpacing = 22
|
|
|
|
+ let tagY = textY + tagSpacing + 10
|
|
positionNameList.forEach((tag) => {
|
|
positionNameList.forEach((tag) => {
|
|
let truncatedTag = tag
|
|
let truncatedTag = tag
|
|
while (context.measureText(truncatedTag + '...').width > maxTextWidth - 2 * tagPaddingLeftRight && truncatedTag.length > 0) {
|
|
while (context.measureText(truncatedTag + '...').width > maxTextWidth - 2 * tagPaddingLeftRight && truncatedTag.length > 0) {
|
|
@@ -200,7 +200,7 @@ const createPoster = async () => {
|
|
context.closePath()
|
|
context.closePath()
|
|
context.fill()
|
|
context.fill()
|
|
|
|
|
|
- context.font = '16px Arial'
|
|
|
|
|
|
+ context.font = '18px Arial'
|
|
context.fillStyle = '#fff'
|
|
context.fillStyle = '#fff'
|
|
context.fillText(truncatedTag, tagX + tagPaddingLeftRight, tagY + tagPaddingTopBottom + 10)
|
|
context.fillText(truncatedTag, tagX + tagPaddingLeftRight, tagY + tagPaddingTopBottom + 10)
|
|
|
|
|