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

<body>
<div class="header">
	<div class="header-back"></div>
	<div class="header-title">我的发布</div>
</div>
<div class="header-row"></div>
<div class="main-body">
  <?php $_from = $this->_var['list']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
  <div class="bg-white pd-10 mgb-5">
	  <div gourl="/module.php?m=fenlei&a=show&id=<?php echo $this->_var['c']['id']; ?>" class="c1 f16 mgb-5"><?php echo $this->_var['c']['title']; ?></div>
	  <div class=" mgb-5 flex">
	  		  <div class="flex-1 cl2"> <?php if ($this->_var['c']['status'] == 1): ?>已上线<?php else: ?>未上线<?php endif; ?></div>
	  		  <div class=" flex">
				  <div class="cl2"><?php if ($this->_var['c']['ispay'] == 1): ?>已支付<?php else: ?>未支付<?php endif; ?>  支付金额</div>
					<div class="cl-money">￥<?php echo $this->_var['c']['paymoney']; ?></div>
			   </div>
	  </div>
	  
	  
	  <div class="cl2 mgb-5">
		  <?php echo $this->_var['c']['description']; ?>
	  </div>
	  <div class="mgb-10 flex">
		  <div class="flex-1 cl-money"> <?php echo $this->_var['c']['money']; ?>元</div>
		  <div>查看 <?php echo $this->_var['c']['view_num']; ?>次</div>
	  </div>
	  <div class="flex flex-jc-center">
		  <?php if (! $this->_var['c']['ispay']): ?>
		  <div gourl="/module.php?m=fenlei&a=pay&id=<?php echo $this->_var['c']['id']; ?>" class="btn-mini js-pageHide mgr-5">去支付</div>
		  <?php endif; ?>
		 <div class="mgr-5 btn-mini js-update" data-id="<?php echo $this->_var['c']['id']; ?>">更新</div>
		  <div class="mgr-5 btn-mini js-ding-cat" data-id="<?php echo $this->_var['c']['id']; ?>">置顶分类</div>
		  <div class="mgr-5 btn-mini js-ding-index" data-id="<?php echo $this->_var['c']['id']; ?>">置顶首页</div>
		 <div gourl="/module.php?m=fenlei&a=add&id=<?php echo $this->_var['c']['id']; ?>" class="btn-mini js-pageHide">编辑</div>
	  </div>
  </div>
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
<div><?php echo $this->_var['pagelist']; ?></div>
  
</div>
<?php echo $this->fetch('ftnav.html'); ?>
<?php echo $this->fetch('footer.html'); ?>
<script>
	$(function(){
		$(document).on("click",".js-update",function(){
			var id=$(this).attr("data-id");
			$.get("/module.php?m=fenlei&a=updatetime&ajax=1&id="+id,function(res){
				skyToast(res.message);
			},"json")
		})
		
		$(document).on("click",".js-ding-cat",function(){
			var id=$(this).attr("data-id");
			$.get("/module.php?m=fenlei&a=dingcat&ajax=1&id="+id,function(res){
				skyToast(res.message);
				if(!res.error){
					window.location=res.data.payurl;
				}
			},"json")
		})
		
		$(document).on("click",".js-ding-index",function(){
			var id=$(this).attr("data-id");
			$.get("/module.php?m=fenlei&a=dingindex&ajax=1&id="+id,function(res){
				skyToast(res.message);
				if(!res.error){
					window.location=res.data.payurl;
				}
			},"json")
		})
	})
</script>
</body>
</html>