0){ let pages = Math.ceil(data.total/data.page_size); //翻页 laypage({ cont: $('#page'), pages: pages, skip: false, skin: '#00468c', groups: pages > 5 ? 5 : pages, first: '首页', last: '尾页', curr: location.hash.replace('#!fenye=', ''), //获取起始页 hash: 'fenye', //自定义hash值 jump: function(p, first){ //obj包含了当前分页的所有参数,比如: //console.log(p.curr); //得到当前页,以便向服务端请求对应页的数据。 //首次不执行 if(!first){ get_line(p.curr); } } }); }else{ $('#page').html(''); } } },'json'); }