index.jsp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <%@ page language="java" pageEncoding="UTF-8"
  2. contentType="text/html; charset=UTF-8" %>
  3. <%@ page isELIgnored="false" %>
  4. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
  5. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
  6. <%
  7. String basePath = request.getContextPath();
  8. String resourcePath = basePath + "/resource";
  9. %>
  10. <!doctype html>
  11. <html>
  12. <head>
  13. <jsp:include page="../common/head.jsp"></jsp:include>
  14. </head>
  15. <body>
  16. <jsp:include page="../common/body_header.jsp"></jsp:include>
  17. <div class="datalistbanner">
  18. <div class="banner"></div>
  19. </div>
  20. <div class="liebiao">
  21. <div class="liebiao1">
  22. <span class="liebiao02"><a href="<%=basePath%>/open/data/index.htm" class="xuanxiangfont">数据</a></span>
  23. <span class="liebiao01"><a href="<%=basePath%>/open/api/list.htm" class="xuanxiangfont">API</a> </span>
  24. <span class="liebiao01"><a href="<%=basePath%>/open/microapp/openList.action" class="xuanxiangfont xuanxiangfont-active">微应用</a></span>
  25. </div>
  26. </div>
  27. <div class="mid">
  28. <%-- <div class="liebiao"></div>
  29. <div class="line"></div>--%>
  30. <div class="main">
  31. <%--<div class="xuanxiang1">--%>
  32. <%--<a href="<%=basePath%>/open/data/index.htm" class="xuanxiangfont">数据</a>--%>
  33. <%--</div>--%>
  34. <%--<div class="xuanxiang2">--%>
  35. <%--<a href="<%=basePath%>/open/api/list.htm" class="xuanxiangfont">API</a>--%>
  36. <%--</div>--%>
  37. <%--<div class="xuanxiang3">--%>
  38. <%--<a href="<%=basePath%>/open/microapp/openList.action" class="xuanxiangfont">微应用</a>--%>
  39. <%--</div>--%>
  40. <%--<div class="line01" style="left: 121px; width: 39px" ></div>--%>
  41. <%--<div class="xuanxiang4">--%>
  42. <%--</div>--%>
  43. <div class="shuju">
  44. <div class="filter">
  45. <div class="item" style="height: 60px" id="themeItem">
  46. <div class="zhuti">主题:</div>
  47. <ul class="item1">
  48. <li class="li">
  49. <a href="##" onclick="themeSearch('')" class="a<c:if test="${ empty searchModel.catelogThemeCode}">0</c:if>4">不限</a>
  50. </li>
  51. <c:if test="${themes.size()>0}">
  52. <c:forEach items="${themes}" var="theme">
  53. <li class="li">
  54. <a href="" onclick="themeSearch('${theme.catelogCode}')" class="a<c:if test="${searchModel.catelogThemeCode eq theme.catelogCode}">0</c:if>4"
  55. >${theme.cateLogName}</a>
  56. </li>
  57. </c:forEach>
  58. </c:if>
  59. </ul>
  60. <div id="themeDown" class="icon2"><a onclick="showThemeTag()"><img src="<%=resourcePath%>/images/icon_down.png"></a></div>
  61. <div id="themeTop" class="icon2"><a onclick="hiddenThemeTag()"><img src="<%=resourcePath%>/images/icon_top.png"></a></div>
  62. </div>
  63. <div class="item" id="sectorItem" style="height: 60px">
  64. <div class="zhuti">部门:</div>
  65. <ul class="item1">
  66. <li class="li">
  67. <a href="" onclick="sectorSearch('')" class="a<c:if test="${empty searchModel.sectorCode}">0</c:if>4">不限</a>
  68. </li>
  69. <c:if test="${sectors.size()>0}">
  70. <c:forEach items="${sectors}" var="sector">
  71. <li class="li">
  72. <a href="" onclick="sectorSearch('${sector.sectorCode}')" class="a<c:if test="${searchModel.sectorCode==sector.sectorCode}">0</c:if>4"
  73. >${sector.sectorName}</a>
  74. </li>
  75. </c:forEach>
  76. </c:if>
  77. </ul>
  78. <div id="sectorDown" class="icon2"><a onclick="showSectorShow()"><img src="<%=resourcePath%>/images/icon_down.png"></a></div>
  79. <div id="sectorTop" class="icon2"><a onclick="hiddenSectorHidden()"><img src="<%=resourcePath%>/images/icon_top.png"></a></div>
  80. </div>
  81. <div class="item">
  82. <div class="zhuti">类型:</div>
  83. <ul class="item1">
  84. <li class="li">
  85. <a href="" onclick="chargeMethodSearch('')" class="a<c:if test="${empty searchModel.chargeMethod}">0</c:if>4">不限</a>
  86. </li>
  87. <c:if test="${chargeMethods.size()>0}">
  88. <c:forEach items="${chargeMethods}" var="chargeMethod">
  89. <li class="li">
  90. <a href="##" onclick="chargeMethodSearch('${chargeMethod.key}')" class="a<c:if test="${searchModel.chargeMethod eq chargeMethod.key}">0</c:if>4"
  91. class="a4">${chargeMethod.key}</a>
  92. </li>
  93. </c:forEach>
  94. </c:if>
  95. </ul>
  96. </div>
  97. </div>
  98. <div class="shuju0">
  99. <div id="sortDivId">
  100. <span ${flag == null ||flag ==0 ? 'class="paixu paixu-active"' : "class='paixu'"}><a>默认排序</a></span>
  101. <span ${flag == 1 ? 'class="paixu paixu-active"' : "class='paixu'"}><a>最新开放</a></span>
  102. <span ${flag == 2 ? 'class="paixu paixu-active"' : "class='paixu'"}<a>访问数量</a></span>
  103. <span ${flag == 3 ? 'class="paixu paixu-active"' : "class='paixu'"}><a>申请数量</a></span>
  104. <span class="xiangshu">(共${pager.total}项)</span>
  105. </div>
  106. <div id="mainContent">
  107. <c:forEach items="${list}" var="item" varStatus="status">
  108. <c:if test="${status.index % 5 == 0}"><div class="shuju01"></c:if>
  109. <div class="div1">
  110. <div class="div_icon1" title="${item.resourceName}">
  111. <a href="<%=basePath%>/open/microapp/view.htm/${item.settingId}"><img src="${imageContextPath}${item.resourceImg}"></a>
  112. </div>
  113. <div class="h1" title="${item.resourceName}">
  114. <input type="hidden" name="id" value="${item.settingId}"/>
  115. <a href="<%=basePath%>/open/microapp/view.htm/${item.settingId}">${item.resourceName}</a>
  116. </div>
  117. <div ${item.chargeMethod eq '免费'?'class="mianfei"':'class="shoufei"'}>${item.chargeMethod}</div>
  118. <div class="api-foot1">
  119. <span class="liulan" title="浏览量:889">
  120. <img src="<%=resourcePath%>/images/icon_chakan.png" class="liulan-icon">(${item.viewTimes})
  121. </span>
  122. <span class="xiazai" title="下载量:">
  123. <img src="<%=resourcePath%>/images/icon_xiazai.png" class="xiazai-icon">(0)
  124. </span>
  125. <div class="line-w"></div>
  126. <div class="line-h"></div>
  127. </div>
  128. </div>
  129. <c:if test="${status.index % 5 ==4}"></div></c:if>
  130. <c:if test="${status.last}"></div></c:if>
  131. </c:forEach>
  132. <jsp:include page="../common/pager.jsp">
  133. <jsp:param name="pageNo" value="${pager.pageNo}"/>
  134. <jsp:param name="pageSize" value="${pager.pageSize}"/>
  135. <jsp:param name="total" value="${pager.total}"/>
  136. </jsp:include>
  137. <input type="hidden" name="theme" id="theme" value="${searchModel.catelogTheme}">
  138. <input type="hidden" name="sector" id="sector" value="${searchModel.catelogSector}">
  139. <input type="hidden" name="chargeMethod" id="chargeMethod" value="${searchModel.chargeMethod}">
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. <div>
  145. <jsp:include page="../common/body_footer.jsp"></jsp:include>
  146. </body>
  147. <script>
  148. var str1 = "";
  149. var str2 = "";
  150. var str3 = "";
  151. function themeSearch(code) {
  152. if (code != null&& code != '' && code != undefined ) {
  153. str2 = "catelogThemeCode=" + code;
  154. }
  155. if ($("#sector").val() != null && $("#sector").val() != '' && $("#sector").val() != undefined) {
  156. str1 = "&sectorCode=" + $("#sector").val();
  157. }
  158. if ($("#chargeMethod").val() != null && $("#chargeMethod").val() != '' && $("#chargeMethod").val() != undefined) {
  159. str3 = "&chargeMethod=" + $("#chargeMethod").val();
  160. }
  161. window.location.href = "<%=basePath%>/open/microapp/openList.action?" + str2 + str1+str3 ;
  162. }
  163. function sectorSearch(code) {
  164. if (code != null&& code != '' && code != undefined ) {
  165. str2 = "sectorCode=" + code;
  166. }
  167. if ($("#theme").val() != null && $("#theme").val() != '' && $("#theme").val() != undefined) {
  168. str1 = "&catelogThemeCode=" + $("#theme").val();
  169. }
  170. if ($("#chargeMethod").val() != null && $("#chargeMethod").val() != '' && $("#chargeMethod").val() != undefined) {
  171. str3 = "&chargeMethod=" + $("#chargeMethod").val();
  172. }
  173. window.location.href = "<%=basePath%>/open/microapp/openList.action?" + str2 + str1 + str3 ;
  174. }
  175. function chargeMethodSearch(str) {
  176. if (str != null && str != '' && str != undefined) {
  177. str2 = "chargeMethod="+str ;
  178. }
  179. if ($("#theme").val() != null && $("#theme").val() != '' && $("#theme").val() != undefined) {
  180. str3 = "&catelogThemeCode=" + $("#theme").val();
  181. }
  182. if ($("#sector").val() != null && $("#sector").val() != '' && $("#sector").val() != undefined) {
  183. str1 = "&sectorCode=" + $("#sector").val();
  184. }
  185. window.location.href = "<%=basePath%>/open/microapp/openList.action?" + str2 +str3+str1;
  186. }
  187. function pageSearch(pageNo) {
  188. window.location.href = "<%=basePath%>/open/microapp/openList.action?flag=${flag}&catelogThemeCode=${searchModel.catelogThemeCode}"+
  189. "&sectorCode=${searchModel.sectorCode}&shareType=${searchModel.shareType}&pageNo="+pageNo+"";
  190. }
  191. $("#pager a").not(".disabled").click(function () {
  192. var pageNo = $(this).attr("page");
  193. pageSearch(pageNo);
  194. });
  195. //排序
  196. $(function() {
  197. var spans = $('#sortDivId').children();
  198. for (var i = 0; i < spans.length; i++) {
  199. (function(j) {
  200. spans[j].onclick = function () {
  201. window.location.href ="<%=basePath%>/open/microapp/openList.action?flag="+j+"&catelogThemeCode=${searchModel.catelogThemeCode}"+
  202. "&sectorCode=${searchModel.sectorCode}&shareType=${searchModel.shareType}";
  203. };
  204. })(i)
  205. }
  206. });
  207. function showThemeTag() {
  208. $("#themeItem").removeAttr("style");
  209. $("#themeDown").hide() ;
  210. $("#themeTop").show() ;
  211. }
  212. hiddenThemeTag() ;
  213. function hiddenThemeTag() {
  214. $("#themeItem").attr("style","height:60px");
  215. $("#themeDown").show() ;
  216. $("#themeTop").hide() ;
  217. }
  218. function showSectorShow() {
  219. $("#sectorItem").removeAttr("style");
  220. $("#sectorDown").hide() ;
  221. $("#sectorTop").show() ;
  222. }
  223. hiddenSectorHidden() ;
  224. function hiddenSectorHidden() {
  225. $("#sectorItem").attr("style","height:60px");
  226. $("#sectorDown").show() ;
  227. $("#sectorTop").hide() ;
  228. }
  229. // 根据选中项展开
  230. function expandCriteria(parentDiv, selectedValue, expandFunction){
  231. var selectedLi;
  232. $(parentDiv + " ul li a").each(function (index, element) {
  233. if (selectedValue && selectedValue != "" && $(element).attr("onclick").indexOf(selectedValue) > -1){
  234. selectedLi = $(element).parent();
  235. }
  236. });
  237. if (selectedLi && selectedLi.position().top > 0){
  238. expandFunction();
  239. }
  240. }
  241. $(function () {
  242. expandCriteria("#themeItem", "${searchModel.catelogThemeCode}", showThemeTag);
  243. expandCriteria("#sectorItem", "${searchModel.sectorCode}", showSectorShow);
  244. });
  245. </script>
  246. </html>