wx.canvasToTempFilePath({
x: 0,
y: 0,
width: 200,
height: 200,
//复制 * 750 / wx.getSystemInfoSync().windowWidth,换算成rpx;
destWidth: 500 * 750 / wx.getSystemInfoSync().windowWidth,
destHeight: 500 * 750 / wx.getSystemInfoSync().windowHeight,
canvasId: 'artQr',
success(res) {
console.log(res.tempFilePath)
that.setData({
qrImg: res.tempFilePath
})
}
})
版权声明:本文为lemisi原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。