<{uqcms m="goods" c="get_one:id=smarty.get.id" v="row"}> 
<{uqcms m="goods" v="comment" c="comment:gid=smarty.get.id&page=smarty.get.page_size&page_size=10&ccid=smarty.get.ccid"}>
<{import file="common.html" title="商品评价" keyword="" describe="" css="goods_sku,comment"}>
<div class="cnav">
	<a class="back" href="<{$__WAP__}>goods/<{$smarty.get.id}><{$__HTML__}>">&nbsp;</a>
	商品评价
	<a href="javascript:;" class="thome">主页</a>
</div>  
<div class="cmtbox">
	<div class="name"><span>商品评价</span><em>好评度<{$comment.percent}>%</em></div>
	<div class="cmtpl">
		<div class="cmtplbox">
			<a href="<{$__WAP__}>goods/comment.html?id=<{$smarty.get.id}>" <{if $smarty.get.ccid == ''}>class="ch"<{/if}>>全部(<{$comment.count.total}>)</a>
			<a href="<{$__WAP__}>goods/comment.html?id=<{$smarty.get.id}>&ccid=1" <{if $smarty.get.ccid == '1'}>class="ch"<{/if}>>好评(<{$comment.count.good}>)</a>
			<a href="<{$__WAP__}>goods/comment.html?id=<{$smarty.get.id}>&ccid=2" <{if $smarty.get.ccid == '2'}>class="ch"<{/if}>>中评(<{$comment.count.middle}>)</a>
			<a href="<{$__WAP__}>goods/comment.html?id=<{$smarty.get.id}>&ccid=3" <{if $smarty.get.ccid == '3'}>class="ch"<{/if}>>差评(<{$comment.count.bad}>)</a> 
		</div>
	</div>
	<div class="con">
		<{if $comment.list}> 
			<{foreach item=i from=$comment.list}>
				<div class="cmtconbox">
					<div class="uname">
						<div class="avatar"><img src="<{if $i.avatar}><{$__IMG__}><{$i.avatar|img_size:80x80}><{else}><{$__PUBLIC__}>images/avatar.png<{/if}>"><span><{$i.nick}></span></div>
						<div class="tm"><{$i.addtime}></div>
					</div>
					<div class="umsg">	
						<p><{$i.content}></p>
						<{if $i.sku_value}>
							<p class="p2">
								<{foreach item=ii from=$i.sku_value}>
									<{$ii.0}>: <{$ii.1}> &nbsp;&nbsp;
								<{/foreach}>
							</p>
						<{/if}>
					</div>
				</div>
			<{/foreach}> 
			<div id="more">
				<a href="<{$comment.next_page}>">&nbsp;</a> 
				<input type="hidden" id="path_parse" value="<{$__WAP__}>goods/comment.html?gid=<{$smarty.get.gid}>&page="/>
				<input type="hidden" id="curr_page" value="1"/>
			</div>
		<{else}>
			<div class="nomsg"><span>暂无评价</span></div>
		<{/if}>
	</div>
</div>
<{import file="goods/buy_sku.html"}> 
<{import file="footer.html"}>
<script type="text/javascript" src="<{$__PUBLIC__}>js/jquery.infinitescroll.js"></script> 
<script type="text/javascript" src="<{$__APP__}>public/js/cart.js?v=<{$js_version}>"></script>
<script type="text/javascript">
$(function(){
	// 关注
	$("a.collect_goods").click(function(){
		var $this = $(this);
		gid = $this.attr('data-gid'); 
		$.post(URI+'ajax/collect_goods', {gid:gid}, function(result){ 
			var data = jQuery.parseJSON(result); 
			if(data.error == '0'){
				if(data.status == '2'){ 
					location.href="<{$__WAP__}>member/login/returnUrl/<{$UQCMS.request_url}>";
				}else if(data.status == '1'){
					$this.children('i').removeClass('love').addClass('love2');
				}else if(data.status == '0'){
					$this.children('i').removeClass('love2').addClass('love'); 
				}
			}else{
				$.alert(data.msg);
			}
		});
	});
});
</script>