layer (jQuery弹出层插件)使用

时间:2021-10-07 02:57:59
    $(".delete").click(function(){

             var work_name = $(this).data('name');
var item_id = $(this).data('id');
layer.confirm('确定删除该申请吗?', {icon: 3, title: '提示'}, function (index) {
$.get(
"/office/personner-apply/delete",
{
item_id: item_id,
work_name: work_name
},
function (data) {
if (data.code == 200) {
layer.msg(data.message, {icon: 1});
window.location.reload();
} else {
layer.msg(data.message, {icon: 2});
}
},
"json"
);
});
});