...
|
...
|
@@ -172,27 +172,28 @@ Page({ |
|
|
}
|
|
|
});
|
|
|
|
|
|
pCtx.drawImage('./images/qg@2x.png', 107 * scale, 286 * scale, 160 * scale, 77 * scale);
|
|
|
pCtx.drawImage('./images/Group@2x.png', 20 * scale, 286 * scale, 334 * scale, 136 * scale);
|
|
|
|
|
|
this.drawLongText(this.data.product_name, pCtx, 187.5 * scale, 412 * scale, '#444444', 20, 20);
|
|
|
|
|
|
pCtx.drawImage('./images/y@2x.png', 128.5 * scale, 465 * scale, 60 * scale, 25 * scale);
|
|
|
|
|
|
pCtx.setFillStyle('#b0b0b0');
|
|
|
pCtx.setTextAlign('center');
|
|
|
// pCtx.setTextAlign('center');
|
|
|
const fontSize = 18;
|
|
|
pCtx.setFontSize(fontSize);
|
|
|
|
|
|
let text = `${this.data.product_price}`;
|
|
|
pCtx.fillText(text, 137.5 * scale, 485 * scale);
|
|
|
pCtx.fillText(text, (137.5 + 120) * scale, 485 * scale);
|
|
|
|
|
|
let textRect = {width: 70};
|
|
|
if (pCtx.measureText) {
|
|
|
textRect = pCtx.measureText(text);
|
|
|
}
|
|
|
|
|
|
this.drawLine(pCtx, (137.5 * scale) - (30 * scale), (485 - 15/2) * scale, textRect.width);
|
|
|
|
|
|
pCtx.drawImage('./images/y@2x.png', 128.5 * scale + textRect.width, 465 * scale, 60 * scale, 25 * scale);
|
|
|
|
|
|
this.drawLine(pCtx, ((137.5 + 120) * scale) - (30 * scale), (485 - 15/2) * scale, textRect.width);
|
|
|
pCtx.setFillStyle('black')
|
|
|
pCtx.fillRect(47 * scale, 562 * scale, 280 * scale, 90 * scale)
|
|
|
// this.drawRoundedRect(this.Rect(25 * scale, 562* scale, 280 * scale, 90 * scale), 0, pCtx);
|
|
|
wx.getImageInfo({
|
|
|
src: this.data.product_qrCode,
|
|
|
success: function(res) {
|
...
|
...
|
@@ -201,9 +202,9 @@ Page({ |
|
|
}
|
|
|
});
|
|
|
|
|
|
this.drawLongText(`${this.data.user_name}邀请你参与YO!LUCK`, pCtx, 137.5 * scale, 585.5 * scale, '#444444', 14, 20, 'left');
|
|
|
this.drawLongText(`${this.data.user_name}邀请你参与0元抽奖`, pCtx, 137.5 * scale, 585.5 * scale, '#ffffff', 14, 20, 'left');
|
|
|
|
|
|
pCtx.setFillStyle('#b0b0b0');
|
|
|
pCtx.setFillStyle('#ffffff');
|
|
|
pCtx.setFontSize(10);
|
|
|
pCtx.fillText('长按图片识别小程序码抢限定', 137.5 * scale, 612.5 * scale);
|
|
|
pCtx.draw();
|
...
|
...
|
|