From 2af534eea471f4adb104906c7a814bcc66d4d68d Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期一, 13 九月 2021 13:03:58 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev --- 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.3