detail.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  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"><c:if test=""></c:if>
  21. <title><c:if test="${detail.productType == '1' }">房产详情</c:if><c:if test="${detail.productType == '2' }">产品详情</c:if></title>
  22. <script src="<%=basePath %>app/lib/flexible.js"></script>
  23. <script type="text/javascript" src="<%=basePath %>res/js/jquery.min.js"></script>
  24. <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
  25. <script type="text/javascript">
  26. // 微信分享函数
  27. $.ajax({ url:"<%=basePath%>web/wx_share/getwxconfig.cs",
  28. data:{signaurl:location.href},
  29. dataType:'json',
  30. type:'post',
  31. success:function(data){
  32. var url = window.location.href;
  33. url = url.replace("detail","detailfx");
  34. wx.config({
  35. debug: false,
  36. appId:data.appid,
  37. timestamp:data.timestamp,
  38. nonceStr:data.noncestr,
  39. signature:data.signature,
  40. jsApiList:['checkJsApi','onMenuShareTimeline','onMenuShareAppMessage']
  41. });
  42. wx.ready(function(){
  43. //获取“分享到朋友圈”按钮点击状态及自定义分享内容接口
  44. wx.onMenuShareTimeline({
  45. title: '${detail.productName }', // 分享标题
  46. link:url, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
  47. imgUrl:'${detail.productImg }', // 分享图标
  48. success: function () {
  49. window.location.href=url;
  50. },
  51. cancel: function () {
  52. // 用户取消分享后执行的回调函数
  53. }
  54. });
  55. //获取“分享给朋友”按钮点击状态及自定义分享内容接口
  56. wx.onMenuShareAppMessage({
  57. title: '${detail.productName }', // 分享标题
  58. desc: '${detail.productRemark }', // 分享描述
  59. link:url, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
  60. imgUrl: '${detail.productImg }', // 分享图标
  61. type: '', // 分享类型,music、video或link,不填默认为link
  62. dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
  63. success: function () {
  64. // 用户确认分享后执行的回调函数
  65. window.location.href=url;
  66. },
  67. cancel: function () {
  68. // 用户取消分享后执行的回调函数
  69. }
  70. });
  71. });
  72. }
  73. });
  74. </script>
  75. <link rel="stylesheet" href="<%=basePath %>app/lib/flexible.css">
  76. <link rel="stylesheet" href="<%=basePath %>app/lib/swiper-4.3.2.min.css" />
  77. <link rel="stylesheet" href="<%=basePath %>app/css/basem.css">
  78. <link rel="stylesheet" href="<%=basePath %>app/css/public.css">
  79. <link rel="stylesheet" href="<%=basePath %>app/css/index.css">
  80. </head>
  81. <body>
  82. <div class="main">
  83. <!--导航 -->
  84. <div class="swiper-container" id="detail">
  85. <div class="swiper-wrapper">
  86. <c:forEach var="gi" varStatus="status" items="${groupimg }">
  87. <div class="swiper-slide">
  88. <img src="${gi }" alt="">
  89. </div>
  90. </c:forEach>
  91. </div>
  92. <!-- 分页器 -->
  93. <div class="swiper-pagination"></div>
  94. <a href="javascript:void(0)" onclick="back()" class="back"><img src="<%=basePath %>app/img/fanh4@2x.png" alt=""></a>
  95. <%-- <a href="javascript:void(0)" onclick="wxShare()" class="share"><img src="<%=basePath %>app/img/fenx@2x.png" alt=""></a> --%>
  96. <script type="text/javascript">
  97. function back(){
  98. window.history.go(-1);
  99. }
  100. </script>
  101. </div>
  102. <!-- 详情 -->
  103. <div class="houseinfo">
  104. <p class="houseName">
  105. <span class="houseN">${detail.productName } <c:if test="${detail.productState == '2' }">(产品已下架)</c:if></span>
  106. <c:if test="${detail.productState == '1' }">
  107. <a href="<%=basePath %>web/mgmProduct/buyNow.cs?productId=${detail.id}" class="houseBuy fr">立即购买</a>
  108. </c:if>
  109. <c:if test="${detail.productState == '2' }">
  110. <a href="javascript:void(0)" style="background-color:#948682;" class="houseBuy fr">立即购买</a>
  111. </c:if>
  112. </p>
  113. <p class="houseprice"><span>价格:</span><span>${detail.productPrice }</span></p>
  114. <p class="housecom"><span class="blutxt">${detail.productRemark }</span><c:if test="${detail.commissionRate != '0' }"><span style="margin-left:0.6rem;color:#104d9f;">佣金:${detail.commissionRate }%</span></c:if></p>
  115. <p class="housePhone"><span>联系电话:</span><span>${detail.hotline }</span></p>
  116. </div>
  117. <!-- 产品参数tab切换 -->
  118. <div class="product ">
  119. <ul class="kindul productul">
  120. <li class="current">
  121. <a href="#" title="pdDet">
  122. 产品详情
  123. <i></i>
  124. </a>
  125. </li>
  126. <li>
  127. <a href="#" title="pdNum">
  128. 产品参数
  129. </a>
  130. </li>
  131. <li>
  132. <a href="#" title="pdtPolicy">
  133. 激励政策
  134. </a>
  135. </li>
  136. </ul>
  137. <div class="productcont">
  138. <div id="pdDet" class="hide show">
  139. ${detail.productBody}
  140. <!-- <p>
  141. <span class="pdDetL">房产地址:</span>昆明东区经开区临湖
  142. </p>
  143. <div class="houseType">
  144. <span class="pdDetL">户型:</span>
  145. <div class="types">
  146. <span>A户型(洋房):3室2厅/188㎡</span>
  147. <span>A户型(洋房):3室2厅/188㎡</span>
  148. <span>A户型(洋房):3室2厅/188㎡</span>
  149. <span>A户型(洋房):3室2厅/188㎡</span>
  150. <span>A户型(洋房):3室2厅/188㎡</span>
  151. </div>
  152. </div>
  153. <img src="./img/type.png" alt="" class="typePic">
  154. <p><span class="pdDetL">商业配套:</span>沃尔玛、万达</p>
  155. <div class="educ">
  156. <p class="pdDetL">教育配套:</p>
  157. <p class="pdcont">幼儿园、初中、高中、幼儿园、初中、高中、幼儿园、初中、高中、幼儿园、初中、高中、幼儿园、初中、高中、幼儿园、初中、高中、幼儿园、初中、高中、</p>
  158. </div>
  159. <p><span class="pdDetL">医院配套:</span>昆明医院、昆明医院、昆明医院、昆明医院/明医院、昆明医院</p>
  160. <p><span class="pdDetL">资源配套:</span>公园、湖水、公园、湖水、公园、湖水公园、湖水</p> -->
  161. </div>
  162. <div id="pdNum" class="hide">
  163. ${detail.productAttr}
  164. <!-- <p>
  165. <span class="pdDetL">开盘时间:</span>昆明东区经开区临湖
  166. </p>
  167. <p>
  168. <span class="pdDetL">交房时间:</span>昆明东区经开区临湖
  169. </p>
  170. <p>
  171. <span class="pdDetL">产权类型:</span>昆明东区经开区临湖
  172. </p>
  173. <p>
  174. <span class="pdDetL">产权:</span>昆明东区经开区临湖
  175. </p>
  176. <p>
  177. <span class="pdDetL">开发商:</span>昆明东区经开区临湖
  178. </p>
  179. <p>
  180. <span class="pdDetL">物业公司:</span>昆明东区经开区临湖
  181. </p>
  182. <p>
  183. <span class="pdDetL">占地面积:</span>昆明东区经开区临湖
  184. </p>
  185. <p>
  186. <span class="pdDetL">容积率:</span>昆明东区经开区临湖
  187. </p>
  188. <p>
  189. <span class="pdDetL">物业费:</span>昆明东区经开区临湖
  190. </p>
  191. <p>
  192. <span class="pdDetL">建筑类型:</span>昆明东区经开区临湖
  193. </p>
  194. <p>
  195. <span class="pdDetL">面积区间:</span>昆明东区经开区临湖
  196. </p>
  197. <p>
  198. <span class="pdDetL">装修标准:</span>昆明东区经开区临湖
  199. </p> -->
  200. </div>
  201. <div id="pdtPolicy" class="hide">
  202. ${detail.policy}
  203. </div>
  204. </div>
  205. </div>
  206. <!-- 关注推介 -->
  207. <div class="GT">
  208. <c:if test="${detail.productState == '1' }">
  209. <a href="javascript:void(0);" id="a1" <c:if test="${detail.isFollow == 1 }">style="display:none;"</c:if> onclick="cgz('${detail.id}')" class="fl"><img src="<%=basePath %>app/img/xin.png" alt="">关注</a>
  210. <a href="javascript:void(0);" id="a2" <c:if test="${detail.isFollow == 0 }">style="display:none;"</c:if> onclick="uncgz('${detail.id}')" class="fl"><img src="<%=basePath %>app/img/xin-kong.png" alt="">已关注</a>
  211. </c:if>
  212. <c:if test="${detail.productState == '2' }">
  213. <a href="javascript:void(0);" id="a1" <c:if test="${detail.isFollow == 1 }">style="display:none;"</c:if> <c:if test="${detail.isFollow == 0 }">style="background-color:#948682;"</c:if> class="fl"><img src="<%=basePath %>app/img/xin.png" alt="">关注</a>
  214. <a href="javascript:void(0);" id="a2" <c:if test="${detail.isFollow == 0 }">style="display:none;"</c:if> <c:if test="${detail.isFollow == 1 }">style="background-color:#948682;"</c:if> class="fl"><img src="<%=basePath %>app/img/xin-kong.png" alt="">已关注</a>
  215. </c:if>
  216. <c:if test="${detail.productState == '1' }">
  217. <a href="<%=basePath %>web/mgmProduct/recommend.cs?productids=${detail.id }" class="fr"><img src="<%=basePath %>app/img/tui.png" alt="">我要推介</a>
  218. </c:if>
  219. <c:if test="${detail.productState == '2' }">
  220. <a href="javascript:void(0)" style="background-color:#948682;" class="fr"><img src="<%=basePath %>app/img/tui.png" alt="">我要推介</a>
  221. </c:if>
  222. </div>
  223. <script type="text/javascript">
  224. function cgz(id){
  225. $.ajax({
  226. type: "POST",
  227. url: "<%=basePath%>web/mgmProduct/addFollow.cs",
  228. data: {
  229. productid:id
  230. },
  231. dataType: "json",
  232. success: function(data){
  233. if(data.ret == 0){
  234. layer.msg(data.msg);
  235. }else if(data.ret == 1){
  236. $("#a1").css("display","none");
  237. $("#a2").css("display","block");
  238. layer.msg(data.msg);
  239. }
  240. }
  241. });
  242. }
  243. function uncgz(id){
  244. $.ajax({
  245. type: "POST",
  246. url: "<%=basePath%>web/mgmProduct/delFollow.cs",
  247. data: {
  248. ids:id
  249. },
  250. dataType: "json",
  251. success: function(data){
  252. if(data.ret == 0){
  253. layer.msg(data.msg);
  254. }else if(data.ret == 1){
  255. $("#a1").css("display","block");
  256. $("#a2").css("display","none");
  257. layer.msg(data.msg);
  258. }
  259. }
  260. });
  261. }
  262. </script>
  263. </div>
  264. </body>
  265. <script src="<%=basePath %>app/lib/swiper-4.3.2.min.js"></script>
  266. <script type="text/javascript" src="<%=basePath %>res/js/layer/layer.min.js"></script>
  267. <script type="text/javascript" src="<%=basePath %>app/js/public.js"></script>
  268. <script>
  269. var mySwiper = new Swiper ('.swiper-container', {
  270. autoplay:true,//等同于以下设置
  271. autoplay: {
  272. delay: 3000,
  273. stopOnLastSlide: false,
  274. disableOnInteraction: true,
  275. },
  276. loop: true,
  277. // 分页器
  278. pagination: {
  279. el: '.swiper-pagination',
  280. }
  281. })
  282. </script>
  283. </html>