From 34a6f2e1f12786d2da4e2db1edd92163e7e5be62 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 01 Sep 2021 14:03:59 +0800
Subject: [PATCH] 查询列表设置数据字典样式回显

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

diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index 14879eb..bff35c3 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -23,22 +23,7 @@
   }
   // get请求映射params参数
   if (config.method === 'get' && config.params) {
-    let url = config.url + '?';
-    for (const propName of Object.keys(config.params)) {
-      const value = config.params[propName];
-      var part = encodeURIComponent(propName) + "=";
-      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]) + "&";
-          }
-        } else {
-          url += part + encodeURIComponent(value) + "&";
-        }
-      }
-    }
+    let url = config.url + '?' + tansParams(config.params);
     url = url.slice(0, -1);
     config.params = {};
     config.url = url;
@@ -66,6 +51,7 @@
           location.href = '/index';
         })
       }).catch(() => {});
+      return Promise.reject('令牌验证失败')
     } else if (code === 500) {
       Message({
         message: msg,

--
Gitblit v1.9.3