| @@ -115,6 +115,7 @@ Page({ | |||||
| success: function(res) { | success: function(res) { | ||||
| ctx.drawImage(res.path, 0, 0, wW-20, wH); | ctx.drawImage(res.path, 0, 0, wW-20, wH); | ||||
| that.drawshopimg(ctx, scale,options); | that.drawshopimg(ctx, scale,options); | ||||
| ctx.draw(true) | |||||
| } | } | ||||
| }) | }) | ||||
| @@ -155,22 +156,19 @@ Page({ | |||||
| src: src2, | src: src2, | ||||
| success: function(res) { | success: function(res) { | ||||
| if(options && options.merchantId){ | if(options && options.merchantId){ | ||||
| that.drawOtherImage(ctx, scale) | |||||
| that.drawOtherContent(ctx, scale) | |||||
| // 绘制白色背景 | |||||
| // 绘制白色背景 | |||||
| ctx.setFillStyle('#fff') | ctx.setFillStyle('#fff') | ||||
| ctx.fillRect(15, 45, topImageWidth + 10, topImageHeight + 10) | ctx.fillRect(15, 45, topImageWidth + 10, topImageHeight + 10) | ||||
| ctx.drawImage(res.path, 20, 50, topImageWidth, topImageHeight) | ctx.drawImage(res.path, 20, 50, topImageWidth, topImageHeight) | ||||
| ctx.draw() | |||||
| that.drawOtherImage(ctx, scale) | |||||
| that.drawOtherContent(ctx, scale) | |||||
| }else if((options && options.couponChannelId)){ | }else if((options && options.couponChannelId)){ | ||||
| ctx.setFillStyle('#fff') | ctx.setFillStyle('#fff') | ||||
| ctx.fillRect(15, 95, topImageWidth + 10, topImageHeight + 10) | ctx.fillRect(15, 95, topImageWidth + 10, topImageHeight + 10) | ||||
| ctx.drawImage(res.path, 20, 100, topImageWidth, topImageHeight) | ctx.drawImage(res.path, 20, 100, topImageWidth, topImageHeight) | ||||
| ctx.draw() | |||||
| that.drawCouponContent(ctx, scale) | that.drawCouponContent(ctx, scale) | ||||
| that.drawqrCode(ctx, scale); | that.drawqrCode(ctx, scale); | ||||
| } | } | ||||
| wx.hideLoading() | wx.hideLoading() | ||||
| } | } | ||||
| }) | }) | ||||