review.html 2.1 KB
<link type="text/css" rel="stylesheet" href="{url:#css/ucenter.css}" />
<style type="text/css">
	.score{
		color: #F00;
	}
</style>
<div class="container clearfix">
	{widget:name=sub_navs action=ucsidebar sidebar=$sidebar act=$actionId}
	<div class="clearfix uc-content">
			<h1 class="title"><span>商品评价:</span></h1>
			<div class="tab">
				<ul class="tab-head">
					<li>待评价商品<i></i></li>
					<li>已评价商品<i></i></li>
				</ul>
				<div class="tab-body" >
					<div id="review-n" class="js-template">
						<table class="simple">
							<tr><th width="160">订单编号</th> <th >商品名称</th> <th width="140">购买时间</th> <th width="80">评价</th></tr>
							<tbody class="page-content">
								<tr class="{odd-even}">
									<td>{order_no}</td> <td><a href="{url:/index/product/id/}{gid}" target="_blank">{name}</a></td> <td>{buy_time}</td> <td><a class="btn btn-mini" href="{url:/index/review/id/}{id}" target="_blank">评价</a></td>
								</tr>
							</tbody>
						</table>
						<div class="page-nav"></div>
					</div>
					<div id="review-y" class="js-template">
						<table class="simple">
							<tr><th width="160">订单编号</th> <th>商品名称</th> <th width="100">评价时间</th> <th width="80">我的评分</th></tr>
							<tbody class="page-content">
								<tr class="{odd-even}">
									<td>{order_no}</td> <td><a href="{url:/index/product/id/}{gid}" target="_blank">{name}</a></td> <td>{comment_time}</td> <td><span class="score ">{point}</i></span></td>
								</tr>
							</tbody>
						</table>
						<div class="page-nav"></div>
					</div>
				</div>
			</div>
	</div>
</div>
<script type="text/javascript">
	$("#review-n").Paging({
		url:'{url:/ucenter/get_review}',
		params:{status:'n'}
	});
	$("#review-y").Paging({
		url:'{url:/ucenter/get_review}',
		params:{status:'y'},
		callback:function(data){
			$("#review-y .score").each(function(){
				var str = "";
				var num = parseInt($(this).text())/20;
				for(var i=0;i<num;i++){
					str+="★";
				}
				$(this).text(str);
			});
		}
	});
</script>