feat: 调整get方法 data 参数自动转query

merge/2/HEAD
coding 2018-03-18 12:06:27 +00:00
parent 755d4b005d
commit 320cc0479e
1 changed files with 3 additions and 2 deletions

View File

@ -123,10 +123,11 @@ var http = {
};
['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 || {}, {
url: url,
method: method
method: method,
query: data
}));
}
});