...
|
...
|
@@ -146,7 +146,7 @@ Page({ |
|
|
let pCtx = wx.createCanvasContext('productDetailCanvas', this);
|
|
|
|
|
|
pCtx.setFillStyle('white');
|
|
|
pCtx.setStrokeStyle('black')
|
|
|
pCtx.setStrokeStyle('white')
|
|
|
pCtx.fillRect(0, 0, windowWidth, screenHeight);
|
|
|
|
|
|
this.drawRect(pCtx, windowWidth, screenHeight);
|
...
|
...
|
@@ -172,34 +172,36 @@ Page({ |
|
|
}
|
|
|
});
|
|
|
|
|
|
pCtx.drawImage('./images/Group@2x.png', 20 * scale, 286 * scale, 334 * scale, 68 * scale);
|
|
|
pCtx.drawImage('./images/Group@2x.png', 15 * scale, 306 * scale, 346 * scale, 68 * 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('#D0021B')
|
|
|
pCtx.setFontSize(12)
|
|
|
// pCtx.setFontSize(12)
|
|
|
// pCtx.setFontWeight('bold')
|
|
|
pCtx.font = '12px SanFranciscoText-Bold'
|
|
|
pCtx.fillText('¥', 128.5 * scale, 465 * scale)
|
|
|
|
|
|
pCtx.setFillStyle('#D0021B')
|
|
|
pCtx.setFontSize(26)
|
|
|
pCtx.fillText('0', 143 * scale, 465 * scale)
|
|
|
pCtx.fillText('0', 142 * scale, 465 * scale)
|
|
|
|
|
|
|
|
|
pCtx.setFillStyle('#b0b0b0');
|
|
|
// pCtx.setTextAlign('center');
|
|
|
const fontSize = 18;
|
|
|
const fontSize = 12;
|
|
|
pCtx.setFontSize(fontSize);
|
|
|
let text = `${this.data.product_price}`;
|
|
|
pCtx.fillText(text, 205 * scale, 465 * scale);
|
|
|
pCtx.fillText(text, 190 * scale, 465 * scale);
|
|
|
|
|
|
let textRect = {width: 70};
|
|
|
if (pCtx.measureText) {
|
|
|
textRect = pCtx.measureText(text);
|
|
|
}
|
|
|
|
|
|
this.drawLine(pCtx, (205 * scale) - (30 * scale), (465 - 15/2) * scale, textRect.width);
|
|
|
this.drawLine(pCtx, (195 * scale) - (30 * scale), (465 - 10/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);
|
...
|
...
|
@@ -220,7 +222,7 @@ Page({ |
|
|
},
|
|
|
|
|
|
drawRoundedRect: function(rect, r, ctx) {
|
|
|
ctx.setLineWidth(1)
|
|
|
ctx.setLineWidth(0.5)
|
|
|
ctx.setStrokeStyle('rgba(0,0,0,0.1)');
|
|
|
ctx.strokeRect(rect.x, rect.y, rect.width, rect.height);
|
|
|
// ctx.stroke();
|
...
|
...
|
@@ -291,7 +293,7 @@ Page({ |
|
|
|
|
|
drawRect: function (ctx, width, height) {
|
|
|
ctx.beginPath()
|
|
|
ctx.setStrokeStyle('black')
|
|
|
ctx.setStrokeStyle('white')
|
|
|
const lineWidth = 6;
|
|
|
|
|
|
ctx.setLineWidth(lineWidth)
|
...
|
...
|
|