/// <reference path="jquery-1.10.2.min.js" />
var pageindex = 1;
var pagesize = 10;
var pagecount = 0;




$(function(){
    $.post("/ajax/Overall.ashx", { "pageindex": pageindex, "pagesize": pagesize, "type": "SoftList" }, function (data) {
        var data = eval('(' + data + ')');
        pagecount = data.pagecount;
        $(".new_list_right table tbody").html("").append(data.pagelist);
        layui.use(['laypage', 'layer'], function () {
            var nums = pagesize; //每页出现的数据量
            var laypage = layui.laypage
            , layer = layui.layer;
            laypage.render({
                elem: 'pager'
               , count: pagecount //总页数
               , groups: 1
                , jump: function (obj) {
                    pageindex = obj.curr;//获取到当前页
                    $.post("/ajax/Overall.ashx", { "pageindex": pageindex, "pagesize": pagesize, "type": "SoftList" }, function (data) {
                        var data = eval('(' + data + ')');
                        pagecount = data.pagecount;
                        $(".new_list_right table tbody").html("").append(data.pagelist);

                    });

                }
            });
        });

    });
});