From 04edd66199af5abe74c2a9480f725f92d0f485cc Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: Wed, 28 Jul 2021 13:01:49 +0800
Subject: [PATCH] !90 【轻量级PR】SysUserController remove  解决把自己删除的bug Merge pull request !90 from dazer007/secerity-fix-remove-self-ok

---
 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 0dcb7ed..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 (value && 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