//----------绘制图形并取出图片路径--------------
var ctx = wx.createCanvasContext('canvas', that)
ctx.drawImage(res.path, 0, 0, canvasWidth, canvasHeight)
console.log(3344)
ctx.draw(false, () => {
//留一定的时间绘制canvas
console.log(1100)
setTimeout(() => {
console.log(2222)
wx.canvasToTempFilePath({
canvasId: 'canvas',
destWidth: canvasWidth,
destHeight: canvasHeight,
success:(res) => {
console.log(1)
console.log(res.tempFilePath) //最终图片路径
},
fail: (res) => {
console.log(2)
console.log(res.errMsg)
}
}, that)
}, 5000)
})
你好,麻烦具体描述问题流程,提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html