layer 延时设置

$.ajax({
    type: 'post',
    url: "/monitor/demos/testDemos",
    data: {},
    dataType: 'json',
    success: function (result) {
        if (result.flag ==true) {
            $("#confirm").text("场景模拟成功");
            setTimeout(function () {
                layer.closeAll();
            }, 6000);
        } 
    }
});

注:https://blog.csdn.net/u013238512/article/details/79972366

你可能感兴趣的:(layui)