columns.jsp 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/webpage/include/taglibf.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <meta charset="utf-8">
  7. <title>${fns:getConfig("productName")}</title>
  8. <link rel="stylesheet" href="${ctxStaticWeb}/css/base.css" />
  9. <link rel="stylesheet" href="${ctxStaticWeb}/css/second.css" />
  10. <link href="${ctx}/static/plugin/layui/dist/css/layui.css" rel="stylesheet"/>
  11. <script src="${ctx}/static/web/js/jquery-2.1.4.js"></script>
  12. </head>
  13. <body>
  14. <%@ include file="/webpage/modules/web/top.jsp"%>
  15. <div class="new w">
  16. <div class="position">当前位置:<a href="${ctx}/">网站首页</a>&nbsp;&#62;&nbsp;专题专栏</div>
  17. </div>
  18. <div class="new w">
  19. <div class="ztzl">
  20. <ul>
  21. <c:forEach items="${columnsList}" var="obj" >
  22. <li>
  23. <c:if test="${obj.isOuterChain == 1}">
  24. <a href="${obj.url}" target="blank"><img src="${obj.cover}" width="380" height="125"><p>${obj.title}</p></a>
  25. </c:if>
  26. <c:if test="${obj.isOuterChain ==null || obj.isOuterChain == ''|| obj.isOuterChain ==2}">
  27. <a href="${ctxF}/columnNews/list?columnId.id=${obj.id}"><img src="${obj.cover}" width="380" height="125"><p>${obj.title}</p></a>
  28. </c:if>
  29. </li>
  30. </c:forEach>
  31. <c:if test="${columnsList==null || columnsList.size()==0}">
  32. <li>
  33. <a href="#">暂无数据</a>
  34. </li>
  35. </c:if>
  36. </ul>
  37. </div>
  38. <div>
  39. <c:if test="${columnsList!=null && columnsList.size()>0}">
  40. <div id="pagination" style="text-align: center"></div>
  41. </c:if>
  42. </div>
  43. </div>
  44. <%@ include file="/webpage/modules/web/footer.jsp"%>
  45. <script src="${pageContext.request.contextPath}/static/plugin/layui/dist/layui.js"></script>
  46. <!-- 注意:如果你直接复制所有代码到本地,上述js路径需要改成你本地的 -->
  47. <script>
  48. layui.use(['laypage', 'layer'], function(){
  49. var laypage = layui.laypage
  50. ,layer = layui.layer;
  51. laypage.render({
  52. elem: 'pagination'
  53. ,count: ${page.count}//从服务器得到数据总数
  54. ,limit: ${page.pageSize}//每页展示多少条数据
  55. ,curr: ${page.pageNo}
  56. ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
  57. ,jump: function (obj, first) {
  58. //obj包含了当前分页的所有参数,比如:
  59. //console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
  60. //console.log(obj.limit); //得到每页显示的条数
  61. //首次不执行
  62. if (!first) {
  63. //do something
  64. var title = $('#searchText').val()
  65. var href = '${ctxF}/columnNews';
  66. href += '?pageNo=' + obj.curr;
  67. href += '&pageSize=' + obj.limit;
  68. //console.log(href)
  69. location.href = href;
  70. }
  71. }
  72. ,theme: '#c7301e'
  73. });
  74. });
  75. </script>
  76. </body>
  77. </html>