代码逻辑如下:
// 计算当前页的个数 if (allCount - page * 10 >= 0){
currentCount = 10;
}else{
currentCount = allCount - (page - 1) * 10;
}
allCount是总数,page是当前的页码,currentCount就是当前要显示的数目。