0
点赞
收藏
分享

微信扫一扫

公用的ajax模板

丹柯yx 2022-07-14 阅读 94

//一个公用的ajax模板

function loadKind() {

let sendData = {};

$.ajax({

type: 'get',

url : '/api/species',

//url: '/api/one/new/list?p=1',

data: sendData,

dataType: 'json',

success: function (data) {

if (data) {

//请求成功

} else {

alert(data.msg);

}

},

error: function () {

//alert("");

}

});

}//一个公用的ajax模板

function loadKind() {

let sendData = {};

$.ajax({

type: 'get',

url : '/api/species',

//url: '/api/one/new/list?p=1',

data: sendData,

dataType: 'json',

success: function (data) {

if (data) {

//请求成功

} else {

alert(data.msg);

}

},

error: function () {

//alert("");

}

});

}

举报

相关推荐

0 条评论