简单调用ajax的方法

var baseURL="https://xxxxxxxx/api/";

function ajaxData(url, pdata, clallback) {
$.ajaxSetup({ cache: false });
$.ajax({
url: baseURL+ url,

type: "GET",

data: pdata,
dataType: 'JSON',
success: function (response) {
clallback(response);
},
error: function (response) {
clallback(response);
}
});
}

posted @ 2020-05-18 23:19  懵懵懂懂的小孩啊  阅读(199)  评论(0)    收藏  举报