1 layer.confirm('<font color="red">请认真核对账目信息,提交后将不可撤回!!</font>', { 2 icon:3, 3 title:"财务确认账目操作", 4 btn: ['确定', '取消'] 5 }, function (index, layero) { 6 //提交后台 7 console.log('confirm') 8 $.post("/index.php/Admin/ServiceEvent/confirm?access_token="+token,field,function (res) { 9 if(res.code == 1){ 10 layer.msg(res.msg, {icon: 1}); 11 layui.table.reload('LAY-service-index'); //重载表格 12 layer.close(index); //执行关闭 13 }else { 14 layer.alert(res.msg,{icon:2}); 15 } 16 }); 17 layer.closeAll('dialog'); 18 },function () { 19 console.log('cancel') 20 } 21 );
layer.alert(res.msg,{icon:2});