<!DOCTYPE html>
<html>
<head>
{template head}
</head>
<body>
	{template header}
			{template here}
			<div class="work-text">
			<div class="list-menu">
			  <ul>
				<li class="here-menu-2" style="width:50%;">{$com_cat_name} <i class="layui-icon" style="font-
size:1.5em;">&#xe61a;</i>
				<ul class="here-menu-list" id="comcat">
						<a href="{url_rewrite('list',array('comid'=>$comid,'order'=>$order,'keyword'=>urlencode($keyword)))}"{if (empty($catid))} class="fb fc3d"{/if}>不限</a>
						{loop $cats $val}
						<a style="float:left;width:50%;" href="{url_rewrite('list',array('comid'=>$comid,'catid'=>$val[catid],'order'=>$order,'keyword'=>urlencode($keyword)))}"{if ($catid==$val['catid'])} class="fb fc3d"{/if}>{$val['catname']}</a>
						{/loop}
					</ul>
				</li>
				<li class="here-menu-1" style="width:50%;">{$ordername[$order]} <i class="layui-icon" style="font-
size:1.5em;">&#xe61a;</i>
				<ul class="here-menu-list" id="orders">
						<a href="{url_rewrite('list',array('comid'=>$comid,'catid'=>$catid,'order'=>'new','keyword'=>urlencode($keyword)))}"{if ($order=='new')} class="fb fc3d"{/if}>最新发布</a>
						<a href="{url_rewrite('list',array('comid'=>$comid,'catid'=>$catid,'order'=>'hot','keyword'=>urlencode($keyword)))}"{if ($order=='hot')} class="fb fc3d"{/if}>人气最高</a>
					</ul>
				</li>
			  </ul>
				<div class="clear"></div>
			</div>
			<div class="top-list-box"></div>
			<div class="clear"></div>
				<section class="ac-container" id="list">
				</section>
		</div>
	</div>
{template footer}
<script>
layui.use(['flow','jquery'], function(){
  var $ = layui.jquery
  ,flow = layui.flow;
  flow.load({
    elem: '#list'
    ,isAuto: false
	,done: function(page, next){
    var lis = [];
	  $.getJSON('{$pager[url]}page='+page, function(res){
		layui.each(res.data, function(index,item){
			lis.push('<div><div class="art"><a href="' +
					item.url + '"><div class="ll" style="background:url({IMG_PATH}llbg.png) no-repeat 101% center;"><h1>' +	item.title + '</h1></div></a><div class="clear"> </div><div class="lt"><div class="layui-progress" style="margin-top:.3em;margin-left:.3em"><div class="layui-progress-bar layui-bg-blue" lay-percent="" style="width:' + item.mystat + '%;"></div></div></div><div class="rt">' + 
					item.utons + '</div><div class="clear"> </div><div class="tt"><a href="javascript:void(0);"><div class="titles">' +
					item.comname + '</div></a></div></div></div>');
        });
        next(lis.join(''), page < res.pages);   
      });
    }
  });
  //
	   $( "li.here-menu-1" ).click(function() {
		 $( "#orders" ).slideToggle( 300, function() {
			 });
			 $("#comcat").hide();
	   });
	   $( "li.here-menu-2" ).click(function() {
		 $( "#comcat" ).slideToggle( 300, function() {
			 });
			 $("#orders").hide();
	   });
  //
});
</script>
<script>
layui.use('element', function(){
  var element = layui.element();
});
</script>
</body>
</html>