"rowsOfPage": 3,
"currentPage": 1,
"totalPages": 10,
"totalRows": 40,
"rowsOfPage":10,
"minRowNumber": 1,
"maxRowNumber": 3,
$scope.hasMore = false;
// $scope.dataNull=false; // 无数据提示
$scope.SName = "您当前没有待办事务";
$scope.do_refresher = function() {
$scope.currentPage = 1;
$scope.bItems = [];
ajax.post(reqUrl, {
"rowsOfPage": rowsOfPage,
"currentPage": $scope.currentPage
}, function(listdata, successful) {
if (successful) {
$scope.bItems = listdata.datas || [];
$scope.hasMore = ($scope.bItems.length < listdata.totalRows);
if ($scope.bItems.length == 0) {
$scope.dataNull = true;
} else {
$scope.dataNull = false;
}
} else {
$scope.hasMore = false;
}
$scope.$broadcast("scroll.refreshComplete");
});
/*
* 上拉加载,分批加载服务端剩余的数据
*/
$scope.do_infinite = function() {
if (!$scope.hasMore) {
$scope.$broadcast("scroll.infiniteScrollComplete");
return;
}
// 如果当前页数大于等于总页数,说明已经没数据可再加载了。
$scope.currentPage += 1;
ajax.post(reqUrl, {
"rowsOfPage": rowsOfPage,
"currentPage": $scope.currentPage
}, function(listdata, successful) {
if (successful) {
//window.debug && alert("length " + listdata.datas.length + " yeshu " + $scope.currentPage);
$scope.currentPage = listdata.currentPage;
for (var i = 0; i < listdata.datas.length; i++) {
$scope.bItems.push(listdata.datas[i]);
}
$scope.hasMore = ($scope.bItems.length < listdata.totalRows);
} else {
$scope.hasMore = false;
}
$scope.$broadcast("scroll.infiniteScrollComplete");
});
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有