{{include file=head.tpl}}
	<if condition="$data[type]=='1'">
	<foreach array="getalllist">
		<div class="biglist">
			<div class="sort">
				<a href="{{U(['cid'=>$row[cid]])}}">{{$row[name]}}</a>
			</div>
			<div class="list">
				<ul>
					<foreach array="row[article]" key="_key" value="_row">
					<li><a href="{{U(['aid'=>$_row[aid],'cid'=>$_row[cid]])}}">{{$_row[title]}}</a></li>
					</foreach>
				</ul>
			</div>
			<div class="list_more">
				<a href="{{U(['cid'=>$row[cid]])}}">更多{{$row[name]}}</a>
			</div>
		</div>
		<div class="c"></div>
	</foreach>
	</if>
	<if condition="$data[type]=='0'">
		<div class="biglist">
			<div class="sort">
					<a href="{{	U(['cid'=>$data[cid]],MODULE)}}">{{$data[name]}}</a>
			</div>
			<div class="list" id="list">
				<ul>
					<foreach array="getlist" key="_key" value="_row">
					<li><a href="{{U(['aid'=>$_row[aid],'cid'=>$_row[cid]])}}">{{$_row[title]}}</a></li>
					</foreach>
				</ul>
			</div>
		</div>
		<div class="c"></div>
		<script>
			layui.use('flow', function(){
				var flow = layui.flow;
				flow.load({
					elem: '#list ul'
					,done: function(page, next){	
						var lis = [];
						if(page > 1){
							$.get('?json=true&page='+page, function(res){
								
								layui.each(res.getlist, function(index, item){
									console.log(item);
									lis.push('<li><a href="'+item.url+'">'+item.title+'</a></li>');
								});
								next(lis.join(''), page < {{$page}});
							},'json');
						}
						next(lis.join(''), page < {{$page}});
					}
				});
			  
			});
		</script>
	</if>
{{include file=foot.tpl}}
