<!DOCTYPE html>
<html>
<?php echo $this->fetch('head.html'); ?>
 
<body>
<div class="header">
	<div url="/module.php?m=fenlei" class="header-back"></div>
	<div class="header-title">分类信息详情</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">
	<?php if ($this->_var['imgsdata']): ?>
	<style>
		.imgWidth {
		    width: 100%;
		}
		
	</style>
	<div class="scale-swiper-box">
		<div class="swiper-container scale-swiper-container" id="indexFlash">
			<div class="swiper-wrapper js-thumb-item" >
				<?php $_from = $this->_var['imgsdata']; 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 scale-swiper-slide ">
					<div class="js-thumb scale-swiper-bgimg" v="<?php echo images_site($this->_var['c']); ?>"  style="background-image: url(<?php echo $this->_var['c']; ?>);"   src="<?php echo $this->_var['c']; ?>" ></div>
				</div>
				<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</div>
			 
			<div class="swiper-pagination"></div>
		 
		</div>
	</div>
	<?php elseif ($this->_var['data']['imgurl']): ?>
	<div>
		<img class="d-img" src="<?php echo $this->_var['data']['imgurl']; ?>" />
	</div>
	<?php endif; ?>
	<div class="row-box mgb-5">
		
		<div class="block mgb-5">
			<?php if ($this->_var['data']['hb_on']): ?>
			<div class="bc-red">红</div>
			<?php endif; ?>
			<?php echo $this->_var['data']['title']; ?>
		</div>
	</div>	
	<div class="row-box mgb-5">	
		<div class="flex mgb-10">
			<div class="flex-1 flex">
				<div class="flex flex-ai-center flex-1 cl2  f12"><div class="iconfont icon-time"></div><?php echo $this->_var['data']['timeago']; ?></div>
				<div class="flex  cl2  mgr-10 iconfont icon-attention"><?php echo $this->_var['data']['view_num']; ?></div>
			</div>
			 
			
		</div>
		<div class="flex bd-mp-10">
			<?php if ($this->_var['cat']['type_open'] && $this->_var['data']['typeid']): ?>
			<div class="flex-1">
				<div class="mgb-10 cl2"><?php echo $this->_var['cat']['typeLabel']; ?></div>
				<div class="cl1"><?php echo $this->_var['data']['typeid_name']; ?></div>
			</div>
			<?php endif; ?>
			<?php if ($this->_var['cat']['money_open']): ?>
			<div class="flex-1">
				<div class="mgb-10 cl2"><?php echo $this->_var['cat']['moneyLabel']; ?></div>
				<div class="cl-money">￥<?php echo $this->_var['data']['money']; ?></div>
			</div>
			<?php endif; ?>
			<?php if ($this->_var['cat']['area_open']): ?>
			<div class="flex-1">
				<div class="mgb-10 cl2">所在区域</div>
				<div class="cl1"><?php echo $this->_var['data']['sc_id_name']; ?></div>
			</div>
			<?php endif; ?>
		</div>
		<div class="d-content"><?php echo $this->_var['data']['description']; ?></div>
		
	</div>
	<!--扩展属性-->
	<?php if ($this->_var['fieldsList']): ?>
	<div class="row-box mgb-5">
		<?php $_from = $this->_var['fieldsList']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
		<?php if ($this->_var['c']['fieldtype'] == 'text'): ?>
		<div class="flex bd-mp-10 flex-ai-center">
			<div class="w100"><?php echo $this->_var['c']['title']; ?></div>
			<div class="flex-1"><?php echo $this->_var['c']['value']; ?></div>					
		</div>
		<?php elseif ($this->_var['c']['fieldtype'] == 'textarea'): ?>
		<div class="flex bd-mp-10 flex-ai-center">
			<div class="w100"><?php echo $this->_var['c']['title']; ?></div>
			<div class="flex-1">
				<?php echo $this->_var['c']['value']; ?>
			</div>					
		</div>
		<?php elseif ($this->_var['c']['fieldtype'] == 'html'): ?>
		<div class="flex bd-mp-10 flex-ai-center">
			<div class="w100"><?php echo $this->_var['c']['title']; ?></div>
			<div class="flex-1 d-content">
				<?php echo $this->_var['c']['value']; ?>
			</div>					
		</div>
		<?php elseif ($this->_var['c']['fieldtype'] == 'img'): ?>
		<div class="flex bd-mp-10 flex-ai-center">
			<div class="w100"><?php echo $this->_var['c']['title']; ?></div>
			<div class="flex-1">
				<img src="<?php echo $this->_var['c']['value']; ?>" class="wmax" />
			</div>					
		</div>
		<?php elseif ($this->_var['c']['fieldtype'] == 'map'): ?>
		<div class="flex bd-mp-10 flex-ai-center">
			<div class="w100"><?php echo $this->_var['c']['title']; ?></div>
			<div class="flex-1 flex">
				<img  src="http://api.map.baidu.com/staticimage/v2?ak=<?php echo BDMAPKEY; ?>&mcode=666666&center=<?php echo $this->_var['c']['value']; ?>&markers=<?php echo $this->_var['c']['value']; ?>&width=300&height=200&zoom=11 " class="wmax"  />
			</div>					
		</div>
		<?php endif; ?>
		<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
	</div>
	<?php endif; ?>
	<?php if ($this->_var['com']['typeid'] == 1): ?>
	<div class="row-box mgb-5">
		<div class="flex">
			<img src="<?php echo $this->_var['com']['imgurl']; ?>.100x100.jpg" class="wh-60 mgr-10"/> 
			<div class="flex-1">
				<div class="mgb-5 cl2"><?php echo $this->_var['com']['title']; ?></div>
				<div class="cl3 flex"><i class="iconfont icon-location_light"></i><?php echo $this->_var['com']['address']; ?></div>
			</div>
		</div>
	</div>
	<?php endif; ?>
	<?php if ($this->_var['data']['hb_on']): ?>
	<div class="row-box mgb-5">
		<div class="flex pdb-5 bdb mgb-5 bg-fff  flex-ai-center">
			<div class="f16">任务红包</div>
			<div class="flex-1"></div>
			<div class="cl2">总额：</div>
			<div class="cl-money mgr-5 f14"><?php echo $this->_var['data']['hb_money']; ?>元</div>
			<div class="cl2">共<?php echo $this->_var['data']['hb_num']; ?>个</div>
		</div>
		
		<div>
			<?php $_from = $this->_var['hbList']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
			<div class="flex mgb-5 flex-ai-center">
				<img src="<?php echo $this->_var['c']['user']['user_head']; ?>.100x100.jpg" class="wh-40 bd-radius-5 mgr-5" />
				<div class="flex-1 cl2"><?php echo $this->_var['c']['user']['nickname']; ?></div>
				<div class="cl-money">￥<?php echo $this->_var['c']['money']; ?></div>
				
			</div>
			<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
		</div>
	</div>
	<?php endif; ?>
	<?php if ($this->_var['recList']): ?>
	<div class="sglist">
		<div class="pd-5 bdb pdt-10 bg-fff f16">推荐信息</div>
		<?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=fenlei&a=show&id=<?php echo $this->_var['c']['id']; ?>" class="flexlist-item">
			<?php if ($this->_var['c']['imgurl']): ?>
			<img class="flexlist-img" src="<?php echo $this->_var['c']['imgurl']; ?>.100x100.jpg" />
			<?php endif; ?>
				 <div class="flex-1">
					<div class="flexlist-title"><?php echo $this->_var['c']['title']; ?></div>
						<div class="flexlist-row">
							<div class="cl-money">￥<?php echo $this->_var['c']['money']; ?></div>
						</div>
					  <div class="flexlist-desc">
						  <?php echo $this->_var['c']['description']; ?>
					  </div>
				</div>
		</a>
		<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
	</div> 
	<?php endif; ?> 
	 
	
