From d6aa663043a23bb37f1c712a19424690c5a2062f Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 03 十一月 2026 09:35:12 +0800
Subject: [PATCH] nhfy@0230
---
src/utils/request.js | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/utils/request.js b/src/utils/request.js
index ea1f0f8..67bf73b 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -148,9 +148,22 @@
}
);
+// 閫氱敤璇锋眰 Blob锛堣〃鍗曟牸寮忥級锛岀敤浜庤В鏋愬悗绔鍑虹殑 Excel
+export function downloadBlob(url, params, config) {
+ return service.post(url, params, {
+ transformRequest: [
+ (params) => {
+ return tansParams(params);
+ },
+ ],
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
+ responseType: "arraybuffer",
+ ...config,
+ });
+}
+
// 閫氱敤涓嬭浇鏂规硶
-export function download(url, params, filename, config) {
- downloadLoadingInstance = Loading.service({
+export function download(url, params, filename, config) { downloadLoadingInstance = Loading.service({
text: "姝e湪涓嬭浇鏁版嵁锛岃绋嶅��",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
--
Gitblit v1.9.3