mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-05-06 23:47:21 +08:00
【修复】修复新的海报组件保存图片到本地失败的问题。
This commit is contained in:
@@ -193,27 +193,19 @@
|
|||||||
uni.authorize({
|
uni.authorize({
|
||||||
scope: 'scope.writePhotosAlbum',
|
scope: 'scope.writePhotosAlbum',
|
||||||
success() {
|
success() {
|
||||||
// 先下载到本地
|
console.log(image);
|
||||||
uni.downloadFile({
|
uni.saveImageToPhotosAlbum({
|
||||||
url: image,
|
filePath: image,
|
||||||
success(res) {
|
success() {
|
||||||
uni.saveImageToPhotosAlbum({
|
_this.$refs.uToast.show({ message: '保存成功', type: 'success' })
|
||||||
filePath: res.tempFilePath,
|
|
||||||
success() {
|
|
||||||
_this.$refs.uToast.show({ message: '保存成功', type: 'success' })
|
|
||||||
},
|
|
||||||
fail() {
|
|
||||||
_this.$u.toast('图片保存失败')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
fail() {
|
fail() {
|
||||||
_this.$u.toast('下载失败')
|
_this.$u.toast('图片保存失败')
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
fail() {
|
fail() {
|
||||||
//console.log('授权失败')
|
console.log('scope.writePhotosAlbum授权失败')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
|
|||||||
Reference in New Issue
Block a user