小游戏 截图临时路径无法保存本地
发布于 5 年前 作者 uxiong 18552 次浏览 来自 问答
canvas.toTempFilePath({
x: 0,
   y: 0,
   width: width,
   height: height,
   destWidth: width,
   destHeight: height,
   success(res){
console.log(res.tempFilePath);

       FileSystemManager.saveFile({
tempFilePath: res.tempFilePath,
           success(res) {
console.log(res)
},
           fail(error) {
console.log(error)
}
})
}
})

临时路径是315c6e44-dc0e-4ee0-ad78-23b476744392,这个东西不知道是什么?但是能够预览图片却不能保存本地。网上看是http:或者是wxfile开头的~

求大神帮忙~如何将截图的图片保存到本地~最好不好通过后台上传~

3 回复

在真机上试试,我也出现这种情况,放到真机调试,保存的图片能看到的!

同样的问题,返回的那串不是具体的文件地址,无法保存,求解决啊

遇到同样的问题,顶!

回到顶部