Browse Source

[商户详情和劵详情][新增][分享生成海报]

tags/江西版6.1.0
luqc 6 years ago
parent
commit
38c860ac5f
1 changed files with 4 additions and 6 deletions
  1. +4
    -6
      pages/canvas/index.js

+ 4
- 6
pages/canvas/index.js View File

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

wx.hideLoading()
}
})


Loading…
Cancel
Save