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' }); }