<!DOCTYPE html>
<html>
	<?php echo $this->fetch('head.html'); ?>
	<link href="/plugin/swiper/css/swiper.min.css" rel="stylesheet" />
	<link href="<?php echo $this->_var['skins']; ?>index.css" rel="stylesheet" />
	<body>
		<div class="header">
			<img src="<?php echo $this->_var['site']['logo']; ?>.100x100.jpg" class="header-logo" />
			<div class="header-search-box">
				<input id="keyword" type="search" class="header-search pdl-5" />
				<div id="searchBtn" class="header-search-btn  iconfont icon-search"></div>
			</div>
			 
		</div>
		<div class="header-row"></div>
		
		<div class="main-body">
			<div class="swiper-container" id="indexFlash">
				<div class="swiper-wrapper" >
					<?php $_from = $this->_var['flashList']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
					<div class="swiper-slide">
						<img class="wmax" src="<?php echo $this->_var['c']['imgurl']; ?>" />
					</div>
					<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
				</div>
				 
				<div class="swiper-pagination"></div>
			 
			</div>
			<?php if ($this->_var['navList']): ?>
			<div class="m-navPic">
			    <?php $_from = $this->_var['navList']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
			    <a href="<?php echo $this->_var['c']['link1']; ?>" class="m-navPic-item">
					  <img class="m-navPic-img" src="<?php echo $this->_var['c']['imgurl']; ?>" />
					  <div class="m-navPic-title"><?php echo $this->_var['c']['title']; ?></div>				   
			    </a>		
			    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</div>
			<?php endif; ?>
			<?php if ($this->_var['adList']): ?>
			<div class="adBox">
				<?php $_from = $this->_var['adList']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
				<div class="adBox-item">
					<img gourl="<?php echo $this->_var['c']['link1']; ?>" src="<?php echo $this->_var['c']['imgurl']; ?>" class="adBox-img" />
				</div>
				<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
						 
			</div>
			<?php endif; ?>
			<div class="row-box-hd  pdl-10" >
				<div class="flex-1 f16">商家推荐</div>
				<div gourl="/module.php?m=b2b_shoplist" class="row-box-more">更多</div>
			</div>
			<?php $_from = $this->_var['recShop']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
			<a href="/module.php?m=b2b_shop&shopid=<?php echo $this->_var['c']['shopid']; ?>"  class="flexlist-item">
				<img src="<?php echo $this->_var['c']['imgurl']; ?>.100x100.jpg" class="flexlist-img bd-radius-50" />
				<div class="flex-1">
					<div class="flexlist-title"><?php echo $this->_var['c']['shopname']; ?></div>
					<div class="sky-raty" len="5" mod="2"  readonly="1" grade="<?php echo $this->_var['c']['raty_grade']; ?>" label="评价"></div>
					<?php if ($this->_var['c']['prolist']): ?>
					<div class="flex" >
						<?php $_from = $this->_var['c']['prolist']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'p');if (count($_from)):
    foreach ($_from AS $this->_var['p']):
?>
						<div  class="mgr-5">
							<img src="<?php echo $this->_var['p']['imgurl']; ?>.100x100.jpg" class="wh-60 mgb-5" />							 
						</div>
						<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
					</div>
					<?php endif; ?>
				</div>
				<?php if ($this->_var['c']['distance'] > 0): ?>
				<div class="cl3 f12">距您<?php echo $this->_var['c']['distance']; ?>Km</div>
				<?php endif; ?>
			</a>
			<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			<div class="row-box-hd  pdl-10" >
				<div class="flex-1 f16">好货推荐</div>
				<div gourl="/module.php?m=b2b_group_product&gkey=recommend" class="row-box-more">更多</div> 
			</div>
			<div class="mtlist">
				<?php $_from = $this->_var['recList']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
				<a href="/module.php?m=b2b_product&a=show&id=<?php echo $this->_var['c']['id']; ?>&shopid=<?php echo $this->_var['c']['shopid']; ?>" class="mtlist-item">
					<div class="mtlist-item-bd">
						<div class="mtlist-imgbox">
							<img class="mtlist-img " src="<?php echo $this->_var['c']['imgurl']; ?>.small.jpg" />
						</div>
						<div class="mtlist-item-pd">
							<div class="mtlist-item-money">
								<div class="mtlist-item-money-flex">￥
									<text class="mtlist-item-money_money"><?php echo $this->_var['c']['price']; ?></text>
								</div>
								<div class="mtlist-item-money_num">月销<?php echo $this->_var['c']['buy_num']; ?>件</div>
							</div>
							<div class="mtlist-title"><?php echo $this->_var['c']['title']; ?></div>
							 
						</div>
					</div>
				</a>
				<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</div>
			<div class="row-box-hd  pdl-10 mtt10" >
				<div class="flex-1 f16">热销</div>
				<div gourl="/module.php?m=b2b_group_product&gkey=hot" class="row-box-more">更多</div>  
			</div>
			<div class="mtlist">
				<?php $_from = $this->_var['hotList']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
				<a href="/module.php?m=b2b_product&a=show&id=<?php echo $this->_var['c']['id']; ?>&shopid=<?php echo $this->_var['c']['shopid']; ?>" class="mtlist-item">
					<div class="mtlist-item-bd">
						<div class="mtlist-imgbox">
							<img class="mtlist-img " src="<?php echo $this->_var['c']['imgurl']; ?>.small.jpg" />
						</div>
						<div class="mtlist-item-pd">
							<div class="mtlist-item-money">
								<div class="mtlist-item-money-flex">￥
									<text class="mtlist-item-money_money"><?php echo $this->_var['c']['price']; ?></text>
								</div>
								<div class="mtlist-item-money_num">月销<?php echo $this->_var['c']['buy_num']; ?>件</div>
							</div>
							<div class="mtlist-title"><?php echo $this->_var['c']['title']; ?></div>
							 
						</div>
					</div>
				</a>
				<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</div>
		</div> 
		<?php echo $this->fetch('ftnav.html'); ?>
		<?php echo $this->fetch('footer.html'); ?>
		<script src="/plugin/dt-ui/dt-ui-raty.js"></script>
		<script src="/plugin/swiper/js/swiper.min.js"></script>
		<script>
			$(function(){
				skyRaty(".sky-raty");
				var flash=new Swiper("#indexFlash");
				$(document).on("click","#searchBtn",function(){
					var keyword=$("#keyword").val();
					window.location="/module.php?m=b2b_search&keyword="+encodeURIComponent(keyword);
				})
			})
			
		</script>
		<?php wx_jssdk();?>
		<script type="text/javascript">
			wxshare_title="<?php echo $this->_var['seo']['title']; ?>";
			<?php if ($this->_var['site']['logo']): ?> 
			 wxshare_imgUrl="<?php echo $this->_var['site']['logo']; ?>.100x100.jpg";
			 <?php endif; ?>
		</script>
		 
	</body>
</html>
