<!DOCTYPE html>
<html>
	<?php echo $this->fetch('head.html'); ?>

	<body>
		<div class="none" :class="'flex-col'" id="App">
			<div class="header">
				<div class="header-back pos-relative"></div>
				<div class="header-search-box">

					<input v-model="keyword" class="header-search pdl-5" placeholder="<?php echo $this->_var['cat']['title']; ?>" type="text">
					<div @click="keyword='';search()" v-if="keyword!=''"
						class="header-search-close iconfont icon-close"></div>
					<div @click="search" class="header-search-btn bg-primary cl-white iconfont icon-search"></div>
				</div>
			</div>
			<div class="header-row"></div>
			<a href="/module.php?m=fenlei&a=add&catid=<?php echo $this->_var['cat']['catid']; ?>" class="fixedAdd">发布</a>
			<div class="main-body">
				<div class="pos-relative">
						<div class="tab-select">
							<div class="tab-select-item" id="tab-scarea">
								<div class="tab-select-label">{{sc_title}}</div>
								<div class="tab-select-t3down "></div>
							</div>
							<div v-if="cat.type_open" class="tab-select-item" id="tab-type">
								<div class="tab-select-label">{{type_title}}</div>
								<div class="tab-select-t3down "></div>	
							</div>
							<div v-if="cat.money_open"  class="tab-select-item" id="tab-sprice">
								<div class="tab-select-label">{{sprice_title}}</div>
								<div class="tab-select-t3down "></div>	
							</div>
						</div>
				
						<div id="scarea-box" class="tab-select-box">
							<div @click="setArea(0,'所在区域')" class="tab-select-box-item" v="">所在区域</div>
				
							<div @click="setArea(item.sc_id,item.title)" v-for="(item,index) in scList" :key="index"
								class="tab-select-box-item">{{item.title}}</div>
				
						</div>
						<div  v-if="cat.type_open"  id="type-box" class="tab-select-box">
							<a class="tab-select-box-item" @click="setType(0,'类型')" >选择类型</a>
							<a class="tab-select-box-item" @click="setType(index,item)" v-for="(item,index) in typeList" :key="index">{{item}}</a>
							
						</div>
						<div v-if="cat.money_open"  id="sprice-box" class="tab-select-box">
							<a class="tab-select-box-item"  @click="setPrice('价格区间',0)" >价格区间</a>
							<a class="tab-select-box-item"  @click="setPrice(item,1)" v-for="(item,index) in priceList" :key="index">{{item}}</a>
						</div>
					</div>
					<div class="tabs-toggle-group">
						<div @click="goDetail(item.id)" v-for="(item,index) in list" :key="index" class="flexlist-item pointer">			 
							<img v-if="item.imgurl!=''" class="flexlist-img" :src="item.imgurl+'.100x100.jpg'" />
							 <div class="flex-1">
								<div class="flex mgb-5">
									<div v-if="item.hb_on" class="bc-red mgr-5">红</div>
									<div class="f14">{{item.title}}</div>
								</div>
								 
									 
									<div v-if="item.money>0" class="flexlist-row">
										<div class="cl-money">￥{{item.money}}</div>
									</div>
								 
								  <div class="flexlist-desc">
									  {{item.description}}
								  </div>
							</div>
				
						</div>
					</div>
					<div class="loadMore" v-if="per_page>0" @click="getList()">加载更多</div>
				</div>
				
			</div>
		</div>
		<?php echo $this->fetch('footer.html'); ?>
		<script>
			var catid = "<?php echo $this->_var['cat']['catid']; ?>";

			$(document).on("click", ".tab-select-item", function() {
				var index = $(this).index();
				console.log(index);
				$(".tab-select-box:eq(" + index + ")").toggle();
				$(".tab-select-box:eq(" + index + ")").siblings(".tab-select-box").hide();
			})
		</script>
		<script src="<?php echo $this->_var['skins']; ?>fenlei/list.js?v3"></script>

	</body>
</html>
