+
+
+
+{ms:arclist size=15 ispaging=true}
+
+{/ms:arclist}
+<#assign pagerCount=3 />
+<#assign pageCount=page.total />
+<#assign currentPage=page.cur />
+<#assign halfPagerCount=(pagerCount-1)/2/>
+<#assign showPrevMore=false />
+<#assign showNextMore=false />
+<#assign arr=[] />
+<#--判断是否有翻页-->
+<#if pageCount gt pagerCount>
+<#if currentPage gt pagerCount - halfPagerCount>
+<#assign showPrevMore=true />
+#if>
+<#if currentPage lt pageCount - halfPagerCount>
+<#assign showNextMore=true />
+#if>
+#if>
+<#--计算页码-->
+<#if showPrevMore&&!showNextMore>
+<#assign startPage=pageCount - (pagerCount - 2) />
+<#list startPage..pageCount-1 as x>
+<#assign arr=arr+[x] />
+#list>
+<#elseif !showPrevMore && showNextMore>
+<#list 2..pagerCount as x>
+<#assign arr=arr+[x] />
+#list>
+<#elseif showPrevMore && showNextMore>
+<#assign offset=(pagerCount / 2)?floor - 1 />
+<#list currentPage - offset..currentPage + offset as x>
+<#assign arr=arr+[x] />
+#list>
+<#else>
+<#list 2..pageCount as x>
+<#if x lt pageCount>
+<#assign arr=arr+[x] />
+#if>
+#list>
+#if>
+
+
+
+
+<#--第一页-->
+<#if pageCount gt 0>
+
+<#if 1==currentPage>
+1
+<#else>
+1
+#if>
+
+#if>
+<#--翻页的省略号-->
+<#if showPrevMore>
+
+...
+
+#if>
+<#--中间的页码-->
+<#list arr as x>
+
+<#if x==currentPage>
+${x}
+<#else>
+${x}
+#if>
+
+#list>
+<#-- 最后一页-->
+<#if pageCount gt 1>
+
+<#if pageCount==currentPage>
+${pageCount}
+<#else>
+${pageCount}
+#if>
+
+#if>
+
+
+
+<#--span>
+前往
+
+页
+
+
+