Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
563e11d9
Commit
563e11d9
authored
Dec 06, 2020
by
RuoYi
Browse files
get请求params添加null值判断
parent
ef92ad4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-ui/src/utils/request.js
View file @
563e11d9
...
...
@@ -25,7 +25,7 @@ service.interceptors.request.use(config => {
for
(
const
propName
of
Object
.
keys
(
config
.
params
))
{
const
value
=
config
.
params
[
propName
];
var
part
=
encodeURIComponent
(
propName
)
+
"
=
"
;
if
(
typeof
(
value
)
!==
"
undefined
"
)
{
if
(
value
&&
typeof
(
value
)
!==
"
undefined
"
)
{
if
(
typeof
value
===
'
object
'
)
{
for
(
const
key
of
Object
.
keys
(
value
))
{
let
params
=
propName
+
'
[
'
+
key
+
'
]
'
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment