<!--{include file="<!--{$mpath}-->block_header.tpl"}-->
<style>
    .nav-wrap
    {
        position: relative;
        overflow: hidden;
    }
     .nav-wrap .nav-display {
        position: absolute;
        right: 0;
        top: 0;
        width: .68rem;
        height: .55rem;
        line-height: .55rem;
        background-color: #f2f2f2;
        box-shadow: -15px 0 15px 0 #f2f2f2;
        z-index: 99;
    }
    .nav {
        overflow-x: auto;
        background: #f2f2f2;
        font-size: .30rem;
        white-space: nowrap;
        z-index: 2;
        height: 35px;
    }
    .nav .nav-item {
        display: inline-block;
        padding: 6px 0.3rem;
    }
    .nav .nav-item span{
        display: inline-block;
        line-height: .55rem;
        border-bottom: 2px solid rgba(237,91,0,0);
    }
</style>
<!--loading页开始-->
<div class="loading">
    <div class="loader">
        <div class="loader-inner pacman">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
</div>
<!--loading页结束-->
<body>
<header class="mui-bar mui-bar-nav" id="header">
    <a class="btn" href="<!--{$config.siteurl}-->">
        <img src="favicon.ico" width="30" height="30"/>
    </a>
    <div class="top-sch-box flex-col">
        <div class="centerflex">
            <i class="fdj iconfont icon-sousuo"></i>
            <div class="sch-txt">搜索品牌、商品</div>
        </div>
    </div>
    <a class="btn" href="index.php?c=product&cid=2">
        <i class="iconfont icon-fenlei1"></i>

    </a>
</header>
<div style="    position: fixed;
    right: 0;
    left: 0;
    margin-top: -32px;
    height: 1.44rem;
    border-bottom: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    box-shadow: 0 1px 1px #ccc;
    -webkit-box-shadow: 0 1px 1px #ccc;">
<div data-v-0677858e="" class="nav-wrap" style="margin-top: 53px;">
    <div data-v-0677858e="" class="nav-display">
        <i data-v-0677858e="" class="image-icons icon-arrow-down"></i>
    </div>

    <div data-v-0677858e="" class="nav">
        <!--{assign var='productcategory' value=vo_category("type={treecat} rootid={2} num={5}")}-->
        <!--{foreach $productcategory as $key => $value}-->
        <div data-v-0677858e="" class="nav-item">
            <span class="qie" catid="<!--{$value.catid}-->" data-v-0677858e="" style="color: rgb(116, 116, 116); border-color: rgb(242, 242, 242);"><!--{$value.catname|mb_substr:0:8:'utf8'}--></span>
        </div>
        <!--{/foreach}-->
        <div data-v-0677858e="" class="nav-item-extra"></div>
    </div>
