使用layui
//设置load
var inload = layer.load(2, { shade: [0.5, '#555'] });
var por1 = $.ajax({
url: "",
method: 'post',
data: {},
dataType: 'JSON',
success: function (res) {
}
})
var por2 = $.ajax({
url: "",
method: 'post',
data: {},
dataType: 'JSON',
success: function (res) {
}
})
//加载完成关闭load
$.when(por1, por2).done(function () {
layer.close(inload)
});