layui.define(["layer"], function (exports) {
    var okLayer = {
        tableNotCheckMsg: function () {
            layer.msg("未选择有效数据", {offset: "t", anim: 6});
        },
        confirm: function (content, yesFunction) {
            var options = {skin: "layui-layer-lan", icon: 2, title: "提示", anim: 6};
            layer.confirm(content, options, yesFunction);
        },
        tableCheck: function (table) {
            var checkStatus = table.checkStatus("tableId");
            var rows = checkStatus.data.length;
            if (rows > 0) {
                var idsStr = "";
                for (var i = 0; i < checkStatus.data.length; i++) {
                    idsStr += checkStatus.data[i].id + ",";
                }
                return idsStr;
            } else {
                layer.msg("未选择有效数据", {offset: "t", anim: 6});
            }
        },
        ajax: function () {

        }
    }

    exports("okLayer", okLayer);
});
