1***@qq.com
1***@qq.com
  • 发布:2022-09-01 12:04
  • 更新:2022-09-01 12:04
  • 阅读:222

canvasToTempFilePath安卓不执行

分类:uni-app

const ctx = uni.createCanvasContext(canvas_id);
ctx.drawImage(url, 0, 0, width, height);
return new Promise((resolve, reject) => {
ctx.draw(false, ()=>{
//此方法在这就不执行了(安卓,小程序正常执行)
setTimeout( ()=>{
uni.canvasToTempFilePath({
canvasId: canvas_id,
width: width,
height: height,
destWidth: width,
destHeight: height,
success: (res) => {
resolve(res.tempFilePath)
},
fail: (err) => {
console.log(err)
}
})
},1000)
})
})

2022-09-01 12:04 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复