eslint apply all

This commit is contained in:
zuiidea
2017-03-14 20:03:21 +08:00
parent 23540e4394
commit 47e7d580bb
52 changed files with 692 additions and 601 deletions
+11 -12
View File
@@ -3,18 +3,17 @@ import Ajax from 'robe-ajax'
export default function request (url, options) {
if (options.cross) {
return Ajax.getJSON('http://query.yahooapis.com/v1/public/yql', {
q: "select * from json where url='" + url + '?' + Ajax.param(options.data) + "'",
format: 'json'
})
} else {
return Ajax.ajax({
url: url,
method: options.method || 'get',
data: options.data || {},
processData: options.method === 'get',
dataType: 'JSON'
}).done((data) => {
return data
q: `select * from json where url='${url}?${Ajax.param(options.data)}'`,
format: 'json',
})
}
return Ajax.ajax({
url,
method: options.method || 'get',
data: options.data || {},
processData: options.method === 'get',
dataType: 'JSON',
}).done((data) => {
return data
})
}