|
|
@@ -750,7 +750,7 @@ class Index extends Component {
|
|
|
|
|
|
let imgBg = cvs.createImage();
|
|
|
// imgBg.src = require('./img/dtl/bg_room_dtl.jpg')
|
|
|
- imgBg.src = 'https://img.honglounews.com/20260106095227-6921.jpg_adm0?r='+ Math.random()
|
|
|
+ imgBg.src = 'https://img.honglounews.com/20260107092402-3240.jpg_adm0?r='+ Math.random()
|
|
|
await new Promise(resolve => {
|
|
|
imgBg.onload = resolve;
|
|
|
})
|
|
|
@@ -785,24 +785,24 @@ class Index extends Component {
|
|
|
ctx.drawImage(img4, 356, 828, 345, 286)
|
|
|
|
|
|
|
|
|
- that.drawText(ctx, '#343434', curObj.title.length > 25 ? curObj.title.substring(0, 25) + '...' : curObj.title, 120, 460, '28px')
|
|
|
+ that.drawCenterText(ctx, '#343434', curObj.title.length > 25 ? curObj.title.substring(0, 25) + '...' : curObj.title, 350, 460, '28px')
|
|
|
if (str === 'hide') {
|
|
|
- that.drawCenterText(ctx, '#333', '详情咨询巴老师', 350, 255, 'normal bold 60px')
|
|
|
+ that.drawCenterText(ctx, '#333', '详情咨询巴老师', 350, 255, 'normal bold 70px')
|
|
|
} else {
|
|
|
if (curObj.estate_name.length > 10) {
|
|
|
that.drawCenterText(ctx, '#343434', curObj.estate_name, 350, 255, 'normal bold 30px')
|
|
|
} else if (curObj.estate_name.length > 7) {
|
|
|
- that.drawCenterText(ctx, '#343434', curObj.estate_name, 350, 255, 'normal bold 46px')
|
|
|
+ that.drawCenterText(ctx, '#343434', curObj.estate_name, 350, 255, 'normal bold 56px')
|
|
|
} else {
|
|
|
- that.drawCenterText(ctx, '#343434', curObj.estate_name, 350, 255, 'normal bold 60px')
|
|
|
+ that.drawCenterText(ctx, '#343434', curObj.estate_name, 350, 255, 'normal bold 70px')
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
// that.drawText(ctx, '#333', curObj.area + '㎡', 140, 310, 'normal bold 28px')
|
|
|
// that.drawText(ctx, '#df6135', curObj.price + '万', 280, 310, 'normal bold 32px')
|
|
|
- that.drawText(ctx, '#ff2400', curObj.area, 160, 390, 'normal bold 60px')
|
|
|
- that.drawText(ctx, '#ff2400', curObj.price, 380, 390, 'normal bold 60px')
|
|
|
+ that.drawText(ctx, '#ff2400', curObj.area, 170, 390, 'normal bold 80px')
|
|
|
+ that.drawText(ctx, '#ff2400', curObj.price, 380, 390, 'normal bold 80px')
|
|
|
|
|
|
|
|
|
// let base64 = ctx.canvas.toDataURL("image/png")
|
|
|
@@ -891,7 +891,7 @@ class Index extends Component {
|
|
|
|
|
|
let imgBg = cvs.createImage();
|
|
|
// imgBg.src = require('./img/dtl/bg_room_dtl.jpg')
|
|
|
- imgBg.src = 'https://img.honglounews.com/20260106095227-6921.jpg_adm0?r='+ Math.random()
|
|
|
+ imgBg.src = 'https://img.honglounews.com/20260107092402-3240.jpg_adm0?r='+ Math.random()
|
|
|
await new Promise(resolve => {
|
|
|
imgBg.onload = resolve;
|
|
|
})
|
|
|
@@ -926,21 +926,22 @@ class Index extends Component {
|
|
|
ctx.drawImage(img4, 356, 828, 345, 286)
|
|
|
|
|
|
|
|
|
- that.drawText(ctx, '#343434', curObj.title.length > 25 ? curObj.title.substring(0, 25) + '...' : curObj.title, 120, 460, '28px')
|
|
|
+ that.drawCenterText(ctx, '#343434', curObj.title.length > 25 ? curObj.title.substring(0, 25) + '...' : curObj.title, 350, 460, '28px')
|
|
|
if (str === 'hide') {
|
|
|
- that.drawCenterText(ctx, '#333', '详情咨询巴老师', 350, 255, 'normal bold 60px')
|
|
|
+ that.drawCenterText(ctx, '#333', '详情咨询巴老师', 350, 255, 'normal bold 70px')
|
|
|
} else {
|
|
|
if (curObj.estate_name.length > 10) {
|
|
|
that.drawCenterText(ctx, '#343434', curObj.estate_name, 350, 255, 'normal bold 30px')
|
|
|
} else if (curObj.estate_name.length > 7) {
|
|
|
- that.drawCenterText(ctx, '#343434', curObj.estate_name, 350, 255, 'normal bold 46px')
|
|
|
+ that.drawCenterText(ctx, '#343434', curObj.estate_name, 350, 255, 'normal bold 56px')
|
|
|
} else {
|
|
|
- that.drawCenterText(ctx, '#343434', curObj.estate_name, 350, 255, 'normal bold 60px')
|
|
|
+ that.drawCenterText(ctx, '#343434', curObj.estate_name, 350, 255, 'normal bold 70px')
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- that.drawText(ctx, '#ff2400', curObj.area, 160, 390, 'normal bold 60px')
|
|
|
- that.drawText(ctx, '#ff2400', curObj.price, 380, 390, 'normal bold 60px')
|
|
|
+
|
|
|
+ that.drawText(ctx, '#ff2400', curObj.area, 170, 390, 'normal bold 80px')
|
|
|
+ that.drawText(ctx, '#ff2400', curObj.price, 380, 390, 'normal bold 80px')
|
|
|
|
|
|
|
|
|
// let base64 = ctx.canvas.toDataURL("image/png")
|