From 20ce9da509036d856b4297c162442e8a8b414d7b Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Tue, 27 Jul 2021 13:08:37 +0800
Subject: [PATCH] 修复任意账户越权问题

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

diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index ece18a2..46a593b 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -27,7 +27,7 @@
     for (const propName of Object.keys(config.params)) {
       const value = config.params[propName];
       var part = encodeURIComponent(propName) + "=";
-      if (typeof(value) !== "undefined") {
+      if (value !== null && typeof(value) !== "undefined") {
         if (typeof value === 'object') {
           for (const key of Object.keys(value)) {
             let params = propName + '[' + key + ']';
@@ -65,7 +65,8 @@
         store.dispatch('LogOut').then(() => {
           location.href = '/index';
         })
-      })
+      }).catch(() => {});
+      return Promise.reject('error')
     } else if (code === 500) {
       Message({
         message: msg,

--
Gitblit v1.9.3