mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-31 14:33:44 +00:00
eslint apply all
This commit is contained in:
+11
-12
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user