//ajax请求
function ajaxUtils(url, method, async, param, beforeCallback, successCallback, errorCallback) {
param.token = token;
$.ajax({
type: method,
url: url,
async: async,
data: param,
dataType:'json',
beforeSend:function(a) {
console.log("before send");
beforeCallback();
},
success:function(data) {
console.log(data);
successCallback(data);
},
error:function(a, b, c) {
console.log(url +"请求错误");
errorCallback();
}
});
}