Commit 563e11d9c1447b8865c9fa86ca3b8ec6505e5f35
1 parent
ef92ad4d
get请求params添加null值判断
Showing
1 changed file
with
1 additions
and
1 deletions
ruoyi-ui/src/utils/request.js
| @@ -25,7 +25,7 @@ service.interceptors.request.use(config => { | @@ -25,7 +25,7 @@ service.interceptors.request.use(config => { | ||
| 25 | for (const propName of Object.keys(config.params)) { | 25 | for (const propName of Object.keys(config.params)) { |
| 26 | const value = config.params[propName]; | 26 | const value = config.params[propName]; |
| 27 | var part = encodeURIComponent(propName) + "="; | 27 | var part = encodeURIComponent(propName) + "="; |
| 28 | - if (typeof(value) !== "undefined") { | 28 | + if (value && typeof(value) !== "undefined") { |
| 29 | if (typeof value === 'object') { | 29 | if (typeof value === 'object') { |
| 30 | for (const key of Object.keys(value)) { | 30 | for (const key of Object.keys(value)) { |
| 31 | let params = propName + '[' + key + ']'; | 31 | let params = propName + '[' + key + ']'; |