columnNewsList.jsp 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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="second_l fl">
  17. <div class="list">
  18. <div class="position">当前位置:<a href="${ctx}/">网站首页</a>&nbsp;&#62;&nbsp;<a href="${ctxF}/columnNews">专题专栏</a>&nbsp;&#62;&nbsp;专栏列表</div>
  19. <ul>
  20. <c:forEach items="${newsList}" var="obj" >
  21. <li><a href="${ctxF}/columnNews/detail?id=${obj.id}"><strong>·</strong>${fn:substring(obj.title,0,40)}<span><fmt:formatDate value="${obj.createDate}" pattern="yyyy-MM-dd"/></span></a></li>
  22. </c:forEach>
  23. </ul>
  24. </div>
  25. <c:if test="${newsList==null || newsList.size()==0}">
  26. <li>
  27. <a href="#">暂无专题数据</a>
  28. </li>
  29. </c:if>
  30. <div style="margin:30px 0px;">
  31. <c:if test="${newsList!=null && newsList.size()>0}">
  32. <div id="pagination" style="text-align: center"></div>
  33. </c:if>
  34. </div>
  35. </div>
  36. <div class="second_r fr ">
  37. <div class="dszs">
  38. <h2><a href="#"></a></h2>
  39. <c:forEach items="${phVideoNewsList}" var="obj" begin="0" end="3">
  40. <div class="dszs_list">
  41. <ul>
  42. <li class="dszs_list_img"><img src="${obj.cover}" width="100" height="80"></li>
  43. <li class="dszs_list_tit">
  44. <h4><a href="${ctxF}/videonews/detail?typeId=${obj.typeId}&id=${obj.id}">${obj.title}</a></h4>
  45. <p>${obj.contents}</p>
  46. </li>
  47. </ul>
  48. </div>
  49. </c:forEach>
  50. </div>
  51. <div class="dszs2">
  52. <h2><a href="#">更多</a></h2>
  53. <ul class="list_rq clearfix">
  54. <c:forEach items="${zxVideoNewsList}" var="obj">
  55. <li>
  56. <a href="${ctxF}/videonews/detail?typeId=${obj.typeId}&id=${obj.id}" class="red_txt"><i>·</i>${obj.title}</a>
  57. </li>
  58. </c:forEach>
  59. </ul>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="footer clearfix">
  64. <%@ include file="/webpage/modules/web/footer.jsp"%>
  65. </div>
  66. <script src="${pageContext.request.contextPath}/static/plugin/layui/dist/layui.js"></script>
  67. <!-- 注意:如果你直接复制所有代码到本地,上述js路径需要改成你本地的 -->
  68. <script>
  69. layui.use(['laypage', 'layer'], function(){
  70. var laypage = layui.laypage
  71. ,layer = layui.layer;
  72. laypage.render({
  73. elem: 'pagination'
  74. ,count: ${page.count}//从服务器得到数据总数
  75. ,limit: ${page.pageSize}//每页展示多少条数据
  76. ,curr: ${page.pageNo}
  77. ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
  78. ,jump: function (obj, first) {
  79. //obj包含了当前分页的所有参数,比如:
  80. //console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
  81. //console.log(obj.limit); //得到每页显示的条数
  82. //首次不执行
  83. if (!first) {
  84. //do something
  85. var title = $('#searchText').val()
  86. var href = '${ctxF}/columnNews/list';
  87. href += '?pageNo=' + obj.curr;
  88. href += '&pageSize=' + obj.limit;
  89. //console.log(href)
  90. location.href = href;
  91. }
  92. }
  93. ,theme: '#c7301e'
  94. });
  95. });
  96. </script>
  97. </body>
  98. </html>