...
|
...
|
@@ -176,28 +176,37 @@ Page({ |
|
|
|
|
|
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.drawImage('./images/y@2x.png', 128.5 * scale, 465 * scale, 60 * scale, 25 * scale);
|
|
|
|
|
|
pCtx.setFillStyle('#D0021B')
|
|
|
pCtx.setFontSize(12)
|
|
|
pCtx.fillText('¥', 128.5 * scale, 465 * scale)
|
|
|
|
|
|
pCtx.setFillStyle('#D0021B')
|
|
|
pCtx.setFontSize(26)
|
|
|
pCtx.fillText('0', 143 * scale, 465 * scale)
|
|
|
|
|
|
|
|
|
pCtx.setFillStyle('#b0b0b0');
|
|
|
// pCtx.setTextAlign('center');
|
|
|
const fontSize = 18;
|
|
|
pCtx.setFontSize(fontSize);
|
|
|
let text = `${this.data.product_price}`;
|
|
|
pCtx.fillText(text, (137.5 + 120) * scale, 485 * scale);
|
|
|
pCtx.fillText(text, 205 * scale, 465 * scale);
|
|
|
|
|
|
let textRect = {width: 70};
|
|
|
if (pCtx.measureText) {
|
|
|
textRect = pCtx.measureText(text);
|
|
|
}
|
|
|
|
|
|
this.drawLine(pCtx, ((137.5 + 120) * scale) - (30 * scale), (485 - 15/2) * scale, textRect.width);
|
|
|
this.drawLine(pCtx, (205 * scale) - (30 * scale), (465 - 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) {
|
|
|
pCtx.drawImage(res.path, 25 * scale, 550.5 * scale, 85 * scale, 85 * scale);
|
|
|
pCtx.drawImage(res.path, 53 * scale, 567.5 * scale, 80 * scale, 80 * scale);
|
|
|
pCtx.draw(true);
|
|
|
}
|
|
|
});
|
...
|
...
|
|