<!doctype html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>【[.$opcms.tuanusernum.]人团[.if $opcms.tuannumber != 0.],还差[.$opcms.tuannumber.]人[./if.]】[.$opcms.title.] - [.$ourphp_web.website.]</title>
        <meta name="renderer" content="webkit|ie-comp|ie-stand" />
		<meta name="description" content="[.$opcms.description.]" />
		<meta name="keywords" content="[.$opcms.tag.]" />
        <link rel="stylesheet" href="[.$templatepath.]shop/css/common.css?123">
        <link rel="stylesheet" href="[.$templatepath.]shop/css/home_header.css">
        <script src="[.$templatepath.]shop/js/jquery-2.1.4.min.js"></script>
        <script src="[.$templatepath.]shop/js/common.js"></script>
        <script src="[.$templatepath.]shop/js/jquery-ui.min.js"></script>
        <script src="[.$templatepath.]shop/js/jquery.ui.datepicker-zh-CN.js"></script>
        <script src="[.$templatepath.]shop/js/jquery.validate.min.js"></script>
        <script src="[.$templatepath.]shop/js/layer.js"></script>
        <script src="[.$templatepath.]shop/js/dialog.js" id="dialog_js" charset="utf-8"></script>
    </head>
    <body>
	
	[.include file="cn/cn_shoptop.html".]
	
	[.assign var="md" value=$ourphp_web.webhttp|cat:$ourphp_web.weburl|cat:"/client/wap/?cn-productview-"|cat:$ip.listid|cat:"-"|cat:$opcms.id|cat:".html-&tuan&tuanid="|cat:$smarty.get.tuanid|cat:"&introducer="|cat:$smarty.session.userid.]


<!--面包屑导航 BEGIN-->
<div class="dsh-breadcrumb-layout">
    <div class="dsh-breadcrumb w1200"><i class="iconfont">&#xe6ff;</i>
                <span><a href="[.$webpath.]?cn-shop.html">首页</a></span>
						
				[.foreach $crumbs as $op.]
				<span class="arrow">></span><span><a href="[.$op.url.]" title="[.$op.title.]">[.$op.title.]</a></span>
				[./foreach.]
    </div>
</div>
<!--面包屑导航 END-->


<script>
    $(function() {
	//首页左侧分类菜单
	$(".all_categorys ul.menu").find("li").each(
		function() {
			$(this).hover(
				function() {
				    var cat_id = $(this).attr("cat_id");
					var menu = $(this).find("div[cat_menu_id='"+cat_id+"']");
					menu.show();
					$(this).addClass("hover");					
					var menu_height = menu.height();
					if (menu_height < 60) menu.height(80);
					menu_height = menu.height();
					var li_top = $(this).position().top;
					$(menu).css("top",-li_top + 40);
				},
				function() {
					$(this).removeClass("hover");
				    var cat_id = $(this).attr("cat_id");
					$(this).find("div[cat_menu_id='"+cat_id+"']").hide();
				}
			);
		}
	);

        $(".user_menu dl").hover(function() {
            $(this).addClass("hover");
        }, function() {
            $(this).removeClass("hover");
        });

    });
	
	$(document).ready(function(){
		$("img").lazyload({ 
			 effect: "fadeIn"
		});    
	});
</script>

