调用canvasToTempFilePath报错empty?
onShow:function(){
wx.canvasToTempFilePath({
canvasId: ‘canvasIn’,
success: function (res) {
var tempFilePath = res.tempFilePath;
console.log(tempFilePath);
this.setData({
imagePath: tempFilePath,
maskHidden: false
// canvasHidden:true
});
},
fail: function (res) {
console.log(res);
}
});
},
我的代码应该没有错,但不知道为什么实现不了