<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort() + path+"/";
    request.setAttribute("contextPath", basePath);
	
	String redirectUrl= request.getParameter("redirectUrl");
	request.setAttribute("redirectUrl", redirectUrl);
%>
<!DOCTYPE html>
<html>
	<head>
        <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <title><c:if test="${detail.productType == '1' }">房产详情</c:if><c:if test="${detail.productType == '2' }">产品详情</c:if></title>
    <script src="<%=basePath %>app/lib/flexible.js"></script>
        	<script type="text/javascript" src="<%=basePath %>res/js/jquery.min.js"></script>
    
    <link rel="stylesheet" href="<%=basePath %>app/lib/flexible.css">
    <link rel="stylesheet" href="<%=basePath %>app/lib/swiper-4.3.2.min.css" />
    <link rel="stylesheet" href="<%=basePath %>app/css/basem.css">
    <link rel="stylesheet" href="<%=basePath %>app/css/public.css">
    <link rel="stylesheet" href="<%=basePath %>app/css/index.css">
	<style type="text/css">
        .browserCont {
            width: 100%;
            position: absolute;
            top: 0;
        }
	</style>
	</head>
	<body>
		<div class="sharemask hide" id="mmmmm">
            <img src="<%=basePath %>app/img/fenx.png" alt="" class="browserCont">
        </div>
        <div class="main">
            <!--导航 -->
            <div class="swiper-container" id="detail">
                <div class="swiper-wrapper">
                <c:forEach var="gi" varStatus="status" items="${groupimg }">
                    <div class="swiper-slide">
                        <img src="${gi }" alt="">
                    </div>
                </c:forEach>
                </div>
                <!-- 分页器 -->
                <div class="swiper-pagination"></div>

                <a href="javascript:void(0)" onclick="back()" class="back"><img src="<%=basePath %>app/img/fanh4@2x.png" alt=""></a>
                 <script type="text/javascript">
				function back(){
					window.history.go(-1);
				}
				</script>
            </div>
            <!-- 详情 -->
            <div class="houseinfo">
                <p class="houseName"><span class="houseN">${detail.productName }<c:if test="${detail.productState == '2' }">（产品已下架）</c:if></span>
                <a href="javascript:void(0)" onclick="reflash()" class="houseBuy fr">立即购买</a>
                </p>
                <p class="houseprice"><span>价格：</span><span>${detail.productPrice }</span></p>
                <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>
                <p class="housePhone"><span>联系电话：</span><span>${detail.hotline }</span></p>
                
            </div>
            <!-- 产品参数tab切换 -->
            <div class="product ">
               <ul class="kindul productul">
                    <li class="current">
                        <a href="#" title="pdDet"> 
                            产品详情
                            <i></i>
                        </a>
                    </li>
                    <li>
                        <a href="#" title="pdNum"> 
                            产品参数
                        </a>
                    </li>
                    <li>
                        <a href="#" title="pdtPolicy"> 
                            激励政策
                        </a>
                    </li>
                  
                </ul> 

                <div class="productcont">
                    <div id="pdDet" class="hide show">
                    ${detail.productBody}
                    </div>

                    <div id="pdNum" class="hide">
                     ${detail.productAttr}
                    </div>
                    <div id="pdtPolicy" class="hide">
                        ${detail.policy}
                    </div>


                </div>



            </div>
            <!-- 关注推介 -->
                <div class="GT">
                   
	                <a href="javascript:void(0);" id="a1" onclick="reflash()" class="fl"><img src="<%=basePath %>app/img/xin.png"  alt="">关注</a>
                   
	                <a href="javascript:void(0)" onclick="reflash()" class="fr"><img src="<%=basePath %>app/img/tui.png" alt="">我要推介</a>
                    
                </div>
  <script type="text/javascript">
	var is_weixin = (function() {
	    var ua = navigator.userAgent.toLowerCase();
	    if (ua.match(/MicroMessenger/i) == "micromessenger") {
	        return true;
	    } else {
	        return false;
	    }
	})();
	function reflash() {
		var winHeight = typeof window.innerHeight != 'undefined' ? window.innerHeight : document.documentElement.clientHeight;
		var btn = document.getElementById('J_weixin');
		var tip = document.getElementById('weixin-tip');
		var close = document.getElementById('close');
		if(is_weixin){
			$("#mmmmm").show();
		}else{
			// 获取终端的相关信息
	        var u = navigator.userAgent.toLowerCase();  
	        var theUrl="";
	        if(u.indexOf('iphone')>-1||u.indexOf('mac')>-1){
	           var theUrl = "https://itunes.apple.com/cn/app/%E4%B8%9C%E6%97%AD%E9%80%9A/id1403636577?l=zh&ls=1&mt=8";
	           window.location.href = theUrl;
	        }else{
	        	if(confirm("确认下载东旭通客户端吗？")){
		            var theUrl = '<%=basePath%>version/getAndroidUrl.cs';
		            $.post(theUrl,function(rs){
						location.href = rs.URL;
					});
	        	}
	        }
		}
		
	}

	</script>
                <script type="text/javascript">
                </script>
        </div>

                  
 	   
    </body>
	<script src="<%=basePath %>app/lib/swiper-4.3.2.min.js"></script>

    <script type="text/javascript" src="<%=basePath %>res/js/layer/layer.min.js"></script>
    <script type="text/javascript" src="<%=basePath %>app/js/public.js"></script>
      <script>        
      var mySwiper = new Swiper ('.swiper-container', {
        autoplay:true,//等同于以下设置
        autoplay: {
            delay: 3000,
            stopOnLastSlide: false,
            disableOnInteraction: true,
            },
        loop: true,   
        // 分页器
        pagination: {
          el: '.swiper-pagination',
        }
        
      }) 
    /*   $("#mmmmm") */
      
      </script>

</html>
