From dc4a121795188febcc60ef39346c519c852b6c93 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 06 十一月 2023 15:11:36 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/contract/contract.js |   44 +++++++++++++++++++++-----------------------
 1 files changed, 21 insertions(+), 23 deletions(-)

diff --git a/src/main/webapp/static/js/contract/contract.js b/src/main/webapp/static/js/contract/contract.js
index 564887d..48362f9 100644
--- a/src/main/webapp/static/js/contract/contract.js
+++ b/src/main/webapp/static/js/contract/contract.js
@@ -432,30 +432,28 @@
             headers: {'token': localStorage.getItem('token')},
             data: data,
             method: 'GET',
-            xhrFields: {
-                responseType: "blob" // 璁剧疆鍝嶅簲绫诲瀷涓轰簩杩涘埗鏁版嵁
-            },
             success: function (res) {
-                // 鍒涘缓涓�涓复鏃剁殑涓嬭浇閾炬帴
-                const url = window.URL.createObjectURL(res);
-                // 鍒涘缓涓�涓殣钘忕殑 <a> 鍏冪礌骞惰缃笅杞介摼鎺�
-                const a = document.createElement("a");
-                a.style.display = "none";
-                a.href = url;
-
-                let list = data.filepath.split(".")
-                let suffix = "." + list[list.length - 1]//鑾峰彇鍚庣紑鍚�
-                a.download = data.name + suffix; // 鎸囧畾涓嬭浇鐨勬枃浠跺悕
-                document.body.appendChild(a);
-
-                // 瑙﹀彂鐐瑰嚮浜嬩欢浠ュ紑濮嬩笅杞�
-                a.click();
-
-                // 娓呯悊涓存椂璧勬簮
-                setTimeout(function () {
-                    window.URL.revokeObjectURL(url);
-                    document.body.removeChild(a);
-                }, 100);
+                location.href = res.data
+                // // 鍒涘缓涓�涓复鏃剁殑涓嬭浇閾炬帴
+                // const url = window.URL.createObjectURL(res);
+                // // 鍒涘缓涓�涓殣钘忕殑 <a> 鍏冪礌骞惰缃笅杞介摼鎺�
+                // const a = document.createElement("a");
+                // a.style.display = "none";
+                // a.href = url;
+                //
+                // let list = data.filepath.split(".")
+                // let suffix = "." + list[list.length - 1]//鑾峰彇鍚庣紑鍚�
+                // a.download = data.name + suffix; // 鎸囧畾涓嬭浇鐨勬枃浠跺悕
+                // document.body.appendChild(a);
+                //
+                // // 瑙﹀彂鐐瑰嚮浜嬩欢浠ュ紑濮嬩笅杞�
+                // a.click();
+                //
+                // // 娓呯悊涓存椂璧勬簮
+                // setTimeout(function () {
+                //     window.URL.revokeObjectURL(url);
+                //     document.body.removeChild(a);
+                // }, 100);
             }
         });
     }

--
Gitblit v1.9.1