From 65a176dbc0e9c81781bb4db176f51aa4fd3dc3d3 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期五, 17 五月 2024 17:37:28 +0800
Subject: [PATCH] fix:修改随机试卷回显
---
src/utils/request.js | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/utils/request.js b/src/utils/request.js
index 43763a6..9c397ae 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -99,11 +99,26 @@
withCredentials: true,
timeout: 30000,
data: params,
- responseType: 'blob',//鍏抽敭
- headers: {'Content-Type': 'application/vnd.ms-excel',}//绫诲瀷淇敼涓篹xcel
+ responseType: 'blob', // 鍏抽敭
+ headers: { 'Content-Type': 'application/vnd.ms-excel' }// 绫诲瀷淇敼涓篹xcel
}
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 const down = function (url, params) {
const query = {
baseURL: process.env.VUE_APP_URL,
@@ -112,7 +127,7 @@
withCredentials: true,
timeout: 30000,
data: params,
- headers: { responseType: 'blob', 'Content-Type': 'multipart/form-data', 'request-ajax': true}
+ headers: { responseType: 'blob', 'Content-Type': 'multipart/form-data', 'request-ajax': true }
}
return request(false, query)
}
@@ -122,5 +137,5 @@
postWithOutLoadTip,
get,
form,
-
+ download
}
--
Gitblit v1.8.0