</div>
</div>
<div id="main" class="mui-clearfix" style="padding-bottom: 100px; margin-top: 30px;">
    <!-- 搜索层 -->
    <div class="pop-schwrap">
        <div class="ui-scrollview">
            <div class="mui-bar mui-bar-nav clone">
                <a class="btn btn-back" href="javascript:;"></a>
                <div class="top-sch-box flex-col">
                    <div class="centerflex">
                        <input class="sch-input mui-input-clear" type="text" name="keyword" id="keyword" placeholder="搜索商品" />
                    </div>
                </div>
                <a class="mui-btn mui-btn-primary sch-submit search" href="javascript:void(0)">搜索</a>
            </div>
            <div class="scroll-wrap">
                <div class="mui-scroll">
                    <div class="sch-cont">
                        <div class="section">
                            <div class="tit"><i class="iconfont icon-time"></i>最近搜索</div>
                            <div class="tags">
                                <!--{foreach $data as $key=>$value}-->
                                <a href="index.php?c=search&content=<!--{$value.keyword}-->" style="color:#969696;"><span class="tag"><!--{$value.keyword}--></span></a>
                                <!--{/foreach}-->
                            </div>
                        </div>
                    </div>
                    <div class="sch-clear">
                        <a href="javascript:void"><i class="iconfont icon-shanchu del">清除搜索历史</i></a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="mui-content">
        <div class="banner swiper-container">
            <div class="swiper-wrapper">
                <!--{assign var='indexzone' value=get_zone('index_slide_banner')}-->
                <!--{foreach $indexzone.ads as $key=>$item}-->
                <div class="swiper-slide"><a href="<!--{$item.url}-->"><img class="swiper-lazy" data-src="<!--{$item.uploadfiles}-->" alt="" style="height: 201.94px;"></a></div>

                <!--{/foreach}-->


            </div>
            <div class="swiper-pagination"></div>
        </div>
        <div class="mui-top clearfloat">
          <!--{assign var='productcategory' value=vo_category("type={treecat} rootid={2} num={4}")}-->
            <!--{foreach $productcategory as $key => $value}-->
                <div class="list fl">
                    <a href="<!--{$value.url}-->">
                        <img src="<!--{$mpath}-->upload/index-icon<!--{$key}-->.jpg"/>
                        <p class="tit"><!--{$value.catname|mb_substr:0:8:'utf8'}--></p>
                    </a>
                </div>
            <!--{/foreach}-->
            <div class="list fl">
                <a href="index.php?c=integral&cid=126">
                    <img src="<!--{$mpath}-->upload/index-icon4.jpg"/>
                    <p class="tit">积分商城</p>
                </a>
            </div>
            <div class="list fl">
                <a href="index.php?c=user&a=share">
                    <img src="<!--{$mpath}-->upload/index-icon6.jpg"/>
                    <p class="tit">分享赚钱</p>
                </a>
            </div>

            <div class="list fl">
                <a href="index.php?c=user&a=shopping">
                    <img src="<!--{$mpath}-->upload/index-icon5.jpg"/>
                    <p class="tit">购物车</p>
                </a>
            </div>
            <div class="list fl">
                <a href="index.php?c=user&a=feedback">
                    <img src="<!--{$mpath}-->upload/index-icon7.jpg"/>
                    <p class="tit">在线反馈</p>
                </a>
            </div>
        </div>

        <div class="news clearfloat">
            <div class="left fl clearfloat">
                <img src="<!--{$mpath}-->img/rmen.png"/>
            </div>
            <div class="right fl clearfloat box-s">
                <div class="slider autoplay">
                    <!--{assign var='newnews' value=vo_list("mod={article} num={20}")}-->
                    <!--{foreach $newnews as $volist}-->
                   <div><a href="<!--{$volist.url}-->"><!--{$volist.title}--></a></div>
                    <!--{/foreach}-->
                </div>
            </div>
        </div>


        <!--{assign var='productcategory' value=vo_category("type={treecat} rootid={2} num={5}")}-->
        <!--{foreach $productcategory as $key=>$parent}-->
        <div class="health clearfloat" id="qie<!--{$parent.catid}-->">
            <div class="htop clearfloat">
                <!--{$key+1}-->F <!--{$parent.catname}-->
            </div>
        </div>
        <div class="pension clearfloat">
            <!--{assign var='product' value=vo_list("mod={product}  where={v.catid=<!--{$parent.catid}-->} ")}-->
            <!--{foreach $product as $k=>$v}-->
            <div class="list fl">
                <a href="<!--{$v.url}-->">
                    <img src="<!--{$v.uploadfiles}-->" width="150" height="150"/>
                    <p class="tit"><!--{$v.productname}--></p>
                    <p class="fu-tit">抢购价：<span>￥<!--{$v.oprice}--></span></p>
                </a>
            </div>
            <!--{/foreach}-->


        </div>
        <!--{/foreach}-->





    </div>
<!--{include file="<!--{$mpath}-->block_button.tpl"}-->
<!--新闻资讯滚动-->
<script type="text/javascript">
    $('.autoplay').slick({
        slidesToShow: 1,
        slidesToScroll: 1,
        autoplay: true,
        autoplaySpeed: 2000,
    });
</script>
<!--商品图片滚动-->
<script type="text/javascript">
    $('.filtering').slick({
        slidesToShow: 3,
        slidesToScroll: 1
    });
    $(".search").bind("click", function(){ //提交
        var keyword = $("#keyword").val();
        if(keyword==''){
            layer.open({
                content: '搜索内容为空'
                ,skin: 'msg'
                ,time: 2 //2秒后自动关闭
            });
            return false;
        }
        window.location.href = 'index.php?c=search&content='+keyword+'&res=1';
    });
    $('.del').click(function(e){
        //询问框
        var id =$(this).attr("addressid");
        layer.open({
            content: '您确定清除全部搜索记录么？'
            ,btn: ['确定', '不要']
            ,yes: function(index){
                $.post("<!--{$urlpath}-->index.php?c=search&a=delkeyword", {
                    id:id,
                }, function (data) {
                    if (data.response == '1') {
                        layer.open({
                            content: data.result
                            ,skin: 'msg'
                            ,time: 2 //2秒后自动关闭
                        });
                        setTimeout( function(){
                            location.reload();
                            layer.close(index);
                        }, 1 * 1000 );//延迟5000毫米
                    } else {
                        layer.open({
                            content: data.result
                            ,skin: 'msg'
                            ,time: 2 //2秒后自动关闭
                        });
                    }
                }, "json");

            }
        });

    });
    $(".qie").bind("click", function(){ //提交
            var id = $(this).attr('catid');
            window.location.hash = "#qie"+id;
           $('.qie').css('color','rgb(116, 116, 116)');
           $('.qie').css('border-color','rgb(242, 242, 242)');
           $(this).css('color','rgb(237, 91, 0)');
           $(this).css('border-color','rgb(237, 91, 91)');
    });
</script>
</html>
