From 5a32ce25d0bd53437cd9d3e269df2d4d08bc99c2 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Wed, 23 Jul 2025 13:17:38 +0800 Subject: [PATCH] 1 --- pages/subcomponent/promo-qrcode.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pages/subcomponent/promo-qrcode.vue b/pages/subcomponent/promo-qrcode.vue index fcd8238..4d734cc 100644 --- a/pages/subcomponent/promo-qrcode.vue +++ b/pages/subcomponent/promo-qrcode.vue @@ -176,6 +176,9 @@ export default { }, // 获取图片信息并保存到相册 imgApi(image) { + uni.showLoading({ + title: '保存中...' + }) return new Promise((resolve, reject) => { // 先下载图片到本地临时路径 @@ -188,9 +191,11 @@ export default { wx.saveImageToPhotosAlbum({ filePath: tempFilePath, success: () => { + uni.hideLoading() wx.showToast({ title: '保存成功', icon: 'success' }); }, fail: (err) => { + uni.hideLoading() console.error('保存失败:', err); wx.showToast({ title: '保存失败', icon: 'none' }); } @@ -198,6 +203,7 @@ export default { } }, fail: (err) => { + uni.hideLoading() console.error('下载失败:', err); wx.showToast({ title: '图片下载失败', icon: 'none' }); }