From f8b3e832252bcbe986d411a1f78cd1da185608f0 Mon Sep 17 00:00:00 2001 From: fengchenchen Date: Thu, 10 Nov 2022 11:20:05 +0800 Subject: [PATCH] =?UTF-8?q?[update]-1=E3=80=81=E5=A2=9E=E5=8A=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=AD=A3=E5=9C=A8=E4=B8=8B=E8=BD=BD=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/manage.js | 4 ++++ src/api/memberManage.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/api/manage.js b/src/api/manage.js index 1297fa0..313f468 100644 --- a/src/api/manage.js +++ b/src/api/manage.js @@ -161,9 +161,13 @@ export function downloadFileByA(data, fileName) { * @returns {*} */ export function downloadFile(url, fileName, parameter) { + Vue.prototype['$message'].warning('文件正在下载中......', 0) return downFile(url, parameter).then((data) => { + Vue.prototype['$message'].destroy() // 调用a标签下载文件的方法 downloadFileByA(data, fileName) + }).catch(() => { + Vue.prototype['$message'].destroy() }) } diff --git a/src/api/memberManage.js b/src/api/memberManage.js index 5c8d934..9b37699 100644 --- a/src/api/memberManage.js +++ b/src/api/memberManage.js @@ -114,9 +114,13 @@ export function downloadFileByA(data, fileName) { * @returns {*} */ export function downloadFile(url, fileName, parameter) { + Vue.prototype['$message'].warning('文件正在下载中......', 0) return downFile(url, parameter).then((data) => { + Vue.prototype['$message'].destroy() // 调用a标签下载文件的方法 downloadFileByA(data, fileName) + }).catch(() => { + Vue.prototype['$message'].destroy() }) }