From 5188d56b4aa85743b10ef4feb595295ad5cb9b90 Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: 星期六, 18 九月 2021 18:41:03 +0800
Subject: [PATCH] !321 修复 全局限流key会多出一个"-" 将其移动到IP后面 去除多余的空格 Merge pull request !321 from 疯狂的狮子Li/N/A

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

diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index 6a7cbfa..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,7 +66,7 @@
           location.href = '/index';
         })
       }).catch(() => {});
-      return Promise.reject('error')
+      return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
     } else if (code === 500) {
       Message({
         message: msg,

--
Gitblit v1.9.2