drawImage在开发工具上可以正常使用,真机上不正常
let context = wx.createCanvasContext(‘myCanvas’,this);
context.drawImage(“data:image/jpeg;base64,” + wx.arrayBufferToBase64(res.data), 0, 0, 150, 100);
context.draw(true, function (rs){
wx.canvasToTempFilePath({
canvasId: ‘myCanvas’,
success: function (res) {
self.setData({
tempSavePath: res.tempFilePath
});
}
})
});