lanjianrong 3 years atrás
parent
commit
18a803917a
1 changed files with 5 additions and 6 deletions
  1. 5 6
      app/public/js/global.js

+ 5 - 6
app/public/js/global.js

@@ -127,7 +127,6 @@ $(function(){
         cache: false,
         timeout: 60000,
         success: function ({code = -1, data: { exist, is_admin, redirect } = { exist: 0, is_admin: false}}) {
-          console.log(redirect);
           if (code === 0) {
               if (!exist && !is_admin) {
                 toastr.error('「项目管理」系统不存在当前项目,请联系管理员进行处理');
@@ -427,15 +426,15 @@ const postCompressFile = function (url, data, successCallback, errorCallBack) {
       url: url,
       data: {'data': JSON.stringify(data)},
       // dataType: 'blob',
-      // cache: false,
+      cache: false,
       timeout: 180000,
       xhrFields: {
         responseType: 'blob'
       },
-      // beforeSend: function(xhr) {
-      //     let csrfToken = Cookies.get('csrfToken_j');
-      //     xhr.setRequestHeader('x-csrf-token', csrfToken);
-      // },
+      beforeSend: function(xhr) {
+          let csrfToken = Cookies.get('csrfToken_j');
+          xhr.setRequestHeader('x-csrf-token', csrfToken);
+      },
       success: function(result){
           // if (result.err === 0) {
           //     if (successCallback) {