mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:03:27 +08:00
uniapp【修复】: 海报下载问题修复
This commit is contained in:
@@ -349,24 +349,15 @@
|
||||
uni.authorize({
|
||||
scope: 'scope.writePhotosAlbum',
|
||||
success() {
|
||||
// 先下载到本地
|
||||
uni.downloadFile({
|
||||
url: state.imgSrc,
|
||||
success(res : any) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success() {
|
||||
handleShowToast('保存成功', 'success');
|
||||
},
|
||||
fail() {
|
||||
handleShowToast('图片保存失败', 'error');
|
||||
}
|
||||
});
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: state.imgSrc,
|
||||
success() {
|
||||
handleShowToast('保存成功', 'success');
|
||||
},
|
||||
fail() {
|
||||
handleShowToast('下载失败', 'error');
|
||||
handleShowToast('图片保存失败', 'error');
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
|
||||
Reference in New Issue
Block a user