<!--{include file="<!--{$mpath}-->block_header.tpl"}-->
<!--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">
    <div class="top-sch-box flex-col">
        <div class="centerflex">
            <i class="fdj iconfont icon-sousuo"></i>
            <div class="sch-txt">搜索品牌、商品</div>
        </div>
    </div>

</header>
<div id="main" class="mui-clearfix" style="padding-top: 52px; padding-bottom: 238px;">
    <!-- 搜索层 -->
    <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="contaniner clearfloat">
        <aside class="assort">
            <ul>
                <a href="?c=product&cid=2">
                    <!--{if <!--{$cid}-->==2}-->
                         <li class='active' >
                             <!--{else}-->
                        <li>
                    <!--{/if}-->
                    <span>全部</span>
                </li>
                </a>
                <!--{assign var='productcategory' value=vo_category("type={treecat} rootid={<!--{$rootid}-->}")}-->
                <!--{foreach $productcategory as  $key=>$parent}-->
                <a href="<!--{$parent.url}-->">
                    <!--{if <!--{$cid}-->==<!--{$parent.catid}-->}-->
                    <li class='active' >
                        <!--{else}-->
                    <li>
                        <!--{/if}-->
                        <span><!--{$parent.catname}--></span>
                    </li>
                </a>
                <!--{/foreach}-->


            </ul>
        </aside>

        <section class="assort-cont clearfloat">
            <div class="sideMenu clearfloat">

                <div class="slist clearfloat box-s">
                    <!--{if empty($product)}-->
                    <h3>没有符合条件的信息</h3>
                    <!--{else}-->
                    <!--{foreach $product as $ky=>$volist}-->
                    <div class="list clearfloat fl">
                        <a href="<!--{$volist.url}-->">
                            <img src="<!--{$volist.uploadfiles}-->"/>
                            <p class="tit"><!--{$volist.productname}--></p>
                            <p>￥<!--{$volist.oprice}-->元</p>
                        </a>
                    </div>

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

                </div>
                <div style="margin-left: 15%;">
                    <!--{$showpage}-->
                </div>



            </div>
        </section>
    </div>
</div>
<!--{include file="<!--{$mpath}-->block_button.tpl"}-->
<script type="text/javascript">
    jQuery(".sideMenu").slide({
        titCell:"h3",
        targetCell:".slist",
        effect:"slideDown",
        delayTime:300 ,
        triggerTime:150,
        defaultPlay:true,
        returnDefault:false,
        trigger:"click"
    });
    $(".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");

            }
        });

    });
</script>
</html>