拍照想把路径转为base64,但是canvas调用draw的回调进不去,无法绘图
takePhoto: function() { var that = this that.ctx.takePhoto({ quality: 'low', success: (res) => { var temp = res.tempImagePath; const cts = wx.createCanvasContext('photos') cts.drawImage(temp, 0, 0, 300, 200) cts.draw(true, function(e) { console.log("draw");//进不去 }) } })}, |
