mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 10:59:42 +08:00
fix:buildApi无数据情况下url多余?问题 (#5649)
This commit is contained in:
parent
a04e95c68c
commit
3a564380ce
@ -199,7 +199,10 @@ export function buildApi(
|
||||
api.url = api.url.substring(0, idx) + '?' + qsstringify(params);
|
||||
} else {
|
||||
api.query = data;
|
||||
api.url += '?' + qsstringify(data);
|
||||
const query = qsstringify(data);
|
||||
if (query) {
|
||||
api.url = `${api.url}?${query}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -213,7 +216,10 @@ export function buildApi(
|
||||
api.url = api.url.substring(0, idx) + '?' + qsstringify(params);
|
||||
} else {
|
||||
api.query = api.data;
|
||||
api.url += '?' + qsstringify(api.data);
|
||||
const query = qsstringify(api.data);
|
||||
if (query) {
|
||||
api.url = `${api.url}?${query}`;
|
||||
}
|
||||
}
|
||||
delete api.data;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user