<div class="bigweb">
<section class="breadcrumb">
	<span>您当前的位置：</span> <a href="{url:}">首页</a> » 商户主页
</section>

<section class="web">
	<section class="main">
		<section class="goods_sort">
			<ul>
				{foreach:items=search_goods::getOrderType()}
				<li id="order_{$key}">
					<a href="{echo:search_goods::searchUrl(array('order','by'),array($key,search_goods::getOrderBy($key)))}">{$item}</a>
				</li>
				{/foreach}
			</ul>
		</section>
		<section class="goods_list">
			{set:$goodsObj = search_goods::find(' go.seller_id = '.$seller_id,20);$resultData = $goodsObj->find();}
			{if:$resultData}
			<ul>
				{foreach:items=$resultData}
				<li>
					<a target="_blank" href="{url:/site/products/id/$item[id]}">
						<img alt="{$item['name']}" src="{url:/pic/thumb/img/$item[img]/w/205/h/205}">
						<h5>{$item['name']}</h5>
						<em>￥{$item['sell_price']}</em>
						<del>￥{$item['market_price']}</del>
					</a>
				</li>
				{/foreach}
			</ul>
			{$goodsObj->getPageBar()}

			{else:}
			<p class="no_tip">
				对不起，没有找到相关商品
			</p>
			{/if}
		</section>
	</section>
	<aside class="bar">
		<div class="bar_box">
			<h3 class="bar_box_head">商户信息</h3>
			<div class="bar_seller">
				<h1>{$sellerRow['true_name']}</h1>
				<p><img src="{webroot:$sellerRow['logo']}" style="width:100%" onerror="this.src='http://www.aircheng.com/images/public/default_logo.png'" /></p>
				<div class="star_box">
					<strong class="item">评分：</strong>
					<span class="star star_{echo:statistics::gradeSeller($sellerRow['id'])}"></span>
				</div>
				<p>销量：{echo:statistics::sellCountSeller($sellerRow['id'])} 件</p>
				<p>官网：<a href="{$sellerRow['home_url']}" target="_blank">点击进入</a></p>
				<p>联系电话：{$sellerRow['phone']}</p>
				<p>所在地：{echo:join(' ',area::name($sellerRow['province'],$sellerRow['city'],$sellerRow['area']))} {$sellerRow['address']}</p>
				<p>{set:plugin::trigger("onServiceButton",$sellerRow['id'])}</p>
			</div>
		</div>
		<div class="bar_box">
			<h3 class="bar_box_head">销售排行榜</h3>
			<ul class="bar_goods ranking">
				{foreach:items=Api::run('getGoodsListBySellerid',array('#seller_id#',$seller_id),10)}
				<li>
					<a href="{url:/site/products/id/$item[id]}">
						<img src="{url:/pic/thumb/img/$item[img]/w/60/h/60}" alt="{$item['name']}">
						<strong>{$item['name']}</strong>
						<em>￥{$item['sell_price']}</em>
					</a>
				</li>
				{/foreach}
			</ul>
		</div>

		<div class="bar_box">
			<h3 class="bar_box_head">促销活动</h3>
			<ul class="bar_nav">
				{foreach:items=Api::run('getProrule',$seller_id)}
				<li>{$item['info']}</li>
				{/foreach}
			</ul>
		</div>

		<div class="bar_box">
			<h3 class="bar_box_head">商家推荐</h3>
			<ul class="bar_goods">
				{foreach:items=Api::run('getGoodsListBySelleridList',array('#seller_id#',$seller_id),10)}
				<li>
					<a href="{url:/site/products/id/$item[id]}">
						<img src="{url:/pic/thumb/img/$item[img]/w/60/h/60}" alt="{$item['name']}">
						<strong>{$item['name']}</strong>
						<em>￥{$item['sell_price']}</em>
					</a>
				</li>
				{/foreach}
			</ul>
		</div>
	</aside>
</section>
</div>

<script>
//筛选条件按钮高亮
$(function(){
	//排序字段
	{set:$orderValue = IFilter::act(IReq::get('order'))}
	{if:$orderValue}
	$('#order_{$orderValue}').addClass('current');
	{/if}

	//顺序
	{set:$byValue = IReq::get('by')}
	{if:$byValue == "desc"}
	$('#order_{$orderValue}').addClass('desc');
	{else:}
	$('#order_{$orderValue}').addClass('asc');
	{/if}

	//显示方式
	{set:$showType = IReq::get('show_type');}
	{if:$showType == "win"}
	$('[name="goodsItems"]').attr({"class":"clearfix win"});
	$('[name="goodsImage"]').css({"width":200,"height":200});
	$('#winButton').addClass('active');
	{elseif:$showType == "list"}
	$('[name="goodsItems"]').attr({"class":"clearfix list"});
	$('[name="goodsImage"]').css({"width":115,"height":115});
	$('#listButton').addClass('active');
	{/if}
});
</script>
