cosyer

function test(callback){
$.ajax({
url:\'/mall/credit\',
type: \'get\',
dataType:\'json\',

processData: false, // 告诉jQuery不要去处理发送的数据
contentType: false, // 告诉jQuery不要去设置Content-Type请求头

success: function(response){
credit = response.data.credit;
callback(credit);
},
error: function(){
alert("error");
}
});
}
test(function(data){
console.log(data);
})

分类:

技术点:

相关文章: