define (['doT', 'text!temp/auth_rule_index_template_tpl.html', 'css!style/home.css','pagination','bootstrapJs'], function (doT, template) {
authRule={
    pageNo:1,
    pageSize:15,
    init:function () {
       //初始化dot
       $("body").append(template);
       authRule.getList();
       authRule.event();
    },
    event:function () {

    },
    getList:function(pageNo){
        authRule.pageNo =pageNo;
        var params ={};
        params.pageNo =authRule.pageNo;
        params.pageSize=authRule.pageSize;
        $.ajax({
            url: '/index/AuthRulelist.html',
            type: 'GET',
            async: true,
            data: params,
            dataType: 'json',
            success: function (data) {
            var temp=document.getElementById('auth_rule_index_tpl').innerHTML;
            var doTempl=doT.template(temp);
            $("#auth_rule_list").html(doTempl(data.data.list));
                /*分页代码*/
                $ ("#pagediv").pagination ({
                    length: data.data.total,
                    current: pageNo,
                    every: authRule.pageSize,
                    onClick: function (el) {
                        authRule.getList (el.num.current);
                    }
                });
            }
        })
    }

}
    return authRule;
});