<{uqcms m="goods" c="get_one:smarty.get.id" v="row"}>
<{uqcms m="shop" v="sprow" c="get_one:"|cat:$row.shop_id}>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><{$row.title}></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<link rel="stylesheet" type="text/css" href="<{$__PUBLIC__}>css/common_uqcms.css"> 
<link rel="stylesheet" type="text/css" href="<{$__PUBLIC__}>plug/raty/jquery.raty.css"> 
<link rel="stylesheet" type="text/css" href="<{$__APP__}>public/css/public.css"> 
<link rel="stylesheet" type="text/css" href="<{$__APP__}>public/css/detail.css">
</head>
<body>
<{include file="default/header.html"}>
<div class="cname_bar">
	<div class="cname">
		<a href="index.php">首页 >></a> 
		<{uqcms m="category" v="cats" c="get_parents_name:"|cat:$row.cid}>
		<{foreach item=c key=ck from=$cats}>
			<a href="index.php?m=goods&cid=<{$ck}>"><{$c}></a> >>
		<{/foreach}>
		<{$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: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">
				<{if $smarty.session.shop.spid == $row.shop_id}>
					<!--店铺登录直接进店铺编辑-->
					<div class="online_edit"><a href="<{$__URI__}>member.php?m=goods&a=edit&id=<{$row.id}>" target="_blank">编辑</a></div>
				<{/if}>
				<h1><{$row.title}></h1>
				<h3><{$row.intro}></h3> 
				<!--传统价格-->
				<div class="con mprice">
					<{if $row.sk_status == '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">  
							<{if $row.promote_type == '2'}>
								<div class="tuan_pr">
									<dl class="bpr">
										<dt>拼团价</dt>
										<dd class="pr"><i>¥</i><span class="tuan_price"><{$row.group_price}></span></dd> 
									</dl> 
									<dl>
										<dt>现价</dt>
										<dd><i>¥</i><span class="html_price"><{$row.price}></span></dd> 
									</dl>	
								</div> 
							<{else}>
								<div class="buy_pr">
									<{if $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>
							<{/if}>
						</div>
						
						<div class="mprice_r"> 
							<dd>
								<span>累计评价</span>
								<em><{$row.comment}></em>
							</dd>
							<dd>
								<span>交易成功</span>
								<em><{$row.volume}></em>
							</dd> 
						</div>
					</div> 
					<!--活动优惠-->
					<{uqcms m="goods_act" v="reduce_list" c="reduce_list:"|cat:$row.shop_id}>
					<{if $reduce_list}>
						<div class="promotion">
							<dl>
								<dt>优惠</dt>
								<dd>
									<div class="probox">
									<i>满减</i>
									<{foreach item=i name=n from=$reduce_list}>
										<span><{$i.name}><{if $smarty.foreach.n.last eq 1}><{else}>,<{/if}></span>
									<{/foreach}>
									</div>
								</dd>
							</dl> 
						</div>
					<{/if}>
				</div>
				<div class="con fw">
					<dl>
						<dt>服务</dt>
						<dd>本商品由品牌商<{if $sprow.prov_cn}>从<{$sprow.prov_cn}><{$sprow.city_cn}><{$sprow.dist_cn}><{else}>提供<{/if}>发货，并提供售后服务。</dd>
					</dl>
				</div>
				<{uqcms m="goods_sku" v="sku" c="get_list: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="con fw">
					<dl>
						<dt>数量</dt>
						<dd>
							<div class="Gnum"> 
								<input type="text" size="3" value="1" id="buy_num" autocomplete="off"/>
								<span>
									<a href="javascript:;" id="plus_button" max-num="<{$row.stock}>" >+</a>
									<a href="javascript:;" id="minus_button">-</a> 
								</span>
							</div>
							<div class="kc">库存 <i class="kc_num"><{$row.stock}></i> 件</div>
						</dd>
					</dl>
				</div>
				<div class="con"> 
					<div class="Gcart">
						<input type="hidden" id="goods_id" value="<{$smarty.get.id}>"/>
						<input type="hidden" id="shop_id" value="<{$sprow.id}>"/>
						<input type="hidden" id="share_id" value="<{$smarty.get.share_id}>"/>
						<!--加入购物车-->
						<{if $row.promote_type == '2'}>
			<!--拼团购买-->
			<a href="javascript:;" class="<{if $row.stock == '0'}>yyue_n<{else}>yyue<{/if}> nowbuy" data-type="2"><{$row.p_number}>人拼团购买</a>
			<a href="javascript:;" class="<{if $row.stock == '0'}>yyue_n2<{else}>yyue2<{/if}> nowbuy" data-type="1">现价单独购买</a> 
						<{else}>
			<!--普通购买-->
			<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> 
						<{/if}>
					</div>  
					<div class="wapbuycode">
						<a href="javascript:;" title="手机购买"><i>手机购买</i></a>
						<span><img src="index.php?m=ajax&a=qrcode&size=3&code=<{$__HOST__|cat:'wap.php?m=goods&a=detail&id='|cat:$row.id|base64_encode}>"></span>
					</div>
				</div> 
				<div class="service_info">
					<dl>
						<dt>服务承诺</dt>
						<dd>
							<a href="javascript:;">正品保证</a>
							<a href="javascript:;">七天无理由退货</a>
						</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=3"}>
					<{if $look}>
						<{foreach item=l from=$look}> 	
							<a href="?m=goods&a=detail&id=<{$l.id}>">
								<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="index.php?m=shop&id=<{$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="index.php?m=shop&id=<{$row.shop_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:"|cat:$row.shop_id}>
				<{if $cats}>
					<div class="sp_cats">
						<div class="name"><span>店铺分类</span></div>
						<div class="con">
							<{foreach item=i from=$cats}>
								<ul>
									<li>
										<span><i>+</i></span>
										<a href="index.php?m=shop&id=<{$row.shop_id}>&group_cid=<{$i.id}>"><{$i.name}></a> 
									</li>
								</ul> 
							<{/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="index.php?m=goods&a=detail&id=<{$h.id}>"><img data-original="<{$__IMG__}><{$h.images|img_size:60x60}>" class="lazy"></a></dt>
								<dd>
									<a href="index.php?m=goods&a=detail&id=<{$h.id}>"><{$h.title|truncate:12:".."}></a>
									<span>￥:<{$h.price}></span>	
									<span>售出:<{$h.volume}></span>	
								</dd>
							</dl>
						<{/foreach}>
					<{else}>
						<dl><span style="width:100%; text-align:center; color:#999999; 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: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}>
					</div> 
					<!--评论留言--> 
					<div class="desc_content hcomment">
						<{include file="default/goods/comment.html"}>
					</div>  
					<div class="desc_content server_info" style="display:none;">
						<{uqcms m="news" v="news_row" c="get_one:alias=server_info"}>
						<{if $news_row.content}><{$news_row.content}><{/if}> 
					</div>
					
				</div>
			</div>
		</div>
	</div>
</div> 
<{include file="default/footer.html"}>
<script type="text/javascript">
var PUBLIC_PATH	= '<{$__PUBLIC__}>';
var APP_PATH	= '<{$__APP__}>';
var IMG_HOST 	= '<{$__IMG__}>'; 
</script>
<script type="text/javascript" src="<{$__PUBLIC__}>js/jquery.min.js"></script>
<script type="text/javascript" src="<{$__PUBLIC__}>js/jquery.fly.min.js"></script> 
<script type="text/javascript" src="<{$__PUBLIC__}>js/jquery.jqzoom.js"></script> 
<script type="text/javascript" src="<{$__PUBLIC__}>plug/raty/jquery.raty.js"></script> 
<script type="text/javascript" src="<{$__PUBLIC__}>js/common.js?v=<{$js_version}>"></script> 
<script type="text/javascript" src="<{$__APP__}>public/js/cart.js?v=<{$js_version}>"></script>  
<script type="text/javascript" src="<{$__APP__}>public/js/rside.js?v=<{$js_version}>"></script> 
<script type="text/javascript"> 
lazyload(); 
countDown('.djs_box');
$(function(){ 
	$(".wapbuycode").hover(function(){
		$('span',this).show();
	},function(){
		$('span',this).hide();
	});

	// 主图的轮播
	$(".jqzoom").jqueryzoom({
		xzoom: 400, //放大图的宽度(默认是 200)
		yzoom: 400, //放大图的高度(默认是 200)
		offset: 100 , //离原图的距离(默认是 10)
		position: "left", //放大图的定位(默认是 "right")
		preload: 1
	});
	$(".simg a").mouseover(function(){
		$this = $(this);
		var bimg = $('img ',$this).attr('data-img');
		$(".bimg img").attr('src',bimg); 
		var bgimg = $('img ',$this).attr('data-big');
		$(".bimg img").attr('jqimg',bgimg); 
	});
 	$(".sku_box dl dd a").click(function(){ 
		$this = $(this); 
		var sku_img = $this.find('img').attr('data-img');
		if(sku_img != 'undefined'){
			$(".bimg img").attr('src',sku_img); 
			 var bgimg = $('img ',$this).attr('data-big');
			$(".bimg img").attr('jqimg',bgimg); 
		} 
	});
	// 评分
	$('.box_score').raty({ 
		score:0,
		iconRange: [
			{ range: 1, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' },
			{ range: 2, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' },
			{ range: 3, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' },
			{ range: 4, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' },
			{ range: 5, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' }
	  	],
		click:function(score ,evt){
			 $("#score").val(score);
		},
		hints: ['a', null, '', undefined, '*_*']
	});
	
	$('.pf').raty({
	  	score: function() {
			return $(this).attr('data-score');
	  	},iconRange: [
			{ range: 1, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' },
			{ range: 2, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' },
			{ range: 3, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' },
			{ range: 4, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' },
			{ range: 5, on: '<{$__PUBLIC__}>images/star-on.png', off: '<{$__PUBLIC__}>images/star-off.png' }
	  	],readOnly: true
	});
	
	// 切换部分
	$(".desc_name a").click(function(){
		$this = $(this);
		doid = $this.attr('doid');
		$this.addClass("ch").siblings().removeClass('ch'); 
		if(doid == 0){
			$(".desc_content").show();
			$(".desc_content").eq(2).hide(); 
		}else{ 
			$(".desc_content").hide();
			$(".desc_content").eq(doid).show();
		} 
	}); 
	 
	// 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);
				$("#plus_button").attr('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> 