|
|
@ -6,7 +6,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="canvas-box"> |
|
|
<view class="canvas-box"> |
|
|
<canvas style="width: 375px;height: 667px;position:fixed;top:9999px" canvas-id="mycanvas" /> |
|
|
|
|
|
|
|
|
<canvas style="width: 375px;height: 600px;position:fixed;top:9999px" canvas-id="mycanvas" /> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="btn-bottom" style="bottom: 40rpx;"> |
|
|
<view class="btn-bottom" style="bottom: 40rpx;"> |
|
|
@ -118,10 +118,10 @@ |
|
|
var context = wx.createCanvasContext('mycanvas'); |
|
|
var context = wx.createCanvasContext('mycanvas'); |
|
|
console.log('画布', that.backgroundImg) |
|
|
console.log('画布', that.backgroundImg) |
|
|
var path = that.backgroundImg; |
|
|
var path = that.backgroundImg; |
|
|
context.drawImage(path, 0, 0, 375, 667); |
|
|
|
|
|
|
|
|
context.drawImage(path, 0, 0, 375, 600); |
|
|
//绘制二维码 |
|
|
//绘制二维码 |
|
|
let wxcode = that.onceCode |
|
|
let wxcode = that.onceCode |
|
|
context.drawImage(wxcode, 18, 530, 120, 120); |
|
|
|
|
|
|
|
|
context.drawImage(wxcode, 18, 460, 120, 120); |
|
|
//绘制名字 |
|
|
//绘制名字 |
|
|
// context.setFontSize(24); |
|
|
// context.setFontSize(24); |
|
|
// context.setFillStyle('#fff'); |
|
|
// context.setFillStyle('#fff'); |
|
|
|