|
|
@@ -57,7 +57,7 @@
|
|
|
//获取标题图片
|
|
|
let headerImg = await this.getImageInfo(this.works.image)
|
|
|
let hW = uni.upx2px(560);
|
|
|
- let hH = uni.upx2px(360);
|
|
|
+ let hH = uni.upx2px(400);
|
|
|
|
|
|
//绘制标题
|
|
|
//绘制标题
|
|
|
@@ -77,32 +77,40 @@
|
|
|
//绘制名称
|
|
|
this.ctx.setFontSize(24);
|
|
|
this.ctx.setFillStyle('#000000');
|
|
|
- this.ctx.fillText(this.works.title ,((this.canvasW-hW) / 2) + uni.upx2px(2),(((this.canvasW-hW) / 2) + hH + uni.upx2px(280)))
|
|
|
+ this.ctx.fillText(this.works.title ,((this.canvasW-hW) / 2) + uni.upx2px(2),(((this.canvasW-hW) / 2) + hH + uni.upx2px(240)))
|
|
|
//绘制副标题
|
|
|
this.ctx.setFontSize(12);
|
|
|
- this.ctx.setFillStyle('#c7c7c7');
|
|
|
- this.ctx.fillText("赶紧为你的爱豆打榜吧" ,((this.canvasW-hW) / 2) + uni.upx2px(2),(((this.canvasW-hW) / 2) + hH + uni.upx2px(325)))
|
|
|
+ this.ctx.setFillStyle('#302e2f');
|
|
|
+ this.ctx.fillText("赶紧为你的爱豆打榜吧" ,((this.canvasW-hW) / 2) + uni.upx2px(2),(((this.canvasW-hW) / 2) + hH + uni.upx2px(285)))
|
|
|
+ //绘制主办方
|
|
|
+ this.ctx.setFontSize(12);
|
|
|
+ this.ctx.setFillStyle('#161616');
|
|
|
+ this.ctx.fillText("广东广播电视台" ,uni.upx2px(430),(((this.canvasW-hW) / 2) + hH + uni.upx2px(310)))
|
|
|
|
|
|
//绘制热力值
|
|
|
this.ctx.setFontSize(24);
|
|
|
this.ctx.setFillStyle('#000000');
|
|
|
- this.ctx.fillText(this.works.hotValue ,((this.canvasW-hW) / 2) + uni.upx2px(2),(((this.canvasW-hW) / 2) + hH + uni.upx2px(390)))
|
|
|
+ this.ctx.fillText(this.works.hotValue ,((this.canvasW-hW) / 2) + uni.upx2px(2),(((this.canvasW-hW) / 2) + hH + uni.upx2px(365)))
|
|
|
|
|
|
//绘制排名
|
|
|
this.ctx.setFontSize(12);
|
|
|
this.ctx.setFillStyle('#000000');
|
|
|
- this.ctx.fillText("热力榜第 "+this.works.rank ,((this.canvasW-hW) / 2) + uni.upx2px(2),(((this.canvasW-hW) / 2) + hH + uni.upx2px(430)))
|
|
|
+ this.ctx.fillText("热力榜第 "+this.works.rank ,((this.canvasW-hW) / 2) + uni.upx2px(2),(((this.canvasW-hW) / 2) + hH + uni.upx2px(400)))
|
|
|
|
|
|
//提示文案
|
|
|
this.ctx.setFontSize(12);
|
|
|
- this.ctx.setFillStyle('#858585');
|
|
|
- this.ctx.fillText('来自 '+ this.works.name +' 的分享',(((this.canvasW-hW) / 2)),(((this.canvasW-hW) / 2) + hH + uni.upx2px(500)))
|
|
|
+ this.ctx.setFillStyle('#5c5c5c');
|
|
|
+ this.ctx.fillText('来自 '+ this.works.name +' 的分享',(((this.canvasW-hW) / 2)),(((this.canvasW-hW) / 2) + hH + uni.upx2px(450)))
|
|
|
//底部广告
|
|
|
// let BottomAdImg = await this.getImageInfo(this.abImg)
|
|
|
// this.ctx.drawImage(BottomAdImg.path,(((this.canvasW-hW) / 2)),(((this.canvasW-hW) / 2) + hH + uni.upx2px(310)),uni.upx2px(350),uni.upx2px(110))
|
|
|
//小程序码
|
|
|
let qrcodeImg = await this.getImageInfo(this.works.qrcode)
|
|
|
- this.ctx.drawImage(qrcodeImg.path,uni.upx2px(450),(((this.canvasW-hW) / 2) + hH + uni.upx2px(360)), uni.upx2px(150), uni.upx2px(150))
|
|
|
+ this.ctx.drawImage(qrcodeImg.path,uni.upx2px(450),(((this.canvasW-hW) / 2) + hH + uni.upx2px(330)), uni.upx2px(150), uni.upx2px(150))
|
|
|
+ //logo
|
|
|
+ let logoImg = await this.getImageInfo(this.works.logo)
|
|
|
+ this.ctx.drawImage(logoImg.path,uni.upx2px(500),(((this.canvasW-hW) / 2) + hH + uni.upx2px(180)), uni.upx2px(100), uni.upx2px(100))
|
|
|
+
|
|
|
//延迟渲染
|
|
|
setTimeout(()=>{
|
|
|
this.ctx.draw(true,()=>{
|