policySpecialList.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. </head>
  10. <body layout:fragment="content">
  11. <!-- 头部导航 -->
  12. <div th:replace="~{home/common/header :: header}"></div>
  13. <!--nav-->
  14. <div class="center_nav">
  15. <div th:replace="~{home/common/header :: nav}"></div>
  16. </div>
  17. <div class="policy-bg">
  18. <div class="policy-content" style="padding-top:0;">
  19. <!--面包屑-->
  20. <div class="row">
  21. <div class="hidden-xs" style="padding-left: 0;position:relative;">
  22. <ol class="breadcrumbFixed clearfix" style="border-bottom: 0px solid #fff;margin-bottom: 20px;">
  23. <li>
  24. <a th:href="@{/home}">首页</a>
  25. </li>
  26. <li class="active"><a><cite>[[${navigation_name}]]</cite></a></li>
  27. <li>专项解读</li>
  28. </ol>
  29. <div class="col-sm-6 col-md-6 col-lg-4 col-xs-12" style="position: absolute;right: 0px;top: 5px;">
  30. <div style="display: inline-block;float: right;padding-top: 10px;width: 100%;">
  31. <span style="display: inline-block;width:100%">
  32. <input type="text" name="keyword" lay-verify="required" placeholder="请输入关键字搜索"
  33. autocomplete="off" class="layui-input" style="width: 100%;display: inline-block">
  34. </span>
  35. <button onclick="" id="keywordSearch"
  36. style="display: inline-block;float: right;background:none;border:none;">
  37. <i class=" iconfont icon-sousuo"></i>
  38. </button>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. <!--内容-->
  44. <div class="special-list">
  45. <ul id="interpretationList">
  46. <!--<li>
  47. <a th:href="@{/home/policySpecialDetail?bno=121}">
  48. <img th:src="@{/home/image/tzgg0428.jpg}" alt="">
  49. <div>
  50. <p class="special-name">企业研发费用加计扣除</p>
  51. <p><span class="ft-color-gray ft-12">申报难度</span> <span class="ft-color-red">★★★</span></p>
  52. </div>
  53. </a>
  54. </li>-->
  55. </ul>
  56. </div>
  57. <div class="box" style="float: right;">
  58. <div id="pagination" class="page fl"></div>
  59. <div class="info fl">
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <!--页底-->
  65. <div th:replace="~{home/common/footer :: footer}"></div>
  66. <script>
  67. $(function () {
  68. //头部导航栏
  69. $("li[role='presentation']").removeClass();
  70. var id = [[${navigation_id}]];
  71. $("#" + id).parent().attr("class", "active");
  72. var pagePath = $("meta[name='_ctx']").attr("content");
  73. pagePath = pagePath.substring(0, pagePath.length - 1);
  74. var type = "", criteria = "0", isinvalid = "0";
  75. layui.use('element', function () {
  76. var element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
  77. });
  78. // 搜索
  79. $("#keywordSearch").on("click", function () {
  80. var keywordVal = encodeURI($("#keyWord").val());
  81. window.location.href = pagePath + "/home/policySearchList?lkey=" + keywordVal;
  82. });
  83. initData();
  84. })
  85. // 专项解读
  86. function specialData(page) {
  87. $.ajax({
  88. url: pagePath + '/policy/radar?apikey=snd_apis&at=3&page=' + page + '&pagesize=10',
  89. type: 'get',
  90. dataType: 'json',
  91. success: function (json) {
  92. json = json.obj;
  93. var _html = '';
  94. $.each(json.list, function (index, item) {
  95. _html += '<li>\
  96. <a href="' + pagePath + '/home/policySpecialDetail?bno=' + item.bno + '" target="_blank">\
  97. <img src="' + item.picurl + '" />\
  98. <div>\
  99. <p class="special-name">' + item.title + '</p>\
  100. </div>\
  101. </a>\
  102. </li>';
  103. });
  104. $("#interpretationList").html(_html);
  105. }
  106. });
  107. }
  108. function initData() {
  109. $.ajax({
  110. url: pagePath + '/policy/radar?apikey=snd_apis&at=3&page=1&pagesize=10',
  111. type: 'get',
  112. dataType: 'json',
  113. success: function (json) {
  114. json = json.obj;
  115. var _html = '';
  116. var total = json.total;
  117. var totalPage = Math.ceil(total / 10)
  118. $.each(json.list, function (index, item) {
  119. _html += '<li>\
  120. <a href="' + pagePath + '/home/policySpecialDetail?bno=' + item.bno + '" target="_blank">\
  121. <img src="' + item.picurl + '" />\
  122. <div>\
  123. <p class="special-name">' + item.title + '</p>\
  124. </div>\
  125. </a>\
  126. </li>';
  127. });
  128. $("#interpretationList").html(_html);
  129. $("#pagination").pagination({
  130. currentPage: 1,
  131. totalPage: totalPage,
  132. isShow: true,
  133. count: 10,
  134. homePageText: "首页",
  135. endPageText: "尾页",
  136. prevPageText: "上一页",
  137. nextPageText: "下一页",
  138. callback: function (current) {
  139. specialData(current);
  140. }
  141. });
  142. }
  143. });
  144. }
  145. </script>
  146. </body>
  147. </html>