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