From 03f2d55a04d086e49a0a0ef484b0984887615650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 25 Sep 2025 17:18:41 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../image-preview/preview-detail-ios.vue | 301 ++++++++++++++++++ src/pages/index/dialog.vue | 9 +- 2 files changed, 309 insertions(+), 1 deletion(-) create mode 100644 src/components/image-preview/preview-detail-ios.vue diff --git a/src/components/image-preview/preview-detail-ios.vue b/src/components/image-preview/preview-detail-ios.vue new file mode 100644 index 00000000..837b7ed4 --- /dev/null +++ b/src/components/image-preview/preview-detail-ios.vue @@ -0,0 +1,301 @@ + + + + + diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue index cccefe25..c4a56fe3 100644 --- a/src/pages/index/dialog.vue +++ b/src/pages/index/dialog.vue @@ -403,6 +403,7 @@ talkingList.value[talkingList.value.length - 1].talkingText = answerText.value; }; + const isDownloading = ref(false) const stopAnswerCallBack = ref(null); const talkItemEvents = ({ type, data, id, info = {} }) => { switch (type) { @@ -482,9 +483,11 @@ if (getPhoneEnvBool('AND')) { common.navigateTo('/pages/index/preview?fileId=' + info.docId); } else { + if(isDownloading.value) return const base_url = get_base_url('/traask/traFilePreview/'); let fileUrl = base_url + '/traask/traFilePreview/' + info.docId + userParams; const localFilePath = '_doc/pdf_view/' + info.docName + '.pdf'; + isDownloading.value = true downloadAndSaveAvatar(fileUrl, localFilePath).then((res) => { uni.openDocument({ filePath: res, @@ -492,7 +495,11 @@ success: function () { console.log('打开文档成功'); } - }); + }) + }).finally(()=>{ + setTimeout(()=>{ + isDownloading.value = false + },1000) }); // uni.downloadFile({ // url: fileUrl,