{#_theme}
<div class="banner swiper" style="height: 396px;" config-data="{'direction': 'left'}">
    <ul class="cycle-slideshow">
        {query:name=ad where=number eq 'qgiowmka-us4k-p0up-vs3c-blkqmtb7'} {set:$lists = unserialize($item['content']);} {list:items=$lists item=$ad}
        <li style="background-image:url({url:@$ad[path]}) ">
            <a href="{url:$ad[url]}" target="_blank"></a>
        </li>
        {/list} {/query}
    </ul>
</div>
<div class="container">
    <div class="sub-1">
        <div class="list">
        {if:isset($theme_indexFineShow) && $theme_indexFineShow==1}
        {if:isset($theme_indexFineIds) && $theme_indexFineIds!=''}
        {!$theme_indexFineIds=trim($theme_indexFineIds,',')}
       <ul class="row-5">
             <li class="col title">
                <fieldset class="line-title">
                    <legend align="center">精品推荐</legend>
                </fieldset>
            </li>
            <li >
                <div class="swiper" style="height: 340px;"  config-data='{"direction": "left","stay":"7000","navBar":"fixed"}'>
                    <ul class="cycle-slideshow">
                            {query:name=goods where= id in ($theme_indexFineIds) order=sort desc limit=10}
                            {if:$key%5==0}
                            <li>
                            <ul class="row">
                                {/if}

                                <li class="col-1">
                                    <div class="item top-border item-{!=$key%5}">
                                        <div class="header">
                                            <a href="{url:/index/product/id/$item[id]}"><img src="{echo:Common::thumb($item['img'],220,220)}" width=220></a>
                                        </div>
                                        <ul class="main">
                                            <li class="title"><a href="{url:/index/product/id/$item[id]}">{echo:TString::msubstr($item['name'],0,12)}</a></li>
                                            <li style="margin-top:5px;"><span class="price">{$currency_symbol}{$item['sell_price']}</span></li>
                                        </ul>
                                    </div>

                            {if:$key%5==4 || $key == count($items)-1}
                            </li>
                            </ul>
                            {/if}
                            {/query}
                        </li>

                </ul>
                </div>

            </li>

        </ul>
        {/if}
        {/if}
        {if:isset($theme_indexRecommend) && $theme_indexRecommend!=''}
        {!$theme_recommendInfo = explode("::",$theme_indexRecommend);}
        <div>
        <div class="row-5">
            <div class="col-5">
                <a href="{$theme_recommendInfo[1]}"><img src="{$theme_recommendInfo[0]}" alt="" width="1240"></a>
            </div>
        </div>
        </div>
        {/if}
            {if:isset($theme_flash_show) && $theme_flash_show!='0'}
            <ul class="row-5">
                <li class="col title">
                    <fieldset class="line-title">
                        <legend align="center">今日抢购</legend>
                    </fieldset>
                </li>
                {query:name=flash_sale as gb fields=*,gb.id as id join=left join goods as go on gb.goods_id eq go.id order=is_end , goods_num desc limit=5 id=$groupbuy}
                <li class="col-1">
                    <div class="item">
                        <div class="header">
                            <a href="{url:/index/flashbuy/id/$item[id]}"><img src="{echo:Common::thumb($item['img'],220,220);}" width=220></a>
                        </div>
                        <ul class="main">
                            <li class="title"><a href="{url:/index/flashbuy/id/$item[id]}">{echo:TString::msubstr($item['title'],0,15)}</a></li>
                            <li class="price"><i>{$currency_symbol}</i>{$item['price']}</li>
                        </ul>
                        <div class="footer">
                            <a href="{url:/index/flashbuy/id/$item[id]}" class="btn btn-default">立即购买</a>
                        </div>
                    </div>
                </li>
                {/query}
            </ul>
            {/if}
            {if:isset($theme_groupbuy_show) && $theme_groupbuy_show!='0'}
            <ul class="row-5">
                <li class="col title">
                    <fieldset class="line-title">
                        <legend align="center">今日团购</legend>
                    </fieldset>
                </li>
                {query:name=groupbuy as gb fields=*,gb.id as id join=left join goods as go on gb.goods_id eq go.id order=is_end , goods_num desc limit=5 id=$groupbuy}
                <li class="col-1">
                    <div class="item">
                        <div class="header">
                            <a href="{url:/index/groupbuy/id/$item[id]}"><img src="{echo:Common::thumb($item['img'],220,220);}" width=220></a>
                        </div>
                        <ul class="main">
                            <li class="title"><a href="{url:/index/groupbuy/id/$item[id]}">{echo:TString::msubstr($item['title'],0,15)}</a></li>
                            <li class="price"><i>{$currency_symbol}</i>{$item['price']}</li>
                        </ul>
                        <div class="footer">
                            <a href="{url:/index/groupbuy/id/$item[id]}" class="btn btn-default">立即购买</a>
                        </div>
                    </div>
                </li>
                {/query}
            </ul>
            {/if}
            {set:$cate_index=0;} {list:items=$category item=$categ} {if:$categ['list_show']==1} {set:$cate_index++;}
            <ul class="row-5 category-index">
                <li class="col title">
                    <fieldset class="line-title">
                        <legend align="center">{$categ['title']}</legend>
                    </fieldset>
                </li>
                <li class="col-1">

                        <div class="item category-nav" style="height: 662px;overflow: hidden;">
                            <div class="header" style="height: 500px;">
                                {if:$categ['imgs']} {set:$images = unserialize($categ['imgs']);} {list:items=$images item=$img}
                                <img src="{url:@$img[img]}" /> {/list} {/if}
                            </div>
                            <ul class="main category-list">
                                {list:items=$categ['child'] item=$child}
                                <li><a href="{url:/index/category/cid/$child[id]}">{$child['title']}</a></li>
                                {/list}
                            </ul>
                        </div>

                </li>
                <li class="col-4">
                    <ul class="row">
                        {set:$path_like = "like '$categ[path]%'";$layout=array(array(0=>true),array(2=>true));$current_layout=$layout[$cate_index%2];} {query:name=goods where= is_online eq 0 and category_id in (select id from tiny_goods_category where path $path_like) order=sort desc limit=7}
                        <li class="col-{if:isset($current_layout[$key])}2 {set:$w=420;}{else:}1{set:$w=220;}{/if}">
                            <div class="item">
                                <div class="header">
                                    <a href="{url:/index/product/id/$item[id]}"><img src="{echo:Common::thumb($item['img'],$w,$w);}" width=$w></a>
                                </div>
                                <ul class="main">
                                    <li class="title"><a href="{url:/index/product/id/$item[id]}">{$item['name']}</a></li>
                                    <li class="price">{$item['sell_price']}{$currency_unit}</li>
                                </ul>
                            </div>
                        </li>
                        {/list}
                    </ul>
                </li>
            </ul>
            {/if} {/list}
        </div>
    </div>
</div>
