<!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">
			<div class="header-title"><?php echo $this->_var['site']['sitename']; ?></div>
		</div>
		<div class="header-title"></div>
		<div class="topBox">
			<?php if (empty ( $this->_var['team'] )): ?>
			<div class="topBox-main">
				<div class="flex mgb-10">
					<div class="topBox-title cl-white"></div>
					<div gourl="/module.php?m=s2c_team" class="row-box-more cl-white">选择团长</div>
				</div>
				 
			</div>
			<?php else: ?>
			<div class="topBox-main">
				<div class="flex mgb-10">
					<div class="topBox-title cl-white"><?php echo $this->_var['team']['title']; ?></div>
					<div gourl="/module.php?m=s2c_team" class="row-box-more cl-white">切换</div>
				</div>
				<div class="cl-white f12"><?php echo $this->_var['team']['address']; ?></div>
			</div>
			<div class="topBox-head">
				<div>
					<img src="<?php echo $this->_var['team']['userhead']; ?>.100x100.jpg" class="topBox-head-img">
				</div>
				<div class="topBox-head-nick"><?php echo $this->_var['team']['nickname']; ?></div>
			</div>
			<?php endif; ?>
		</div>
		<?php if ($this->_var['flashList']): ?>
		<div class="swiper-box">
			<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 mgr-10">
						<img class="wmax bd-radius-10" src="<?php echo $this->_var['c']['imgurl']; ?>" />
					</div>
					<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
				</div>

				<div class="swiper-pagination flex flex-jc-center"></div>

			</div>
		</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="main-body">

			<div class="noticeBox">
				<i class="iconfont icon-home mgr-5"></i>
				<div class="flex-1 flex flex-wrap">
					<div class="cl-fc f12">招募团长，一社区一团长，</div>
					<div class="cl-fc f12">咨询：15985840591</div>
				</div>
			</div>
			<div class="tsBox">
				<div class="tsBox-line-a"></div>
				<div class="tsBox-line-b"></div>
				<div class="tsBox-bd">
					<div class="tsBox-title">正在抢购</div>
					<div class="tsBox-desc mgb-5">当日下单 次日可到</div>
					
				</div>
			</div>
			 
			<?php if ($this->_var['sendTime']['out'] == 2): ?>
			<div class="cl-warning pd-5 mgb-5 text-center f12">超过<?php echo $this->_var['sendTime']['out_time']; ?>点 &nbsp;<?php echo $this->_var['sendTime']['sendTime']; ?>配送</div>
			<?php endif; ?> 
			<div id="app" style="display: none;" :style="'display:block'" v-if="pageLoad">
				<div id="catNav" class="catNav">
					<div class="swiper-wrapper">
						<div @click="setCat(0)" v-bind:class="catActive" class="swiper-slide catNav-swiper-slide">推荐</div>
						<div @click="setCat(item.catid)" v-bind:class="item.catid==catid?'catNav-swiper-slide-active':''" class="swiper-slide catNav-swiper-slide" v-for="(item,index) in pageData.catList" :key="index">{{item.title}}</div>
						 
						<div class="bar">
							<div class="color"></div>
						</div>
					</div>
				</div>
				<div class="catNav-fixed-show"></div>
				
				<div class="flexlist">
					<div class="flexlist-item" v-for="(item,index) in pageData.list" :key="index">
						<img @click="goProduct(item.id)" class="flexlist-img pointer bd-radius-5" :src="item.imgurl" />
						<div class="flex-1">
							<div @click="goProduct(item.id)" class="flexlist-title pointer">{{item.title}}</div>
							<div class="flex mgb-5">
								<div class="cl-money">￥{{item.price}}</div> 
								 
							 
								<div class="flex-1"></div>
								<div v-if="item.isksid>0">
									<div @click="ksBox(item.id)" class="btn-small btn-outline-success">选规格</div>
								</div>
								<div class="pdb-5" v-else>
									
									<div v-if="item.incart" class="numbox prolist-numbox">
										<div @click="minusCart(item.id,item.cart_amount)" class="numbox-minus">-</div>
										<input type="text" name="amount" :value="item.cart_amount" class="numbox-num" />
										<div @click="plusCart(item.id,item.cart_amount)" class="numbox-plus">+</div>	
									</div>
									<div @click="addCart(item.id)"  class="btn-buy iconfont icon-cart" v-else></div>
								</div>
						</div>
						</div>
					</div>
				</div>
				<div     v-if="ksShow">
					<div class="modal-mask" @click="ksHide"></div>
					<div class="modal">
						<div class="modal-header">
							<div class="modal-title">选择款式</div>
							<div class="modal-close icon-close" @click="ksHide"></div>
						</div>
						<div class="modal-body pdt-10">	
							<div class="ksBox mgb-10">
								<div class="kslist mgb-10">
									<div class="kslist-label">{{ksproduct.ks_label_name}}</div>
									<div @click="ks1(item.id)" v-bind:class="{'kslist-active':item.id==ksid1}" class="kslist-item" v-for="(item,index) in ksList" :key="index">{{item.title}}</div>
								</div>
								<div class="kslist">
									<div class="kslist-label">{{ksproduct.ks_label_size}}</div>
									<div class="kslist-item" @click="ks2(item.id)"  v-bind:class="{'kslist-active':item.id==ksid}" v-for="(item,index) in ksList2" :key="index">{{item.size}}</div>
								</div>
							</div>
							<div class="flex">
								<div class="cl2 mgr-10 mgl-10">价格</div>
								<div class="cl-money">￥{{ksproduct.price}}</div>
								<div class="flex-1"></div>
								<div v-if="ksproduct.incart" class="numbox prolist-numbox">
									<div @click="ksMinusCart(ksproduct.id,ksproduct.cart_amount)" class="numbox-minus">-</div>
									<input type="text" name="amount" :value="ksproduct.cart_amount" class="numbox-num" />
									<div @click="ksPlusCart(ksproduct.id,ksproduct.cart_amount)" class="numbox-plus">+</div>	
								</div>
								<div @click="ksAddCart(ksproduct.id)"  class="btn-buy" v-else>买</div>
							</div>
						</div>
					</div>
				</div>
			</div> 
		</div>
		<div class="flex-center pd-10">
			<a class="f12 cl3" href="http://www.beian.miit.gov.cn"><?php echo $this->_var['site']['icp']; ?></a>
		</div>  
		<?php echo $this->fetch('ftnav.html'); ?>
		<?php echo $this->fetch('footer.html'); ?>
		<script src="/plugin/swiper/js/swiper.min.js"></script>
	 
		
		<script>
			$(function() {
				var flash = new Swiper("#indexFlash", {
					pagination: {
						el: '.swiper-pagination',
					}
				});
				
			})
		</script>
		<script src="<?php echo $this->_var['skins']; ?>index.js"></script>
		<?php wx_jssdk()?>
	</body>
</html>
