From 1c2570d63ddd3f2796bfa19f58a75b75947a1020 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 17 二月 2024 10:18:50 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/utils/http.js |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/zy-asrs-flow/src/utils/http.js b/zy-asrs-flow/src/utils/http.js
index b18dbe4..fb9e654 100644
--- a/zy-asrs-flow/src/utils/http.js
+++ b/zy-asrs-flow/src/utils/http.js
@@ -57,6 +57,21 @@
     return res;
 }
 
+const doPostBlob = async (url, params, fn) => {
+    const res = await request(url, {
+        method: 'POST',
+        headers: {
+            'Content-Type': 'application/json'
+        },
+        data: { ...params },
+        responseType: 'blob'
+    });
+    if (fn) {
+        fn(res);
+    }
+    return res;
+}
+
 const doPostPromise = (url, params, fn) => {
     return request(url, {
         method: 'POST',
@@ -77,6 +92,6 @@
     });
 }
 
-const Http = { doGet, doGetPromise, doPost, doPostForm, doPostPromise }
+const Http = { doGet, doGetPromise, doPost, doPostForm, doPostPromise, doPostBlob }
 
 export default Http;
\ No newline at end of file

--
Gitblit v1.9.1