分页查询

var begin ;

var end;

var currentPage  = data.currentPage;

var totalPage= data.totalPage;

end=  currentPage  + 4;

if(end >= totalPage){

  end = totalPage

}

begin= currentPage  - 5;

if(begin <=1 ){

  begin = 1;

}

if(currentPage  < 6 && totalPage >=10){

  begin = 1;

  end = 10;

}

for(let i = begin ; i <= end ; i++){}

 

posted @ 2020-11-30 23:05  nbg  阅读(37)  评论(0编辑  收藏  举报