From 4d8f0c85660d7dd77199e86e9af9e945a1611e52 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期一, 08 七月 2024 09:41:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/utils/request.js |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/src/utils/request.js b/src/utils/request.js
index 5457ae2..85b7402 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -104,10 +104,25 @@
   return request(false, query)
 }
 
+const download = function (url, params) {
+  const query = {
+    baseURL: process.env.VUE_APP_URL,
+    url: url,
+    method: 'get',
+    withCredentials: true,
+    timeout: 300000,
+    params: params,
+    responseType: 'blob', // 鍏抽敭
+    headers: { 'Content-Type': 'application/vnd.ms-excel' }// 绫诲瀷淇敼涓篹xcel
+  }
+  return request(false, query)
+}
+
 export {
   post,
   postWithLoadTip,
   postWithOutLoadTip,
   get,
-  form
+  form,
+  download
 }

--
Gitblit v1.8.0