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', width: 100,title: '序号',search:false},
                    {field: 'ver_name', width: 200, title: '渠道名称'},
                    {field: 'ver_code', width: 100, title: '渠道号'},
                    {field: 'app_name', width: 200, title: '对接游戏'},
                    {field: 'ver_appid', width: 100, title: '渠道appid',search:false},
                    {field: 'ver_appkey',width: 250,  title: '渠道appkey',search:false},
                    {field: 'ver_paykey', width: 250, title: '渠道paykey',search:false},
                    {field: 'add_user', width: 100, title: '添加人',search:false},
                    {field: 'add_time', width: 200, title: '添加时间',search:false},
                    {width: 250, title: '操作', templet: ea.table.tool},
                ]],
            });

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