From a7fea1c069cd55537ab8a6743758f12c8265f159 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期一, 24 七月 2023 11:16:09 +0800
Subject: [PATCH] #权限3级硬编码

---
 src/main/webapp/static/js/priOnline/priOnline.js |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/main/webapp/static/js/priOnline/priOnline.js b/src/main/webapp/static/js/priOnline/priOnline.js
index 9ba71ad..8a2c1cc 100644
--- a/src/main/webapp/static/js/priOnline/priOnline.js
+++ b/src/main/webapp/static/js/priOnline/priOnline.js
@@ -215,7 +215,7 @@
             case "upload":
                 $.ajax({
                     type:"get",
-                    url: "/priOnline/viewCheck/" + data.id + "/auth",
+                    url: baseUrl+"/priOnline/viewCheck/" + data.id + "/auth",
                     dataType:"json",
                     headers: {'token': localStorage.getItem('token')},
                     success:function(res) {
@@ -248,16 +248,23 @@
                             return;
                         }
 
+                        let formData = new FormData($("#uploadFile")[0]);
+                        formData.append("id", data.id);
+                        formData.append("checkData", zip(exportJson.sheets));
                         $.ajax({
-                            url: "/priOnline/uploadCheck/auth",
+                            url: baseUrl+"/priOnline/uploadCheck/auth",
                             headers: {'token': localStorage.getItem('token')},
-                            data: JSON.stringify({
-                                id: data.id,
-                                checkData: zip(exportJson.sheets)
-                            }),
+                            data: formData,
+                            // data: JSON.stringify({
+                            //     id: data.id,
+                            //     checkData: zip(exportJson.sheets)
+                            // }),
+                            // dataType: "json",
                             method: 'POST',
-                            dataType: "json",
-                            contentType:'application/json;charset=UTF-8',
+                            cache: false,
+                            processData: false,
+                            contentType: false,
+                            // contentType:'application/json;charset=UTF-8',
                             success: function (res) {
                                 if (res.code == 200) {
                                     layer.msg('涓婁紶鎴愬姛',{time:1000},() => {
@@ -277,7 +284,7 @@
                 //鏌ョ湅璇环
                 $.ajax({
                     type:"get",
-                    url: "/priOnline/viewCheck/" + data.id + "/auth",
+                    url: baseUrl+"/priOnline/viewCheck/" + data.id + "/auth",
                     dataType:"json",
                     headers: {'token': localStorage.getItem('token')},
                     success:function(res) {

--
Gitblit v1.9.1