define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'app.ver_game/index',
        add_url: 'app.ver_game/add',
        edit_url: 'app.ver_game/edit',
        delete_url: 'app.ver_game/delete',
        export_url: 'app.ver_game/export',
        modify_url: 'app.ver_game/modify',
    };

    var Controller = {

        index: function () {
            ea.table.render({
                init: init,
                cols: [[
                    {type: 'checkbox'},
                    {field: 'id', title: '序号',search:false},
                    {field: 'ver_name', title: '渠道名称'},
                    {field: 'ver_code', title: '渠道号'},
                    {field: 'app_name', title: '对接游戏'},
                    {field: 'ver_appid', title: '渠道appid',search:false},
                    {field: 'ver_appkey', title: '渠道appkey',search:false},
                    {field: 'ver_paykey', title: '渠道paykey',search:false},
                    {field: 'add_user', title: '添加人',search:false},
                    {field: 'add_time', title: '添加时间',search:false},
                    {width: 250, title: '操作', templet: ea.table.tool},
                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
    };
    return Controller;
});
