From 856f0767b4ada087e9e2cb33f373e23dbcf39b85 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 07 三月 2023 17:56:59 +0800
Subject: [PATCH] update 同步 ruoyi * update element-ui 2.15.10 => 2.15.12 * update 优化 tagsView右选框,首页不应该存在关闭左侧选项 * update copyright 2023 * update 优化 监控页面图标显示 * update 优化 日志注解支持排除指定的请求参数 * update 优化 业务校验优化代码 * fix 修复 优化文件下载出现的异常 * fix 修复 修改密码日志存储明文问题 * add 新增 操作日志消耗时间属性 * update 优化 日志管理使用索引提升查询性能 * update 优化 框架时间检索使用时间默认值 00:00:00 - 23:59:59

---
 ruoyi-ui/src/utils/request.js |  100 +++++++++++++++++++++++++-------------------------
 1 files changed, 50 insertions(+), 50 deletions(-)

diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index f94fa0e..25243db 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -63,59 +63,59 @@
   }
   return config
 }, error => {
-    console.log(error)
-    Promise.reject(error)
+  console.log(error)
+  Promise.reject(error)
 })
 
 // 鍝嶅簲鎷︽埅鍣�
 service.interceptors.response.use(res => {
-    // 鏈缃姸鎬佺爜鍒欓粯璁ゆ垚鍔熺姸鎬�
-    const code = res.data.code || 200;
-    // 鑾峰彇閿欒淇℃伅
-    const msg = errorCode[code] || res.data.msg || errorCode['default']
-    // 浜岃繘鍒舵暟鎹垯鐩存帴杩斿洖
-    if(res.request.responseType ===  'blob' || res.request.responseType ===  'arraybuffer'){
-      return res.data
+      // 鏈缃姸鎬佺爜鍒欓粯璁ゆ垚鍔熺姸鎬�
+      const code = res.data.code || 200;
+      // 鑾峰彇閿欒淇℃伅
+      const msg = errorCode[code] || res.data.msg || errorCode['default']
+      // 浜岃繘鍒舵暟鎹垯鐩存帴杩斿洖
+      if (res.request.responseType ===  'blob' || res.request.responseType ===  'arraybuffer') {
+        return res.data
+      }
+      if (code === 401) {
+        if (!isRelogin.show) {
+          isRelogin.show = true;
+          MessageBox.confirm('鐧诲綍鐘舵�佸凡杩囨湡锛屾偍鍙互缁х画鐣欏湪璇ラ〉闈紝鎴栬�呴噸鏂扮櫥褰�', '绯荤粺鎻愮ず', { confirmButtonText: '閲嶆柊鐧诲綍', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => {
+            isRelogin.show = false;
+            store.dispatch('LogOut').then(() => {
+              location.href = process.env.VUE_APP_CONTEXT_PATH + "index";
+            })
+          }).catch(() => {
+            isRelogin.show = false;
+          });
+        }
+        return Promise.reject('鏃犳晥鐨勪細璇濓紝鎴栬�呬細璇濆凡杩囨湡锛岃閲嶆柊鐧诲綍銆�')
+      } else if (code === 500) {
+        Message({ message: msg, type: 'error' })
+        return Promise.reject(new Error(msg))
+      } else if (code === 601) {
+        Message({ message: msg, type: 'warning' })
+        return Promise.reject('error')
+      } else if (code !== 200) {
+        Notification.error({ title: msg })
+        return Promise.reject('error')
+      } else {
+        return res.data
+      }
+    },
+    error => {
+      console.log('err' + error)
+      let { message } = error;
+      if (message == "Network Error") {
+        message = "鍚庣鎺ュ彛杩炴帴寮傚父";
+      } else if (message.includes("timeout")) {
+        message = "绯荤粺鎺ュ彛璇锋眰瓒呮椂";
+      } else if (message.includes("Request failed with status code")) {
+        message = "绯荤粺鎺ュ彛" + message.substr(message.length - 3) + "寮傚父";
+      }
+      Message({ message: message, type: 'error', duration: 5 * 1000 })
+      return Promise.reject(error)
     }
-    if (code === 401) {
-      if (!isRelogin.show) {
-        isRelogin.show = true;
-        MessageBox.confirm('鐧诲綍鐘舵�佸凡杩囨湡锛屾偍鍙互缁х画鐣欏湪璇ラ〉闈紝鎴栬�呴噸鏂扮櫥褰�', '绯荤粺鎻愮ず', { confirmButtonText: '閲嶆柊鐧诲綍', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => {
-          isRelogin.show = false;
-          store.dispatch('LogOut').then(() => {
-            location.href = process.env.VUE_APP_CONTEXT_PATH + "index";
-          })
-      }).catch(() => {
-        isRelogin.show = false;
-      });
-    }
-      return Promise.reject('鏃犳晥鐨勪細璇濓紝鎴栬�呬細璇濆凡杩囨湡锛岃閲嶆柊鐧诲綍銆�')
-    } else if (code === 500) {
-      Message({ message: msg, type: 'error' })
-      return Promise.reject(new Error(msg))
-    } else if (code === 601) {
-      Message({ message: msg, type: 'warning' })
-      return Promise.reject('error')
-    } else if (code !== 200) {
-      Notification.error({ title: msg })
-      return Promise.reject('error')
-    } else {
-      return res.data
-    }
-  },
-  error => {
-    console.log('err' + error)
-    let { message } = error;
-    if (message == "Network Error") {
-      message = "鍚庣鎺ュ彛杩炴帴寮傚父";
-    } else if (message.includes("timeout")) {
-      message = "绯荤粺鎺ュ彛璇锋眰瓒呮椂";
-    } else if (message.includes("Request failed with status code")) {
-      message = "绯荤粺鎺ュ彛" + message.substr(message.length - 3) + "寮傚父";
-    }
-    Message({ message: message, type: 'error', duration: 5 * 1000 })
-    return Promise.reject(error)
-  }
 )
 
 // 閫氱敤涓嬭浇鏂规硶
@@ -127,8 +127,8 @@
     responseType: 'blob',
     ...config
   }).then(async (data) => {
-    const isLogin = await blobValidate(data);
-    if (isLogin) {
+    const isBlob = blobValidate(data);
+    if (isBlob) {
       const blob = new Blob([data])
       saveAs(blob, filename)
     } else {

--
Gitblit v1.9.3