wx.drawImage画出的图片空白
const ctx = wx.createCanvasContext('mycanvas'); //绘制上传的图片(that.data.tempFilePaths的值是相册选择的临时路径) ctx.drawImage(that.data.tempFilePaths, 0, 0, 600, that.data.height); console.log("生成临时图片之前:" + that.data.tempFilePaths) let x = ''; ctx.draw(false, wx.canvasToTempFilePath({ canvasId: 'mycanvas', success: function (res) { console.log(res) that.setData({ tempSavePath: res.tempFilePath }); } }));