<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<?php echo e(URL::asset('admin/frame/layui/css/layui.css')); ?>" media="all">
    <link rel="stylesheet" href="<?php echo e(URL::asset('admin/css/welcome.css')); ?>" media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<!--<div class="layui-btn-group demoTable">
    <button class="layui-btn" data-type="getCheckData">获取选中行数据</button>
    <button class="layui-btn" data-type="getCheckLength">获取选中数目</button>
    <button class="layui-btn" data-type="isAll">验证是否全选</button>
</div>-->


<table class="layui-hide" id="LAY_table_user" lay-filter="demo"></table>

<div class="layui-btn-group demoTable">
    <button class="layui-btn layui-btn-small" data-type="getCheckData">保存</button>
</div>

<script src="<?php echo e(URL::asset('admin/js/jquery-1.11.3.js')); ?>" charset="utf-8"></script>
<script src="<?php echo e(URL::asset('admin/frame/layui/layui.js')); ?>" charset="utf-8"></script>
<script src="<?php echo e(URL::asset('admin/js/configure.js')); ?>" charset="utf-8"></script>
<script>
    var url2 = '/admin/game/BetMoney';
    var url1 = '<?php echo e(URL::asset("admin/json/package.json")); ?>';


    layui.use(['laydate', 'laypage', 'layer', 'table'], function () {
        var laydate = layui.laydate //日期
            , laypage = layui.laypage //分页
            , laytpl = layui.laytpl;

        layer = layui.layer //弹层
            , table = layui.table //表格
            , form = layui.form;

        //获取表头
        var thead = type(1);
        //获取数据
        var returnData = getData(url2, {status: 1});
        //执行一个 table 实例
        table.render({
            elem: '#LAY_table_user'
            , even: true
            , id: 'tab'
            , cols: [[ //表头
                {field: 'id', title: 'ID', width: 100}
                , {field: 'name', title: '游戏', width: 100}
                , {field: 'big_money', title: '最大投注金额', width: 200, edit: 'text'}
                , {field: 'small_money', title: '最小投注金额', width: 200, edit: 'text'}
                , {field: 'commission_money', title: '反水金额', width: 120, edit: 'text'}
                , {field: 'commission_rate', title: '返水倍率', width: 120, edit: 'text'}
            ]]
            , data: returnData.data
            //, page: true //是否显示分页
        });


        var $ = layui.$, active = {
            getCheckData: function (json) { //获取选中数据
                var checkStatus = table.checkStatus('tab')
                    , data = table.data;
            }
        };

        $('.demoTable .layui-btn').on('click', function () {
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });

    });
</script>
</body>
</html>