<{uqcms m="goods" c="get_one:id=smarty.get.id" v="row"}>
<{uqcms m="shop" v="sprow" c="get_one:id="|cat:$row.shop_id}>
<{import 
	file="header.html"
	title=$row.title 
	describe=$row.describe
	css="public,detail,comment"
}>
<div class="cname_bar">
	<div class="cname">
		<a href="<{$__URI__}>">首页 >></a>
		<{uqcms m="category" v="cats" c="get_parents_name:cid="|cat:$row.cid}>
		<{if $cats}>
			<{foreach item=c key=ck from=$cats}>
				<a href="<{$__URI__}>goods?cid=<{$ck}>"><{$c}></a> >>
			<{/foreach}>
		<{/if}>
		<{$row.title}>
	</div>
</div>
<div class="main_bar">
	<div class="main">
		<div class="httl"></div>
		<div class="hmain">
			<div class="mimg"> 
				<div class="bimg">
					<div class="jqzoom">
						<img src="<{$__IMG__}><{$row.images|img_size:400x400}>" jqimg="<{$__IMG__}><{$row.images}>"  class="main_middle_img <{if $__IMG__ == ''}>fixed<{/if}>"/> 
					</div> 
				</div>
				<{uqcms m="goods" v="simg" c="goods_simg:id=smarty.get.id"}>
				<div class="simg">
					<div class="simg_lft"><a href="javascript:;" id="simg_right"></a></div>
					<div class="simg_con">
						<{foreach item=s from=$simg}>				
							<a href="javascript:;">
								<img src="<{$__IMG__}><{$s.url|img_size:60x60}>" data-img="<{$__IMG__}><{$s.url|img_size:400x400}>" 
									data-big="<{$__IMG__}><{$s.url}>" />
							</a>
						<{/foreach}>
					</div>
					<div class="simg_rit"><a href="javascript:;" id="simg_left"></a></div>
				</div>
				<div class="fcollect">
					<div class="fshare">
						<div class="bdsharebuttonbox">
							<a href="#" class="bds_more" data-cmd="more"></a>
							<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
							<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
							<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
							<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
						</div> 
					</div>
					<div class="fclt">
						<a href="javascript:;" class="collect_goods">
							<{if $row.collect_status}>已经收藏<{else}>收藏产品<{/if}>
						</a>
					</div> 
				</div>
			</div>
 
			<div class="info"> 
				<h1><{$row.title}></h1>
				<{if $row.intro}>
					<h3><{$row.intro}></h3> 
				<{/if}>
				
				<!--传统价格-->
				<div class="con mprice"> 
					<{if ($row.promote_type == '1' && $row.sk_status == '1') || ($row.promote_type == '1' && $row.sk_status == '2') }>
						<!--活动价格-->
						<div class="price_act"> 
							<{if $row.sk_status == '1'}>
								<div class="name">秒杀进行中</div> 
								<div class="next_time">
									<div class="name2">距离结束还剩 </div>
									<div class="djs_box" data-diff="<{$row.etime_cha}>"></div>
								</div>
							<{elseif $row.sk_status == '2'}>
								<div class="name">商品参加秒杀的商品，请提前加入购物车！</div> 
								<div class="next_time" >
									<div class="name2">距离开始还有 </div>
									<div class="djs_box" data-diff="<{$row.stime_cha}>"></div>
								</div>
							<{/if}> 
						</div> 
					<{/if}>
					
					<div class="mpriceBox">
						<div class="mprice_l"> 
							<div class="buy_pr">
								<{if  $row.promote_type == '1' && $row.sk_status}>		
									<dl>
										<dt>秒杀价</dt>
										<dd class="pr">
											<i>¥</i><span class="html_act_price"><{$row.price}></span> 
											<s> ¥ <{$row.market_price}> </s>
										</dd>
									</dl> 
								<{else}>
									<dl>
										<dt>商城价</dt>
										<dd class="pr"><i>¥</i><span class="html_price"><{$row.price}></span></dd> 
									</dl>
								<{/if}>
							</div> 
						</div> 
						<div class="mprice_r"> 
							<dd>
								<span>累计评价</span>
								<em><{$row.comment}></em>
							</dd>
							<dd>
								<span>交易成功</span>
								<em><{$row.volume}></em>
							</dd> 
						</div>
					</div>
				</div> 

				<!--优惠券-->
				<{uqcms m="promote" v="coupon_list" c="coupon:gid=smarty.get.id&spid="|cat:$row.shop_id}> 
				<{if $coupon_list.list}>
					<div class="con promote">
						<dl>
							<dt>优惠券</dt>
							<dd>
								<div class="probox"> 
									<{foreach item=i name=n from=$coupon_list.list}>
										<a href="javascript:;" title="点击领取" data-id="<{$i.id}>" class="coupon_receive"> 
											<span>满<{$i.full_price|del0}>减<{$i.price|del0}></span> 
										</a>
									<{/foreach}>
								</div>
							</dd>
						</dl> 
					</div>
				<{/if}>		

				<!--服务-->
				<div class="con fw">
					<dl>
						<dt>服务</dt>
						<dd>本商品由品牌 发货，并提供售后服务。</dd>
					</dl>
					<dl>
						<dt>配送</dt>
						<dd>现货，21:00前完成下单当天发货，预计1-3天到达</dd>
					</dl>
				</div>
				
				<!--产品规格--> 
				<{uqcms m="goods_sku" v="sku" c="get_list:id=smarty.get.id"}> 
				<{if $sku.list}> 
					<div class="sku_box"> 
						<{foreach item=i from=$sku.list}>
							<dl>
								<dt><{$i.name}></dt>
								<dd> 
									<{foreach item=v from=$i.detail}> 
										<a data-id="<{$v.id}>" title="<{if $v.img_name}><{$v.img_name}><{else}><{$v.name}><{/if}>" href="javascript:;">
											<{if $v.img_url}>
												<img src="<{$__IMG__}><{$v.img_url|img_size:60x60}>" 
													 data-img="<{$__IMG__}><{$v.img_url|img_size:400x400}>" 
													 data-big="<{$__IMG__}><{$v.img_url}>" 
													 width="30" />
											<{/if}>
											<em><{if $v.img_name}><{$v.img_name}><{else}><{$v.name}><{/if}></em> 
											<i></i> 
										</a>
									<{/foreach}>
								</dd>
							</dl>
						<{/foreach}> 
					</div>
					<input type="hidden" class="sku_id" id="sku_id" autocomplete="off" value="">
				<{else}>
					<input type="hidden" class="sku_id" id="sku_id" autocomplete="off" value="<{$sku.id}>">
				<{/if}>
				
				<!--数量加入购物车<div class="kc">库存 <i class="kc_num"><{$row.stock}></i> 件</div>--> 
				<div class="con buy_action"> 
					<div class="Gnum"> 
						<input type="text" size="2" value="1" id="buy_num" autocomplete="off"/>
						<span>
							<a href="javascript:;" id="num_plus">+</a>
							<a href="javascript:;" id="num_minus">-</a> 
						</span>
					</div>
					<div class="Gcart"> 
						<input type="hidden" id="goods_id" value="<{$smarty.get.id}>"/> 
						<input type="hidden" id="shop_id" value="<{$row.shop_id}>"/> 
						<input type="hidden" id="share_id" value="<{$smarty.get.share_id}>"/>
						<input type="hidden" id="limit_num" value="<{$row.limit_num}>">
						<input type="hidden" id="stock" value="<{$row.stock}>">
						
						<!--普通购买-->
						<a href="javascript:;" class="<{if $row.stock == '0'}>yyue_n<{else}>yyue<{/if}> nowbuy" data-type="0"><i style="background:url(<{$__PUBLIC__}>images/w_cart.png); background-size:21px auto;"></i>加入购物车</a>
						<a href="javascript:;" class="<{if $row.stock == '0'}>yyue_n2<{else}>yyue2<{/if}> nowbuy" data-type="1">立即购买</a>
						<div class="wapbuycode">
							<a href="javascript:;" title="手机购买"><i>手机购买</i></a>
							<span><img src="<{$__URI__}>ajax/qrcode?size=3&code=<{$UQCMS.site_domain|cat:'wap/goods/'|cat:$row.id|base64_encode}>"></span>
						</div> 
					</div> 
				</div>
				
				<!--TIP-->
				<div class="service_info">
					<dl>
						<dt>服务承诺</dt>
						<dd>
							<a href="javascript:;">正品保证</a>
							<{if $row.is_after_sale == '1'}>
								<a href="javascript:;">七天无理由退货</a>
							<{else}>
								<a href="javascript:;">不支持七天无理由退货</a>
							<{/if}> 
						</dd>
					</dl>
				</div>
			</div> 
			<div class="ltl">
				<div class="name"><h3>看了又看</h3></div>
				<div class="con">
					<{uqcms m="goods" v="look" c="goods_hot:gid=smarty.get.id&limit=2"}>
					<{if $look}>
						<{foreach item=l from=$look}> 	
							<a href="<{$__URI__}>goods/<{$l.id}><{$__HTML__}>">
								<span><img src="<{$__IMG__}><{$l.images|img_size:160x160}>"/></span>
								<p>￥<{$l.price}></p>
							</a>
						<{/foreach}> 
					<{/if}>	
				</div>
			</div> 
		</div>
		
		<!--下部数据-->
		<div class="btm">
			<div class="lft">
				<!--店铺信息-->
				<div class="sp_info">
					<div class="nm">
						<span><a href="<{$__URI__}>shop/<{$sprow.id}>" target="_blank"><{$sprow.name}></a></span> 
						<a href="http://wpa.qq.com/msgrd?v=3&uin=<{$sprow.qq}>&site=qq&menu=yes" target="_blank"><img src="<{$__PUBLIC__}>images/chat.png" width="20"/></a>
					</div>
					<div class="service"> 
						<dl>
							<dt>描述</dt>
							<dd><{$sprow.score.goods}></dd>
						</dl>
						<dl>
							<dt>服务</dt>
							<dd><{$sprow.score.service}></dd>
						</dl>
						<dl>
							<dt>物流</dt>
							<dd><{$sprow.score.logistics}></dd>
						</dl>
					</div> 	  
					<div class="sp_desc sc">
						<a href="<{$__URI__}>shop/<{$sprow.id}>" target="_blank" class="ch">进入店铺</a>
						<a href="javascript:;" class="collect_shop">
							<{if $sprow.collect_status == 1}>已经收藏<{else}>店铺收藏<{/if}>
						</a>
					</div>
				</div>
				
				<!--产品分类-->
				<{uqcms m="goods" v="cats" c="group:spid="|cat:$sprow.id}>
				<{if $cats}>
					<div class="sp_cats">
						<div class="name"><span>店铺分类</span></div>
						<div class="con"> 
							<{foreach item=i from=$cats}>
								<a href="<{$__URI__}>shop/<{$row.shop_id}>?group_cid=<{$i.id}>"><{$i.name}></a> 
							<{/foreach}> 
						</div>
					</div>
				<{/if}> 
				
				<!--销量排行-->
				<div class="lgs gslist">
					<div class="name"><span>销量排行</span></div>
					<div class="con">
					<{uqcms m="goods" v="hot" c="goods_hot:gid=smarty.get.id&limit=6"}>
					<{if $hot}>
						<{foreach item=h from=$hot}> 
							<dl>
								<dt><a href="<{$__URI__}>goods/<{$h.id}><{$__HTML__}>"><img data-original="<{$__IMG__}><{$h.images|img_size:160x160}>" class="lazy"></a></dt>
								<dd><a href="<{$__URI__}>goods/<{$h.id}><{$__HTML__}>"><{$h.title|truncate:30:".."}></a></dd>
								<dd>
									<span>￥ <{$h.price}></span>	
									<i>售出 <{$h.volume}></i>	
								</dd>
							</dl>
						<{/foreach}>
					<{else}>
						<dl><span style="width:100%; text-align:center; color:#999; float:left;">暂无销量</span></dl>	
					<{/if}>
					</div> 
				</div>
				 
			</div> 
			<!--右侧详情描述-->
			<div class="rit">
				<div class="hcon">
					<div class="hcontent desc_name">  
						<a href="javascript:;" doid="0" class="ch">商品详情</a> 
						<a href="javascript:;" doid="1">商品评价（<{$row.comment}>）</a>
						<a href="javascript:;" doid="2">售后服务</a>
					</div> 
					<{uqcms m="goods" v="attr_list" c="get_attr_list:id=smarty.get.id"}> 
					<div class="desc_content detailContent">
						<div class="attr">
						<{foreach item=attr from=$attr_list}>
							<dl>
								<dt><{$attr.name}> ：</dt> 
								<dd><{$attr.value}></dd>
							</dl>
						<{/foreach}>
						</div>
						<{$row.content|htmlspecialchars_decode}>
					</div> 
					<!--评论留言-->
					<div class="desc_content hcomment">
						 <div class="comment_s">
							<div class="fs">
								<span>好评度</span>
								<em><{$row.score_good_rate*100}></em> 	
								<i>%</i>
							</div>
							<div class="bf">
								<dl>
									<dt>好评(<{$row.score_good_rate*100}>%)：</dt>
									<dd><span style="width:<{$row.score_good_rate*100}>%;"></span></dd>
								</dl>
								<dl>
									<dt>中评(<{$row.score_average_rate*100}>%)：</dt>
									<dd><span style="width:<{$row.score_average_rate*100}>%;"></span></dd>
								</dl>
								<dl>
									<dt>差评(<{$row.score_bad_rate*100}>%)：</dt>
									<dd><span style="width:<{$row.score_bad_rate*100}>%;"></span></dd>
								</dl>
							</div> 
						</div>
						<div class="comment_l" id="comment">
							<div class="comMenu">
								<a href="javascript:;" onclick="get_cmt('<{$__URI__}>goods/comment?gid=<{$smarty.get.id}>&ccid=#comment')">全部评价（<{$row.comment}>）</a>
								<a href="javascript:;" onclick="get_cmt('<{$__URI__}>goods/comment?gid=<{$smarty.get.id}>&ccid=1#comment')">好评（<{$row.score_good}>）</a>
								<a href="javascript:;" onclick="get_cmt('<{$__URI__}>goods/comment?gid=<{$smarty.get.id}>&ccid=2#comment')">中评（<{$row.score_average}>）</a>
								<a href="javascript:;" onclick="get_cmt('<{$__URI__}>goods/comment?gid=<{$smarty.get.id}>&ccid=3#comment')">差评（<{$row.score_bad}>）</a>
							</div>
						</div>
						<div class="comment_box_html"></div>
					</div>
				</div>
				
			</div>
		</div>
	</div>
