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
- 发布:2020-10-27 15:38
- 更新:2020-10-27 15:38
- 阅读:724
canvasToTempFilePath在小程序中不走回调
分类:HBuilderX
0 个回复