{include file="public/mall_top" /}
{include file="public/mall_header" /}
<style type="text/css">
    .nc-appbar-tabs a.compare { display: none !important;}
</style>
<div class="nch-container wrapper">
    <div class="nch-all-menu">
        <ul class="tab-bar">
            <li class="current"><a href="javascript:void(0);">全部分类</a></li>
            <li><a href="{:url('/Home/Brand/index')}">全部品牌</a></li>
            <li><a href="{:url('/Home/Search/index')}">全部商品</a></li>
        </ul>
    </div>
    <div class="nch-category-all">
        <?php if(!empty($header_categories) && is_array($header_categories)){?>
        <ul class="nch-category-container" id="categoryList">
            <?php foreach($header_categories as $key=>$gc_list){?>
            <li class="classes">
                <div class="title"><i></i>
                    <a href="{:url('/Home/Search/index',['cate_id'=>$gc_list.gc_id])}"><?php echo $gc_list['gc_name'];?></a>
                </div>
                <?php if (!empty($gc_list['class2'])) {?>
                <?php foreach ($gc_list['class2'] as $gc_list2) {?>
                <dl>
                    <dt><a href="{:url('/Home/Search/index',['cate_id'=>$gc_list2.gc_id])}"><?php echo $gc_list2['gc_name'];?></a></dt>
                    <dd>
                        <?php if(!empty($gc_list2['class3'])){?>
                        <?php foreach($gc_list2['class3'] as $key=>$gc_list3){?>
                        <a href="{:url('/Home/Search/index',['cate_id'=>$gc_list3.gc_id])}"><?php echo $gc_list3['gc_name'];?></a>
                        <?php }?>
                        <?php }?>
                    </dd>
                </dl>
                <?php }?>
                <?php }?>
            </li>
            <?php }?>
        </ul>
        <?php }?>
    </div>
</div>
<script>
    $(function () {
        $("#categoryList").imagesLoaded(function () {
            $("#categoryList").masonry({
                itemSelector: '.classes'
            });
        });
    });
</script> 
{include file="public/mall_server" /}
{include file="public/mall_footer" /}