</div> 
<{import file="footer.html" js="detail"}>  
<script type="text/javascript" src="<{$__PUBLIC__}>plug/jquery.jqzoom.js"></script>
<script type="text/javascript">
lazyload();  
countDown('.djs_box');
get_cmt(URI+'goods/comment?gid=<{$smarty.get.id}>&page=1&ccid=');

$(function(){
	// 主图的轮播
	$(".jqzoom").jqueryzoom({
		xzoom: 400, //放大图的宽度(默认是 200)
		yzoom: 400, //放大图的高度(默认是 200)
		offset: 100 , //离原图的距离(默认是 10)
		position: "left", //放大图的定位(默认是 "right")
		preload: 1
	});
	
	// SKU的处理
	<{if $sku.json}>
		var sku_json_data = <{$sku.json}>;
		$(".sku_box dl dd a").click(function(){
			$this = $(this); 
			if($this.hasClass('selected')){ 
				$this.removeClass('selected');
			}else{
				$this.addClass("selected").siblings().removeClass('selected');
			} 
			check_sku_price();
		}); 
		function check_sku_price(){
			var _val = '';
			$('.sku_box dl dd a.selected').each(function(){
				var $this = $(this);
				var val = $this.attr("data-id");  
				_val+=_val!=""?",":"";
				_val+=val; 
			}); 
			if(sku_json_data[_val] == undefined ||sku_json_data[_val] == ''){ 
				$('#sku_id').val('');
			}else{
				var sku_pr = sku_json_data[_val]['price'];
				var sku_act_pr = sku_json_data[_val]['act_price'];  
				var sku_grp_pr = sku_json_data[_val]['grp_price'];  
				var sku_sk = sku_json_data[_val]['stock'];
				var sku_id = sku_json_data[_val]['sku_id'];
				// IS DO 
				if(sku_sk <= '0'){
					$('.addcart').removeClass('yyue').addClass('yyue_n');
					$('.nowbuy').removeClass('yyue2').addClass('yyue_n2');
					$('.groupbuy').removeClass('yyue').addClass('yyue_n');
				}else{
					$('.addcart').removeClass('yyue_n').addClass('yyue');
					$('.nowbuy').removeClass('yyue_n2').addClass('yyue'); 
					$('.groupbuy').removeClass('yyue_n').addClass('yyue'); 
				}
				$('.html_price').html(sku_pr); 
				$('.html_price').html(sku_act_pr); 
				$('.tuan_price').html(sku_grp_pr);
				
				$('.kc_num').html(sku_sk);
				$('#stock').val(sku_sk);
				$("#plus_button").attr('data-max-num',sku_sk); 
				$('#sku_id').val(sku_id); 
				sku_error_close();
			}
		}
	<{/if}>
});

	
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
$(function(){
	SysSecond = parseInt($(".next_time").attr("data-time")); 
	SetRemainTime();
	InterValObj = window.setInterval(SetRemainTime, 1000); 
});
</script> 