</div>
<?php if ($this->_var['comment_open']): ?>
<div class="flex flex-ai-center row-box mgb-10">
	 <div class="footer-item icon-share js-share-btn">分享</div>
	 <div class="btn-fav flex-col js-fav-toggle bd-0 <?php if ($this->_var['isfav']): ?>btn-fav-active<?php endif; ?> mgr-10" tablename="mod_fenlei" objectid="<?php echo $this->_var['data']['id']; ?>">收藏</div>
	 <?php if ($this->_var['userid'] && $this->_var['userid'] != $this->_var['data']['userid']): ?>
	 <div gourl="/module.php?m=fenlei_guest&a=user&id=<?php echo $this->_var['data']['id']; ?>" class="footer-item icon-service_light">咨询</div>
	 <?php endif; ?>
	 <?php if ($this->_var['data']['telephone']): ?>
	 <a href="tel:<?php echo $this->_var['data']['telephone']; ?>" class="footer-item icon-phone">电话</a>
	 <?php endif; ?>
 </div>
<div class="main-body">
			<?php echo $this->fetch('inc/comment.html'); ?>
		</div>
<?php else: ?>
<div class="footer-row"></div>
 <div class="footer">
	 <div class="footer-item icon-share js-share-btn">分享</div>
	 <div class="btn-fav flex-col js-fav-toggle bd-0 <?php if ($this->_var['isfav']): ?>btn-fav-active<?php endif; ?> mgr-10" tablename="mod_fenlei" objectid="<?php echo $this->_var['data']['id']; ?>">收藏</div>
	 <?php if ($this->_var['userid'] && $this->_var['userid'] != $this->_var['data']['userid']): ?>
	 <div gourl="/module.php?m=fenlei_guest&a=user&id=<?php echo $this->_var['data']['id']; ?>" class="footer-item icon-service_light">咨询</div>
	 <?php endif; ?>
	 <?php if ($this->_var['data']['telephone']): ?>
	 <a href="tel:<?php echo $this->_var['data']['telephone']; ?>" class="footer-item icon-phone">电话</a>
	 <?php endif; ?>
 </div>
