videoList.jsp 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. <script type="text/javascript">
  13. function openLive(){
  14. window.open('http://dygbjy.12371.cn/zbpd/', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no');
  15. }
  16. </script>
  17. </head>
  18. <body>
  19. <%@ include file="/webpage/modules/web/top.jsp"%>
  20. <div class="new w">
  21. <div class="position">当前位置:<a href="${ctx}/">网站首页</a>&nbsp;&#62;&nbsp;${typeName}</div>
  22. </div>
  23. <div class="new w">
  24. <div class="byfc clearfix">
  25. <ul>
  26. <c:forEach items="${newsList}" var="obj" >
  27. <li>
  28. <c:choose>
  29. <c:when test="${obj.typeId == '2'}">
  30. <div onclick="openLive()"><img src="${obj.cover}" width="250" height="160"><p> ${fn:substring(obj.title,0,30)}</p><i></i></div>
  31. </c:when>
  32. <c:otherwise>
  33. <a href="${ctxF}/videonews/detail?typeId=${obj.typeId}&id=${obj.id}"><img src="${obj.cover}" width="250" height="160"><p> ${fn:substring(obj.title,0,30)}</p><i></i></a>
  34. </c:otherwise>
  35. </c:choose>
  36. </li>
  37. </c:forEach>
  38. <c:if test="${newsList==null || newsList.size()==0}">
  39. <li>
  40. <a href="#">暂无数据</a>
  41. </li>
  42. </c:if>
  43. </ul>
  44. </div>
  45. <div>
  46. <c:if test="${newsList!=null && newsList.size()>0}">
  47. <div id="pagination" style="text-align: center"></div>
  48. </c:if>
  49. </div>
  50. </div>
  51. <div class="footer">
  52. <%@ include file="/webpage/modules/web/footer.jsp"%>
  53. </div>
  54. <script src="${pageContext.request.contextPath}/static/plugin/layui/dist/layui.js"></script>
  55. <script>
  56. layui.use(['laypage', 'layer'], function(){
  57. var laypage = layui.laypage
  58. ,layer = layui.layer;
  59. laypage.render({
  60. elem: 'pagination'
  61. ,count: ${page.count}//从服务器得到数据总数
  62. ,limit: ${page.pageSize}//每页展示多少条数据
  63. ,curr: ${page.pageNo}
  64. ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
  65. ,jump: function (obj, first) {
  66. //obj包含了当前分页的所有参数,比如:
  67. //console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
  68. //console.log(obj.limit); //得到每页显示的条数
  69. //首次不执行
  70. if (!first) {
  71. //do something
  72. var title = $('#searchText').val()
  73. var href = '${ctxF}/videonews?typeId=${typeIds}';
  74. href += '&pageNo=' + obj.curr;
  75. href += '&pageSize=' + obj.limit;
  76. location.href = href;
  77. }
  78. }
  79. ,theme: '#c7301e'
  80. });
  81. });
  82. </script>
  83. </body>
  84. </html>