attention.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
  3. <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
  4. <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
  5. <%
  6. String path = request.getContextPath();
  7. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort() + path+"/";
  8. request.setAttribute("contextPath", basePath);
  9. String redirectUrl= request.getParameter("redirectUrl");
  10. request.setAttribute("redirectUrl", redirectUrl);
  11. %>
  12. <!DOCTYPE html>
  13. <html>
  14. <head>
  15. <base href="<%=basePath%>">
  16. <meta charset="UTF-8">
  17. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  18. <meta name="apple-mobile-web-app-capable" content="yes">
  19. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  20. <meta name="format-detection" content="telephone=no">
  21. <title>关注产品</title>
  22. <script src="<%=basePath %>app/lib/flexible.js"></script>
  23. <link rel="stylesheet" href="<%=basePath %>app/lib/flexible.css">
  24. <link rel="stylesheet" href="<%=basePath %>app/lib/swiper-4.3.2.min.css" />
  25. <link rel="stylesheet" href="<%=basePath %>app/css/basem.css">
  26. <link rel="stylesheet" href="<%=basePath %>app/css/public.css">
  27. <link rel="stylesheet" href="<%=basePath %>app/css/index.css">
  28. <link rel="stylesheet" href="<%=basePath %>app/css/logome.css">
  29. </head>
  30. <body>
  31. <div class="titbox blubg">
  32. <%-- <a class="titreturn fl" href="javascript:void(0)" onclick="back()"><img src="<%=basePath %>app/img/fanhui16@2x.png" alt=""></a> --%>
  33. <h1>关注产品</h1>
  34. <a href="javascript:void(0)" class="check attenManage">
  35. <span class="smtxt" num="1">管理</span>
  36. </a>
  37. </div>
  38. <input type="hidden" value="${flist.page }" id="pagef"/>
  39. <input type="hidden" value="${flist.pageTotal }" id="pageft"/>
  40. <!-- 房产推介 -->
  41. <div class="referrals top50" style="margin-bottom:1.30rem;">
  42. <ul id="products">
  43. <c:forEach items="${flist.results}" var="p1" varStatus="status">
  44. <li>
  45. <a href="<%=basePath%>web/mgmProduct/detail.cs?productid=${p1.productId }&plat=H5">
  46. <label class="mycheck hide">
  47. <input type="hidden" class="mid" value="${p1.productId }" />
  48. <input type="checkbox" name="checkid" value="1" value="" />
  49. <div class="option"></div><!--该div盛放的是优化后的按钮图片-->
  50. </label>
  51. <div class="referinfo">
  52. <img src="${p1.productImg }" alt="">
  53. <div class="referCont">
  54. <p class="refertit">${p1.productName }</p>
  55. <p>
  56. <span class="designation graytxt">${p1.productRemark }</span>
  57. <c:if test="${p1.commissionRate != '0' }">
  58. <span class="commission">佣金:${p1.commissionRate }%</span>
  59. </c:if>
  60. </p>
  61. <p>
  62. <span class="designation graytxt">价格:</span>
  63. <span class="price">${p1.productPrice }</span>
  64. </p>
  65. <p>
  66. <span class="designation graytxt">类型:</span>
  67. <span class="graytxt">${p1.gc }</span>
  68. </p>
  69. </div>
  70. </div>
  71. </a>
  72. <div class="buy">
  73. <a href="<%=basePath %>web/mgmProduct/buyNow.cs?productId=${p1.id }" class="buygo">立即购买</a>
  74. <a href="<%=basePath %>web/mgmProduct/recommend.cs?productids=${p1.productId}" class="buyt">我要推介</a>
  75. </div>
  76. </li>
  77. </c:forEach>
  78. </ul>
  79. <div class="nomore" id="moreno">
  80. 没有更多了。。。
  81. </div>
  82. </div>
  83. <footer>
  84. <a href="<%=basePath %>web/mgmUserCtl/index.cs">
  85. <img src="<%=basePath %>app/img/shouye@2x.png" class="img1">
  86. <img src="<%=basePath %>app/img/shouygao@2x.png" class="img2">
  87. <p>首页</p>
  88. </a>
  89. <a href="<%=basePath%>web/mgmProduct/followList.cs?page=1" class="active">
  90. <img src="<%=basePath %>app/img/guanz@2x.png" class="img1">
  91. <img src="<%=basePath %>app/img/guanzgao@2x.png" class="img2">
  92. <p>关注</p>
  93. </a>
  94. <a href="${contextPath}web/mgmOrder/getOrderList.cs">
  95. <img src="<%=basePath %>app/img/jindu@2x.png" class="img1">
  96. <img src="<%=basePath %>app/img/jindgao@2x.png" class="img2">
  97. <p>进度</p>
  98. </a>
  99. <a href="${contextPath }web/meWebCtl/me.cs" >
  100. <img src="<%=basePath %>app/img/my.png" class="img1">
  101. <img src="<%=basePath %>app/img/wode@2x.png" class="img2">
  102. <p>我的</p>
  103. </a>
  104. </footer>
  105. </body>
  106. <script src="<%=basePath %>app/lib/swiper-4.3.2.min.js"></script>
  107. <script type="text/javascript" src="<%=basePath %>app/lib/jquery.min.js">
  108. </script>
  109. <script type="text/javascript" src="<%=basePath %>res/js/layer/layer.min.js"></script>
  110. <script type="text/javascript" src="<%=basePath %>app/js/public.js"></script>
  111. <script type="text/javascript">
  112. $(".attenManage").click(function(){
  113. var num = $(this).find("span").attr("num");
  114. if(num == "1"){
  115. $(this).find("span").html("\u53d6\u6d88\u5173\u6ce8");
  116. $(this).find("span").attr("num", "2");
  117. $(".buygo").css("display","none");
  118. }else if(num == "2"){
  119. var ids = "";
  120. var all = $('input:checkbox[name="checkid"]:checked');
  121. if(all.length == 0){
  122. layer.msg("请选择要取消的关注");
  123. return false;
  124. }
  125. all.each(function(index){
  126. if(index == 0){
  127. ids += $(this).parent().children('.mid').val();
  128. }else{
  129. ids += "," + $(this).parent().children('.mid').val();
  130. }
  131. });
  132. $.ajax({
  133. type: 'POST',
  134. url: '<%=basePath%>web/mgmProduct/delFollow.cs?ids=' + ids,
  135. dataType: 'json',
  136. success: function (data) {
  137. if(data.ret == "0"){
  138. layer.msg(data.msg);
  139. return false;
  140. }else if(data.ret == "1"){
  141. layer.msg(data.msg);
  142. window.location.href = window.location.href;
  143. }
  144. }
  145. });
  146. }
  147. })
  148. $(function(){
  149. // 滚动刷新
  150. // 页数,每页展示10个,请求的地址
  151. var url = '<%=basePath%>web/mgmProduct/follows.cs';
  152. var page = $("#pagef").val();
  153. var pageTotal = $("#pageft").val();
  154. if(parseInt(page)>0 && parseInt(page) < parseInt(pageTotal)){
  155. $("#moreno").text("下拉加载更多");
  156. }else{
  157. $("#moreno").text("没有更多了。。。");
  158. }
  159. if(typeof(kindul) == "undefined"){
  160. var totalheight=0 ;
  161. var totalheight2=0 ;
  162. $(window).unbind('scroll').scroll(function(){
  163. totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());
  164. totalheight2=parseInt($(document).height());
  165. if( totalheight2 == parseInt(totalheight)){
  166. if(parseInt(page)>0 && parseInt(page) < parseInt(pageTotal)){
  167. page = parseInt(page) + 1;
  168. $("#moreno").text("下拉加载更多");
  169. }else{
  170. $("#moreno").text("没有更多了。。。");
  171. return false;
  172. }
  173. $.ajax({
  174. type: 'POST',
  175. url: url + '?page=' + page ,
  176. dataType: 'json',
  177. success: function (data) {
  178. var html="";
  179. data.results.forEach(function(value,index,array){
  180. html += "<li>";
  181. html += "<a href='<%=basePath%>web/mgmProduct/detail.cs?productid="+value.productId+"&plat=H5'>";
  182. html += "<label class='mycheck hide'>";
  183. html += "<input type='hidden' class='mid' value='"+value.productId+"' />";
  184. html += "<input type='checkbox' name='checkid' value='1' value='' />";
  185. html += "<div class='option'></div>";
  186. html += "</label>";
  187. html += "<div class='referinfo'>";
  188. html += "<img src='"+value.productImg+"' alt=''>";
  189. html += "<div class='referCont'>";
  190. html += "<p class='refertit'>"+value.productName+"</p>";
  191. html += "<p>";
  192. html += "<span class='designation graytxt'>"+value.productRemark+"</span>";
  193. if(value.commissionRate != '0'){
  194. html += "<span class='commission'>佣金:"+value.commissionRate+"%</span>";
  195. }
  196. html += " </p>";
  197. html += " <p>";
  198. html += " <span class='designation graytxt'>价格:</span>";
  199. html += "<span class='price'>"+value.productPrice+"</span>";
  200. html += " </p>";
  201. html += " <p>";
  202. html += "<span class='designation graytxt'>类型:</span>";
  203. html += "<span class='graytxt'>"+value.gc+"</span>";
  204. html += "</p>";
  205. html += "</div>";
  206. html += "</div>";
  207. html += "</a>";
  208. html += "<div class='buy'>";
  209. html += " <a href='<%=basePath %>web/mgmProduct/buyNow.cs?productId="+value.productId+"' class='buygo'>立即购买</a>";
  210. html += " <a href='<%=basePath %>web/mgmProduct/recommend.cs?productids="+value.productId+"' class='buyt'>我要推介</a>";
  211. html += "</div>";
  212. html += "</li>";
  213. });
  214. $('#products').html($('#products').html() + html);
  215. }
  216. });
  217. }
  218. });
  219. }
  220. });
  221. </script>
  222. </html>