关于画布保存临时文件的问题
ctx.draw(true, function () {
wx.canvasToTempFilePath({
canvasId: ‘posterCanvas’,
success: function (res) {
console.log(res.tempFilePath)
self.setData({
posterImageUrl: res.tempFilePath
})
}
})
})
上述代码完成后得到的posterImageUrl传递给image组件的src,在开发者工具内调试时,为什么该图片无法显示?如果要实现画布完成后产生的图片文件在画面上要展示的要求,应该如何使用API?感谢回答。