<?php endif; ?>


 <div class="wx-share-guide">
	 <img src="/static/images/wx_guide.png" class="wx-share-guide-img" />
 </div>
<?php echo $this->fetch('footer.html'); ?>
<?php if ($this->_var['comment_open']): ?>
<script src="<?php echo $this->_var['skins']; ?>inc/comment.js?<?php echo JS_VERSION; ?>"></script>
<?php endif; ?>
<?php echo $this->fetch('inc/js_thumb.html'); ?>
<style>
	.wx-share-guide{
		position: fixed;
		right: 0;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: 999;
		background-color: #333;
		opacity: .8;
		text-align: right;
		display: none;
	}
	.wx-share-guide-img{
		position: absolute;
		right: 0;
		top: 10px;
		width: 200px;
	}
	.iconfont:before{
		margin-right: 3px;
	}
	.swiper-pagination{
		display: block;
	}
</style>
<script src="/plugin/swiper/js/swiper.min.js"></script>
<script>
	$(function(){
		var flash=new Swiper("#indexFlash",{
					loop: true,
					pagination: {
					  el: '.swiper-pagination'
					},
		});
		$(document).on("click",".js-share-btn",function(){
			$(".wx-share-guide").show();
		})
		$(document).on("click",".wx-share-guide",function(){
			$(".wx-share-guide").hide();
		})
	})
	
</script>
<?php wx_jssdk();?>
		<script type="text/javascript">
			wxshare_link="<?php echo $this->_var['shareLink']; ?>";
			wxshare_title="<?php echo $this->_var['data']['title']; ?>";
			<?php if ($this->_var['data']['imgurl']): ?> 
			 wxshare_imgUrl="<?php echo images_site($this->_var['data']['imgurl']); ?>.100x100.jpg";
			 <?php endif; ?>
		</script>
</body>
</html>