feat: 调整get方法 data 参数自动转query
This commit is contained in:
parent
755d4b005d
commit
320cc0479e
@ -123,10 +123,11 @@ var http = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
['GET', 'DELETE', 'HEAD', 'OPTIONS'].forEach(function (method) {
|
['GET', 'DELETE', 'HEAD', 'OPTIONS'].forEach(function (method) {
|
||||||
http[method.toLowerCase()] = function __likeGet__(url, config) {
|
http[method.toLowerCase()] = function __likeGet__(url, data, config) {
|
||||||
return this.request(Object.assign(config || {}, {
|
return this.request(Object.assign(config || {}, {
|
||||||
url: url,
|
url: url,
|
||||||
method: method
|
method: method,
|
||||||
|
query: data
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user