根据数据总数来计算分多少页
var _sPage = Math.ceil(parseInt(page.total, 10) / 10);//向上取整 $scope.sPage = []; for(var i = 0;i < _sPage;i++){ $scope.sPage.push(i+1); }