<script src="[.$templatepath.]shop/js/search_goods.js"></script>
<div class="dsh-container wrapper" >
  <div class="left">
        <div class="dsh-module dsh-module-style02">
      <div class="title">
        <h3>分类筛选</h3>
      </div>
      <div class="content">
        <ul id="files" class="tree">
		[.foreach from=$column item=op.]
		[.if $op.id == 2.]
		[.if isset($op.child).]
			 [.foreach from=$op.child item=opop.]
                    <li><i class="tree-parent tree-parent-collapsed"></i><a href="[.$opop.url.]" class="selected">[.$opop.title.]</a>
                        <ul>
						[.if isset($opop.child).]
						 [.foreach from=$opop.child item=opopop.]
                            <li><i class="tree-parent tree-parent-collapsed"></i><a href="[.$opopop.url.]" >[.$opopop.title.]</a>
                                <ul>
								[.foreach from=$opopop.child item=opopopop.]
                                    <li class="tree-parent tree-parent-collapsed"><i></i><a href="[.$opopopop.url.]" >[.$opopopop.title.]</a></li>
								[./foreach.] 	
                                  </ul>
                              </li>
						  [./foreach.] 
						[./if.]
                          </ul>
                      </li>
			 [./foreach.]  
		[./if.] 
        [./if.]  
        [./foreach.]       
        </ul>
      </div>
    </div>


  </div>
  <div class="right">
    <div id="gc_goods_recommend_div" style="width:980px;"></div>

			<script type="text/javascript" src="[.$webpath.]function/plugs/jquery/1.7.2/jquery-1.7.2.min.js"></script>

				<h1 style="font-size:20px;"><span style="width: 18%; float:right; text-align:right; margin-right:2%;"><a onclick="viewcode();" style="width: 100%; text-align:right;"><img src="[.$webpath.]skin/erweimaico.png" height="45"></a></span><span style="width: 80%; float:left;">[.$opcms.quota.]【[.$opcms.tuanusernum.]人团[.if $opcms.tuannumber != 0.],还差[.$opcms.tuannumber.]人[./if.]】[.$opcms.title.]</span></h1>
				<div class="clear"></div>
				
                [.*以下代码是我们OURPHP官方默认代码，主要用于判断是否启动了商城模式。如果你要修改模板，可以把以下代码全部复制走。*.]
				<script type="text/javascript">

				function viewcode(){
					[.if isset($smarty.session.userid).]
					layer.open({
					  type: 1,
					  title:false,
					  shadeClose: true,
					  shade: 0.5,
					  area: ['500px', '500px'],
					  content: '<div style="background:url([.$opcms.maximg.]) top center no-repeat; background-size:100%; width:100%; height:100%;"><div style="position:absolute; z-index:999999; bottom:5px; left:0; width:100%; background:#fff;"><div style="width:20%; float:left;"><img src="[.$webpath.]function/api/qrcode/?text=[.$ourphp_web.webhttp.][.$ourphp_web.weburl.]/client/wap/?cn-productview-[.$ip.listid.]-[.$opcms.id.].html-%26tuan%26tuanid=[.$smarty.get.tuanid.]%26introducer%3D[.$smarty.session.userid.]&md=[.token info=$md.]&l=L&s=3" width="80" height="80"></div><div style="width:75%; float:left; font-size:16px; padding-top:5px;">[.$opcms.title.]<br />￥[.$opcms.webmarket.]</div></div></div>'
					}); 
					[.else.]
					layer.msg('请先登录后在分享二维码链接给好友!', function(){});
					[./if.]
				}

				var startTime = new Date();
				startTime.setFullYear([.$opcms.tuantime2[0]|replace:"-":",".]);
				startTime.setHours([.$opcms.tuantime2[1].]);
				startTime.setMinutes([.$opcms.tuantime2[2].]);
				startTime.setSeconds([.$opcms.tuantime2[3].]);
				var EndTime=startTime.getTime();

				function GetRTime(){
					var NowTime = new Date();
					var nMS = EndTime - NowTime.getTime();
					var nD = Math.floor(nMS/(1000 * 60 * 60 * 24));
					var nH = Math.floor(nMS/(1000*60*60)) % 24;
					var nM = Math.floor(nMS/(1000*60)) % 60;
					var nS = Math.floor(nMS/1000) % 60;
					if (nMS < 0){
						$("#dao").hide();
						$("#daoend").show();
					}else{
					   $("#dao").show();
					   $("#daoend").hide();
					   $("#RemainD").text(nD);
					   $("#RemainH").text(nH);
					   $("#RemainM").text(nM);
					   $("#RemainS").text(nS); 
					}
				}
				
				$(function(){
					var timer_rt = window.setInterval("GetRTime()", 1000);
					var kc = $('input[name="ourphp_kc"]').val();
					if(parseInt(kc) <= 0)
					{
						$(".carshopok").html('<input type="button" value="已售罄" class="zfan3" />');
					}else{
						[.if isset($smarty.get.tuanid).]
							[.assign var="tuanid" value=intval($smarty.get.tuanid).]
							[.assign var="btnfont" value="我要拼团".]
						[.else.]
							[.assign var="tuanid" value="0".]
							[.assign var="btnfont" value="立即开团".]
						[./if.]
						$(".carshopok").html('<input type="submit" name="Submit" value="[.$btnfont.]" class="zfan" />');
					}
				})
				</script>
                <form id="form1" name="form1" method="post" action="[.$webpath.]?cn-shoppingcart.html-&ourphp_cms=shopping&tuan&tuanid=[.$tuanid.]">
                <div class="prleft2">
                <!--preview-->
                <LINK href="[.$webpath.]function/plugs/product/style.css" rel=stylesheet>
				<style type="text/css">
				.clearfix {
					display: inherit;
				}
				.bob {
					border-bottom: 1px #ccc dashed;
					padding-bottom: 15px;
				}
				#bigView {
					margin-top: 165px;
				}
				</style>
                <script language="JavaScript" type="text/javascript" src="[.$webpath.]function/plugs/product/photo.js"></script>
                <div class="preview">
                    <div id="vertical" class="bigImg">
                    [.if !empty($opcms.img[0]).]
                        <img src="[.$webpath.][.$opcms.img[0].img.]" width="400" height="400" alt="[.$opcms.title.]" id="midimg" />
                        [.else.]
                        <img src="[.$webpath.]skin/noimage.png" width="400" height="400" alt="[.$opcms.title.]" id="midimg" />
                    [./if.]
                        <div style="display:none;" id="winSelector"></div>
                    </div><!--bigImg end-->
                    <div class="smallImg">
                        <div class="scrollbutton smallImgUp disabled"></div>
                        <div id="imageMenu">
                            <ul>
                            [.foreach $opcms.img as $key => $op.]
                                <li [.if $key == 0.]id="onlickImg"[./if.]><img src="[.$webpath.][.$op.img.]" width="50" height="50" alt="[.$opcms.title.]"/></li>
                            [./foreach.]
                            </ul>
                        </div>
                        <div class="scrollbutton smallImgDown"></div>
                    </div><!--smallImg end-->
                    <div id="bigView"><img src="" /></div>
                </div>
                <!--preview end-->
                </div>
                <style>
                    .zfan {width:230px; height:45px; border:0px; color:#FFF; font-size:20px; background:#de2a2a; border-radius:5px; margin-top:20px;}.zfan:hover {background:#ba0c0c;}
                    .zfan3 {width:170px; height:45px; border:0px; color:#FFF; font-size:20px; background:#b7b7b7; border-radius:5px; margin-top:20px;}
                </style>
                <div class="prright2">
                    <ul>
                    	<li>[.$opcms.suggest.]</li>
						<div class="pctuancode">
							<li class="tuanfont1">
								<dl class="clearfix iteminfo_parameter">
									<dd>[.$opcms.tuanusernum.]人团[.if $opcms.tuannumber != 0.] , 还差[.$opcms.tuannumber.]人[./if.]</dd>
								</dl>
							</li>
							<li class="tuanfont2">
								<dl class="clearfix iteminfo_parameter">
									<dd>
											<div id="daoend" style="display:none; text-align: left; font-size: 20px; line-height:60px;">本次团购已结束</div>
											<div id="dao">
												<p><strong id="RemainD"></strong>天<strong id="RemainH"></strong>时<strong id="RemainM"></strong>分<strong id="RemainS"></strong>秒</p>
												<p>距离本次拼团结束还有</p>
											</div>
									</dd>
								</dl>
							</li>
						</div>
						<div class="clear"></div>
                        <li>
                        [.ourphp_gg id=$opcms.specificationsid arr=$opcms.specifications mktprice=$opcms.market price=$opcms.webmarket mktpricefont="原价" pricefont="团价" stock="库存剩余" stocks=$opcms.stock numberfont="货号" number=$opcms.goodsno amount="购买数量" freightfont="快递至" symbol="：" moneytype="￥" usermoney=$opcms.usermoney freight=$opcms.freight.]
                        </li>
                        <li>
                          <input type="hidden" name="pid" value="[.$opcms.id.]" />
						  <span class="carshopok">
							<input type="submit" name="Submit" value="[.$btnfont.]" class="zfan" />
						  </span>
                        </li>
                    </ul>
                </div>
                </form>
                <div class="clear"></div>
                <script> 
                function setTab(m,n){
                 var tli=document.getElementById("menu"+m).getElementsByTagName("li");
                 var mli=document.getElementById("main"+m).getElementsByTagName("ul");
                 for(i=0;i<tli.length;i++){
                  tli[i].className=i==n?"hover":"";
                  mli[i].style.display=i==n?"block":"none";
                 }
                }
                </script>
                
                    <div id="tabs0">
                        <ul class="menu0" id="menu0">
                            <li onclick="setTab(0,0)" class="hover">商品详情</li>
                            <li onclick="setTab(0,1)">评论</li>
                            <li onclick="setTab(0,2)">购买记录</li>
                        </ul>
                        <div class="clear"></div>
                        <div class="main" id="main0">
                            <ul class="block">
                                <li>
                                    <div class="shuxing">
                                    	<span class="shoppp">品牌名称：[.$opcms.brand.title.] </span>
                                        <span class="clear shopcs">商品参数：</span>
                                        <div class="clear"></div>
                                        [.foreach from=$opcms.attribute item=aop.]
                                        <span>[.$aop.name.]：[.$aop.key.]</span>
                                        [./foreach.]	
                                    </div>
                                    <div class="clear"></div>
                                    [.$opcms.content.]
                                </li>
                            </ul>
                            <ul>
                                <li class="td">
                                    [.comment id=$opcms.id type=$ip.type row="10".]
                                </li>
                            </ul>
                            <ul>
                                <li>
                                
                                <style type="text/css">
                                    .gmjl { margin-top:30px; font-size:13px;}
                                    .gmjl tr,td{ padding:10px; border-bottom:1px #f4f4f4 solid;}
                                    .gmjl span { font-size:12px; color: #999;}
                                </style>
                                <table width="100%" border="0" class="gmjl">
                                  <tr>
                                    <td width="60%">购买的商品</td>
                                    <td width="20%"><div align="center">购买人账号</div></td>
                                    <td width="20%"><div align="center">购买时间</div></td>
                                  </tr>
                                  [.assign var="postid" value=$opcms.id.]
                                  [.sql mysql="select * from `ourphp_orders` where `OP_Ordersid` = $postid and `OP_Orderspay` = 2 order by id desc limit 0,30" name="sql".]
                                  <tr>
                                    <td>[.$sql.OP_Ordersname.]&nbsp;&nbsp;<span>([.$sql.OP_Ordersproductatt.])</span></td>
                                    <td><div align="center">[.half_replace($sql.OP_Ordersemail).]</div></td>
                                    <td><div align="center">[.$sql.time.]</div></td>
                                  </tr>
                                  [./sql.]
                              </table>
                                    
                                </li>
                            </ul>
                        </div>
                    </div>
                [.*商城模式结束，如果你要修改模板，把以上代码全部复制走*.]



  </div>
  <div class="clear"></div>
</div>
<script src="[.$templatepath.]shop/js/waypoints.js"></script>
<script src="[.$templatepath.]shop/js/search_category_menu.js"></script>
<script type="text/javascript">
var defaultSmallGoodsImage = 'home/common/default_goods_image.jpg';
var defaultTinyGoodsImage = 'home/common/default_goods_image.jpg';

$(function(){
    $('#files').tree({
        expanded: 'li:lt(2)'
    });
	//品牌索引过长滚条
    $('#dsBrandlist').perfectScrollbar({suppressScrollX:true});
    //浮动导航  waypoints.js
    $('#main-nav-holder').waypoint(function(event, direction) {
        $(this).parent().toggleClass('sticky', direction === "down");
        event.stopPropagation();
    });
	// 单行显示更多
	$('span[ds_type="show"]').click(function(){
		s = $(this).parents('dd').prev().find('li[ds_type="none"]');
		if(s.css('display') == 'none'){
			s.show();
			$(this).html('<i class="iconfont">&#xe688;</i>收起');
		}else{
			s.hide();
			$(this).html('<i class="iconfont">&#xe689;</i>更多');
		}
	});


    $('#priceBtn').click(function(){
        var priceMin = $('#priceMin').val();
        var priceMax = $('#priceMax').val();
        var url = window.location.href;
        var url = url + (url.indexOf("?")!=-1?'&':'?') + "priceMin=" + priceMin + "&priceMax=" + priceMax;
        window.location.href = url;
    });
});
</script>

[.include file="cn/cn_shopfoot.html".]


