From 40e05f817dec9ca9150df0072411242203a1dd88 Mon Sep 17 00:00:00 2001 From: 15093570141 <141405260+17521612761@users.noreply.github.com> Date: Thu, 24 Oct 2024 09:40:13 +0800 Subject: [PATCH] =?UTF-8?q?uniapp=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91:=20?= =?UTF-8?q?=E6=B5=B7=E6=8A=A5=E4=B8=8B=E8=BD=BD=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/share/sharePoster/sharePoster.vue | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/share/sharePoster/sharePoster.vue b/CoreCms.Net.Uni-App/CoreShop/pages/share/sharePoster/sharePoster.vue index d2179763..f4a3db6a 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/share/sharePoster/sharePoster.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/share/sharePoster/sharePoster.vue @@ -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