<!--{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">
    <a class="btn" href="#">
        <!-- <i class="iconfont icon-saomiao"></i>
         <p>扫描</p>-->
    </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=119">
        <i class="iconfont icon-fenlei1"></i>

    </a>
</header>
<div id="main" class="mui-clearfix" style="    padding-top: 60px;
    padding-bottom: 100px;">
    <!-- 搜索层 -->
    <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 $keydata 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="pension clearfloat">

            <!--{foreach $product as $key=>$value}-->
            <div class="list fl">
                <a href="<!--{$value.url}-->">
                    <img src="<!--{$value.uploadfiles}-->" width="150" height="150"/>
                    <p class="tit"><!--{$value.productname}--></p>
                    <p class="fu-tit">抢购价：<span>￥<!--{$value.oprice}--></span></p>
                </a>
            </div>
            <!--{/foreach}-->


        </div>




    </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");

                }
            });

        });
    </script>
    </html>
