From b477e40d3c98d06c5bd680b1eb3dd2ba6b230d6d Mon Sep 17 00:00:00 2001
From: lihy2021 <lihy2021@hotmail.com>
Date: 星期五, 24 九月 2021 08:41:43 +0800
Subject: [PATCH] 优化 记录登录信息,移除不必要的修改

---
 ruoyi-ui/src/utils/request.js |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index a510d2d..9b40b4a 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -28,9 +28,11 @@
       if (value !== null && typeof(value) !== "undefined") {
         if (typeof value === 'object') {
           for (const key of Object.keys(value)) {
-            let params = propName + '[' + key + ']';
-            var subPart = encodeURIComponent(params) + "=";
-            url += subPart + encodeURIComponent(value[key]) + "&";
+            if (value[key] !== null && typeof (value[key]) !== 'undefined') {
+              let params = propName + '[' + key + ']';
+              let subPart = encodeURIComponent(params) + '=';
+              url += subPart + encodeURIComponent(value[key]) + '&';
+            }
           }
         } else {
           url += part + encodeURIComponent(value) + "&";
@@ -64,6 +66,7 @@
           location.href = '/index';
         })
       }).catch(() => {});
+      return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
     } else if (code === 500) {
       Message({
         message: msg,

--
Gitblit v1.9.2