From cc610ef597a4b600b4c48c80026f3a99be171f3b Mon Sep 17 00:00:00 2001 From: yuanhao <yuanhao_2024> Date: 星期一, 19 五月 2025 18:03:48 +0800 Subject: [PATCH] fix: scss跟背景图 --- qiye/qiyeIndex/qiyeIndex.vue | 61 +++++++++++++++++++++++------- 1 files changed, 46 insertions(+), 15 deletions(-) diff --git a/qiye/qiyeIndex/qiyeIndex.vue b/qiye/qiyeIndex/qiyeIndex.vue index 8c89017..91a48b8 100644 --- a/qiye/qiyeIndex/qiyeIndex.vue +++ b/qiye/qiyeIndex/qiyeIndex.vue @@ -171,22 +171,53 @@ success: val => { console.log(val) const tempFilePath = val.tempFilePath; - uni.saveImageToPhotosAlbum({ - filePath: tempFilePath, - success: () => { - uni.showToast({ - title: '鍥剧墖淇濆瓨鎴愬姛', - icon: 'success', - duration: 2000 - }); - }, - fail: () => { - uni.showToast({ - title: '鍥剧墖淇濆瓨澶辫触', - icon: 'none' - }); + uni.getSetting({ + success(res) { + if (!res.authSetting['scope.writePhotosAlbum']) { + uni.authorize({ + scope:'scope.writePhotosAlbum', + success() { + uni.saveImageToPhotosAlbum({ + filePath: tempFilePath, + success: () => { + uni.showToast({ + title: '鍥剧墖淇濆瓨鎴愬姛', + icon: 'success', + duration: 2000 + }); + }, + fail: () => { + uni.showToast({ + title: '鍥剧墖淇濆瓨澶辫触', + icon: 'none' + }); + } + }); + }, + fail(err){ + console.log(err) + } + }) + }else{ + uni.saveImageToPhotosAlbum({ + filePath: tempFilePath, + success: () => { + uni.showToast({ + title: '鍥剧墖淇濆瓨鎴愬姛', + icon: 'success', + duration: 2000 + }); + }, + fail: () => { + uni.showToast({ + title: '鍥剧墖淇濆瓨澶辫触', + icon: 'none' + }); + } + }); + } } - }); + }) }, fail: err => { uni.showToast({ -- Gitblit v1.9.1