const xxx = {
x: 0,
y: 0,
canvasId: 'canvas',
quality:'1',
fileType:'png',
width: 300,
height: 200,
destWidth: 600,
destHeight: 400,}
wx.canvasToTempFilePath({
...xxx,
success(res) {
console.log(res)
}
})
你好,可参考一下https://developers.weixin.qq.com/community/develop/doc/0000624919ca602f20291a88e5b000?_at=1615099983289