{extend name="$base" /} {block name="resources"} {/block} {block name="main"} {php} $goods_category_list = api('System.Goods.goodsCategoryList'); $goods_category_list = $goods_category_list['data']; //是否显示简称 $category_use = $show_type['is_use']; // 模板类型 $category_template = $show_type['template']; // 模板样式 $category_style = $show_type['style']; // 分类图显示 $category_is_img = $show_type['is_img']; // Class 样式 $more_list_class = $category_template == 3 ? 'more-list' : ''; $none_img_class = $category_is_img == 0 ? 'none-img' : ''; {/php} {notempty name='$goods_category_list'}

{foreach name="goods_category_list" item="vo" key='index'}
- {if condition = "$category_use == 0"} {$vo.category_name} {else/} {$vo.short_name} {/if}
  {if condition='$category_template gt 1'}
  {notempty name="$vo['child_list']"} {foreach name="$vo['child_list']" item="vo1"}
  - {if condition='$category_template eq 2'} {if condition='$category_is_img eq 1'}
    {/if} {$vo1.category_name} {/if} {if condition='$category_template eq 3'}
    {if condition = "$category_use == 0"} {$vo1.category_name} {else/} {$vo1.short_name} {/if}
    {notempty name="$vo1['child_list']"}
    {foreach name="$vo1['child_list']" item="vo2"}
    - {if condition='$category_is_img eq 1'}
      {notempty name="$vo2.category_pic"} {else/} {/notempty}
      {/if} {if condition = "$category_use == 0"} {$vo2.category_name} {else/} {$vo2.short_name} {/if}
    {/foreach}
    {/notempty} {/if}
  {/foreach} {else/}

  没有找到商品分类…

  {/notempty}
  {/if}
{/foreach}

{if condition='$category_template eq 1'}
{/if}
{else/}
暂无商品分类
{/notempty} {if condition="$category_template == 1"}
{/if}
{/block}