policyQuestionList.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <!DOCTYPE html>
  2. <html lang="en"
  3. xmlns:th="http://www.thymeleaf.org"
  4. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  5. layout:decorate="~{home/common/common}">
  6. <head>
  7. <meta charset="UTF-8">
  8. <title th:text="${navigation_name}"></title>
  9. <style>
  10. .bFind-wrapper-top {
  11. background: #fff;
  12. border-color: #ccc #aaa #aaa #ccc;
  13. border-style: solid;
  14. border-width: 1px;
  15. height: 25px !important;
  16. padding: 4px;
  17. margin: 0;
  18. }
  19. .bsBox {
  20. width: auto !important;
  21. height: auto !important;
  22. }
  23. .text-overflow {
  24. overflow: hidden;
  25. text-overflow: ellipsis;
  26. white-space: nowrap;
  27. }
  28. </style>
  29. </head>
  30. <body layout:fragment="content">
  31. <!-- 头部导航 -->
  32. <div th:replace="~{home/common/header :: header}"></div>
  33. <!--nav-->
  34. <div class="center_nav">
  35. <div th:replace="~{home/common/header :: nav}"></div>
  36. </div>
  37. <!-- 主体内容 -->
  38. <div class="main">
  39. <div class="container projects">
  40. <div class="row">
  41. <div class="col-sm-6 col-md-6 col-lg-9 hidden-xs" style="padding-left: 0;">
  42. <ol class="breadcrumb clearfix"
  43. style="padding-top: 15px;border-bottom: 0px solid #fff;margin-bottom: 0;">
  44. <li>
  45. <a th:href="@{/home}">首页</a>
  46. </li>
  47. <li th:if="${navigation_id!=2}" class="active"><a th:href="@{'/home/informList/'+${navigation_id}}">[[${navigation_name}]]</a>
  48. </li>
  49. <li th:if="${navigation_id==2}" class="active"><a th:href="@{/home/unionCompany}">[[${navigation_name}]]</a>
  50. </li>
  51. <li class="active"><a><cite>问题列表</cite></a></li>
  52. </ol>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="container projects" style="margin-top: 20px;">
  57. <div class="row">
  58. <div class="col-sm-12 col-md-12 col-lg-12">
  59. <div class="centerContent" >
  60. <div>
  61. <ul class="question"></ul>
  62. </div>
  63. <div class="pagingBox" style="margin-top: 35px" >
  64. <div id="paging"></div>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <input type="hidden" id="navigation_id" th:value="${navigation_id}"/>
  71. </div>
  72. <!--页底-->
  73. <div th:replace="~{home/common/footer :: footer}"></div>
  74. <script type="text/javascript" charset="utf-8"
  75. src="http://static.bshare.cn/b/buttonLite.js#style=-1&amp;uuid=&amp;pophcol=2&amp;lang=zh"></script>
  76. <script type="text/javascript" charset="utf-8"
  77. src="http://static.bshare.cn/b/bshareC0.js"></script>
  78. <script th:inline="javascript">
  79. var fileUrl = [[${fileUrl}]];
  80. $("li[role='presentation']").removeClass();
  81. var id = $("#navigation_id").val();
  82. var activityId = $("#activityId").val();
  83. var pagePath = $("meta[name='_ctx']").attr("content");
  84. pagePath = pagePath.substring(0, pagePath.length - 1);
  85. var infoList = new Array(), index = 0;
  86. var time = 0;//时间差
  87. var activity_quota = "", activity_remain = "";
  88. $("#" + id).parent().attr("class", "active");
  89. layui.use('element', function () {
  90. var element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
  91. });
  92. var _total = ""
  93. var _data = {
  94. lb:2,
  95. bno:13,
  96. page:1,
  97. pagesize:10,
  98. };
  99. $(function () {
  100. getQuestion();
  101. clickPage();
  102. });
  103. //请求数据
  104. function getQuestion(){
  105. $.ajax({
  106. type:"GET",
  107. url:pagePath+"/policy/radar?apikey=snd_apis&at=8",
  108. data:_data,
  109. dataType:"json",
  110. success:function(data){
  111. data = data.obj;
  112. var _list = data.list;
  113. var _question = "";
  114. _total = data.total
  115. $.each(_list,function(i,n){
  116. _question += "<li><a class='a_blue' href='"+pagePath+"/home/policyDetail?bno="+n.bno+"'>"+n.title+"</a></li>"
  117. });
  118. $(".question").empty().append(_question)
  119. }
  120. })
  121. };
  122. // 分页执行
  123. function clickPage(){
  124. layui.use('laypage', function(){
  125. var laypage = layui.laypage;
  126. //执行一个laypage实例
  127. laypage.render({
  128. elem: 'paging',
  129. first: '首页',
  130. count: _total,
  131. last: '尾页',
  132. prev: '<em>上一页</em>',
  133. next: '<em>下一页</em>',
  134. curr: _data.page,
  135. //当前页
  136. jump: function (obj, first) { //触发分页后的回调
  137. //触发分页后的回调,并传递当前页obj.cuur
  138. if (!first) {
  139. var cuur = obj.curr;
  140. _data.page = cuur;//获取当前页
  141. getQuestion()
  142. }
  143. }
  144. });
  145. });
  146. }
  147. </script>
  148. </body>
  149. </html>