Commit 1318f1e86a59ab4901978e9712e15d830f347ed0
1 parent
26532859
直播页码
Showing
2 changed files
with
48 additions
and
1 deletions
src/main/java/com/cnlive/shenhe/controller/LiveController.java
| ... | ... | @@ -126,7 +126,7 @@ public class LiveController { |
| 126 | 126 | Integer spid = sessionUser.getSpid(); |
| 127 | 127 | String userId = sessionUser.getUserId(); |
| 128 | 128 | if (CommonUtils.isNull(page)) page = 1; |
| 129 | - if (CommonUtils.isNull(pageSize)) pageSize = 60; | |
| 129 | + if (CommonUtils.isNull(pageSize)) pageSize = 30; | |
| 130 | 130 | if (CommonUtils.isNotEmpty(sp_desc) && spid == 0) { |
| 131 | 131 | ShySites shySite=sitesService.findspidBySpdesc(sp_desc); |
| 132 | 132 | if(CommonUtils.isNotNull(shySite)){ | ... | ... |
src/main/resources/templates/page/live.html
| ... | ... | @@ -182,6 +182,8 @@ |
| 182 | 182 | </div> |
| 183 | 183 | </div> |
| 184 | 184 | |
| 185 | + <div class="fixed-table-container" style="padding-bottom: 0px;"> | |
| 186 | + <div class="fixed-table-body"> | |
| 185 | 187 | <table id="table"> |
| 186 | 188 | <div> |
| 187 | 189 | <div class="col-xs-2 col-lg-2 margin-bottom action" th:each="live : ${livePage.list}"> |
| ... | ... | @@ -278,7 +280,52 @@ |
| 278 | 280 | |
| 279 | 281 | </div> |
| 280 | 282 | </table> |
| 283 | + </div> | |
| 284 | + | |
| 281 | 285 | |
| 286 | + <!--分页处理--> | |
| 287 | + <div class="fixed-table-pagination" style="display: block;"> | |
| 288 | + <div class="pull-left pagination-detail"><span class="pagination-info" | |
| 289 | + th:text="'共 '+${livePage.total}+' 条记录'">共 0 条记录</span> | |
| 290 | + </div> | |
| 291 | + <div class="pull-right pagination"> | |
| 292 | + <ul class="pagination" th:if="${livePage.pages>1}"> | |
| 293 | + <li class="page-pre"><a th:href="'javascript:fanye(1);'">‹‹</a></li> | |
| 294 | + <li class="page-pre" th:if="${!livePage.isFirstPage}"><a | |
| 295 | + th:onclick="'javascript:fanye(\''+${livePage.pageNum-1}+'\');'">‹</a> | |
| 296 | + </li> | |
| 297 | + | |
| 298 | + <li class="page-number" th:if="${livePage.pageNum-3>=1}"><a | |
| 299 | + th:onclick="'javascript:fanye(\''+${livePage.pageNum-3}+'\');'" | |
| 300 | + th:text="${livePage.pageNum-3}">2</a></li> | |
| 301 | + <li class="page-number" th:if="${livePage.pageNum-2>=1}"><a | |
| 302 | + th:onclick="'javascript:fanye(\''+${livePage.pageNum-2}+'\');'" | |
| 303 | + th:text="${livePage.pageNum-2}">2</a></li> | |
| 304 | + <li class="page-number" th:if="${livePage.pageNum-1>=1}"><a | |
| 305 | + th:onclick="'javascript:fanye(\''+${livePage.pageNum-1}+'\');'" | |
| 306 | + th:text="${livePage.pageNum-1}">2</a></li> | |
| 307 | + <li class="page-number active"><a href="javaScript:void(0);" | |
| 308 | + th:text="${livePage.pageNum}">2</a></li> | |
| 309 | + <li class="page-number" th:if="${livePage.pageNum+1<=livePage.pages}"><a | |
| 310 | + th:onclick="'javascript:fanye(\''+${livePage.pageNum+1}+'\');'" | |
| 311 | + th:text="${livePage.pageNum+1}">2</a></li> | |
| 312 | + <li class="page-number" th:if="${livePage.pageNum+2<=livePage.pages}"><a | |
| 313 | + th:onclick="'javascript:fanye(\''+${livePage.pageNum+2}+'\');'" | |
| 314 | + th:text="${livePage.pageNum+2}">2</a></li> | |
| 315 | + <li class="page-number" th:if="${livePage.pageNum+3<=livePage.pages}"><a | |
| 316 | + th:onclick="'javascript:fanye(\''+${livePage.pageNum+3}+'\');'" | |
| 317 | + th:text="${livePage.pageNum+3}">2</a></li> | |
| 318 | + | |
| 319 | + <li class="page-next" th:if="${!livePage.isLastPage}"><a | |
| 320 | + th:onclick="'javascript:fanye(\''+${livePage.pageNum+1}+'\');'">›</a> | |
| 321 | + </li> | |
| 322 | + <li class="page-next"><a | |
| 323 | + th:onclick="'javascript:fanye(\''+${livePage.pages}+'\');'">››</a> | |
| 324 | + </li> | |
| 325 | + </ul> | |
| 326 | + </div> | |
| 327 | + </div> | |
| 328 | + </div> | |
| 282 | 329 | </div> |
| 283 | 330 | </div> |
| 284 | 331 | </div> | ... | ... |