saveImageToPhotosAlbum 保存图片是黑的
在工具上一切正常,真机调试就成黑的了,路径是canvasToTempFilePath生成的,工具上是http开头,真机是wxfile:,不知道是不是这个原因
wx.getImageInfo({
src: this.data.imagePath,
success(res) {
var paths = res.path
wx.saveImageToPhotosAlbum({
filePath: paths,
success(res) {
wx.showToast({
title: ‘保存成功’,
})
console.log(res.errMsg)
},
fail(res) {
console.log(res.errMsg)
}
})
}
})