context.draw(false,function(){
//将生成好的图片保存到本地
uni.canvasToTempFilePath({
canvasId: 'mycanvas',
width: 740,
success: function(res) {
var tempFilePath = res.tempFilePath;
console.log(res)
that.imagePath = tempFilePath
that.poster_hidden = false
},
fail: function(res) {
console.log(res)
},
complete: (complete) => {
console.log('complete:',JSON.stringify(complete))
}
},that);
});
![xwz999](http://img-cdn-tc.dcloud.net.cn/uploads/avatar/000/95/87/99_avatar_mid.jpg?v=1727403103)
xwz999
- 发布:2020-10-27 15:38
- 更新:2020-10-27 15:38
- 阅读:668
canvasToTempFilePath在小程序中不走回调
分类:HBuilderX
0 个回复