{eyou:if condition='($route_param.tid == 38 && $areaid === 0)'} {eyou:php} //计算limit属性 $pagesize = 12; if(!empty($route_param['pa'])){ $curpage = $route_param['pa']; $start_li = $pagesize*($curpage-1); //开始位置 $end_li = $pagesize*$curpage; $limit_cat_value = $start_li.','.$pagesize; }else{ $curpage = 1; $limit_cat_value = '0,'.$pagesize; } {/eyou:php} {eyou:assign name='limit_cat' value="$limit_cat_value" /} {eyou:sql sql="SELECT id FROM __PREFIX__arctype WHERE $where order by update_time desc limit $limit_cat" cachetime='3600' id='res'} {eyou:foreach name='$res' item='cat'} {eyou:type typeid='$cat' empty='暂时没有数据' id='item'}
  • {$item.typename} {$item.typename} {$item.typename}
  • {/eyou:type} {/eyou:foreach} {/eyou:sql} {eyou:else /} {eyou:php} //计算limit属性 $pagesize = 12; if(!empty($route_param['pa'])){ $curpage = $route_param['pa']; $start_li = $pagesize*($curpage-1); //开始位置 $end_li = $pagesize*$curpage; $limit_cat_value = $start_li.','.$pagesize; }else{ $curpage = 1; $limit_cat_value = '0,'.$pagesize; } {/eyou:php} {eyou:assign name='limit_cat' value="$limit_cat_value" /} {eyou:sql sql="SELECT id FROM __PREFIX__arctype where $where1 order by add_time asc limit $limit_cat" cachetime='3600' id='res'} {eyou:foreach name='$res' item='cat'} {eyou:type typeid='$cat' empty='暂时没有数据' id='item'}
  • {$item.typename} {$item.typename} {$item.typename}
  • {/eyou:type} {/eyou:foreach} {/eyou:sql} {/eyou:if}