#if paginationList??>
<#assign pageGroupSize=10/>
<#assign pageList=paginationList/>
<#assign params=""/>
<#assign url=""/>
<#if params=="">
<#if url=="">
<#assign uri=request.requestURI+"/?pageNo="/>
<#else>
<#assign uri=base+url+"/?pageNo="/>
#if>
<#else>
<#if url=="">
<#assign uri=request.requestURI+"?"+params+"&pageNo="/>
<#else>
<#assign uri=base+url+"?"+params+"&pageNo="/>
#if>
#if>
<#assign pageGroup=((pageList.pageNo + pageGroupSize - 1) / pageGroupSize)?int/>
<#assign totalPageGroup=((pageList.totalPage + pageGroupSize - 1) / pageGroupSize)?int/>
<#assign pageIndex=pageList.pageNo/> <#assign pageCount=pageList.totalPage/>
<#if pageCount gt 1>
<#if (pageIndex>1)>
首页
上一页
#if> <#--如果前面页数过多,显示"..."--> <#-- 显示前面页 --> <#if (pageIndex>=pageGroupSize)> <#--<#assign prevPages=pageIndex-(pageGroupSize*2-1)>--> <#assign prevPages=pageIndex-pageGroupSize> <#if prevPages lt 1> <#assign prevPages=1> #if> <#if pageIndex lt pageGroupSize> <#assign start=1> <#elseif (pageCount-pageIndex) lt (pageGroupSize/2)> <#assign start=pageIndex-pageGroupSize/2-((pageGroupSize/2)-(pageCount-pageIndex))+1> <#else> <#assign start=pageIndex-pageGroupSize/2+1> #if>
...
<#else> <#assign start=1> #if> <#-- 显示当前页附近的页--> <#-- 显示后面页 --> <#if pageIndex lt pageGroupSize> <#assign end=pageGroupSize> <#else> <#assign end=pageIndex+pageGroupSize/2> #if> <#if (end>pageCount)> <#assign end=pageCount> #if> <#list start..end as index> <#if pageIndex==index> <#if pageCount!=1>
${index}
#if><#else>
${index}
#if> #list> <#--如果后面页数过多,显示"...":--> <#if (end lt pageCount)> <#--<#assign end=end+5 />--> <#assign end=pageIndex+pageGroupSize /> <#if (end>pageCount)> <#assign end=pageCount /> #if>
...
#if> <#-- 显示"下一页":--> <#if (pageIndex lt pageCount)>
下一页
尾页
#if> <#if (pageCount>1)>
共${pageCount}页
#if>
#if>
#if>