From 92f4c0ef99e5d06484d33966b76db8a2b13af1d2 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Wed, 29 May 2024 14:10:10 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../safetymeeting/safetymeeting-detail.vue | 49 +++++++++++++++++- .../basics/basic-info/components/account.vue | 36 ++++++++++++- .../basics/basic-info/components/baseInfo.vue | 32 ++++++++++-- .../basic-info/components/certificate.vue | 30 ++++++++++- pages/basics/home.vue | 4 +- pages/login/register/baseInfo.vue | 2 +- pages/login/register/certificate.vue | 18 +++++-- pages/news/news-list-detail.vue | 51 ++++++++++++++++--- 8 files changed, 199 insertions(+), 23 deletions(-) diff --git a/pages/application/safetymeeting/safetymeeting-detail.vue b/pages/application/safetymeeting/safetymeeting-detail.vue index 2ccfafc..93cbdbc 100644 --- a/pages/application/safetymeeting/safetymeeting-detail.vue +++ b/pages/application/safetymeeting/safetymeeting-detail.vue @@ -42,13 +42,15 @@ - + 会议附件 + + @@ -183,6 +185,7 @@ if (res.data != null) { uni.hideLoading(); _this.pd = res.data.pd; + console.log(_this.pd) } else { uni.showToast({ @@ -193,6 +196,50 @@ } }); }, + goStuToOpen(filePath) { + uni.downloadFile({ + url: baseImgPath + filePath, + success: res => { + let filePath = res.tempFilePath; + if (true) { // open存在,代表预览操作 + let system = uni.getSystemInfoSync().platform; + if (system == 'ios') { + filePath = encodeURI(filePath); + } + uni.openDocument({ + filePath, + success: () => { + console.log('打开文档成功'); + }, + fail: error => { + console.log(error) + } + }); + } else { // open不存在,代表下载操作 + uni.saveFile({ + tempFilePath: filePath, + success: () => { + uni.showToast({ + title: '下载成功' + }) + }, + fail: () => { + uni.showToast({ + title: '下载失败' + }) + } + }) + } + }, + fail: () => { + if (!open) { + uni.showToast({ + title: '下载失败' + }) + } + } + }) + }, ChooseImage() { var _this = this; uni.chooseImage({ diff --git a/pages/basics/basic-info/components/account.vue b/pages/basics/basic-info/components/account.vue index ed3e265..a2697ec 100644 --- a/pages/basics/basic-info/components/account.vue +++ b/pages/basics/basic-info/components/account.vue @@ -5,7 +5,7 @@ 从业人员注册 --> - + 人员审核确认中,不可编辑 @@ -37,7 +37,9 @@