find.html 4.7 KB
<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>搜索</title>
    <meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/swiper.min.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/common/search.css">
    <script src="__TMPL__/public/assets/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="__TMPL__/public/assets/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="__TMPL__/public/assets/js/base.js" type="text/javascript" charset="utf-8"></script>
    <style>
        .con_warp {
            margin-top: 0.3rem;
        }
    </style>
</head>

<body>
<div class="container">
    <div class="search_search_box">
        <div class="search_input_box">
            <input class="search_search_input" type="text" placeholder="专业电动医疗轮椅" value="{$Request.param.find}">
        </div>
        <img class="search_search_icon" src="__TMPL__/public/assets/images/search.png" alt="">
    </div>
    <div class="search_hitory">
            <p class="final_search">
            </p>
            <div class="search_history_list_box" >
                <volist name="history" id="history">
                <p class="search_history_list">{$history.keyword}</p>
                </volist>
            </div>

    </div>
    <div class="con_warp">
        <ul class="con_list">
            <volist name="vehicle" id="vehicle">
                <li class="con_list_li">
                    <div class="con_list_img_box">
                        <img class="con_list_img" src="{:cmf_get_image_url($vehicle.pic)}" alt="">
                    </div>
                    <div class="goods_box">
                        <p class="goods_title">{$vehicle.name}</p>
                        <span class="goods_content">{$vehicle.name}</span>
                        <p class="goods_money">¥{$vehicle.money}/天</p>
                    </div>
                </li>
            </volist>



            <!--<li class="con_list_li">-->
                <!--<div class="con_list_img_box">-->
                    <!--<img class="con_list_img" src="__TMPL__/public/assets/images/5653ceba1a219@2x.png" alt="">-->
                <!--</div>-->
                <!--<div class="goods_box">-->
                    <!--<p class="goods_title">HO56C手动轮椅车</p>-->
                    <!--<span class="goods_content">体积更小轻松放入汽车后备箱</span>-->
                                <!--<p class="goods_money">$2000.00</p>-->
                <!--</div>-->
            <!--</li>-->

            <!--<li class="con_list_li">-->
                <!--<div class="con_list_img_box">-->
                    <!--<img class="con_list_img" src="__TMPL__/public/assets/images/14994082982514idfz7@2x.png" alt="">-->
                <!--</div>-->
                <!--<div class="goods_box">-->
                    <!--<p class="goods_title">HO56C手动轮椅车</p>-->
                    <!--<span class="goods_content">体积更小轻松放入汽车后备箱</span>-->
                                <!--<p class="goods_money">$2000.00</p>-->
                <!--</div>-->
            <!--</li>-->
        </ul>
    </div>
</div>
<script>
    $('.search_history_list_box').css('display','none');
    $('.con_warp').css('display','none');
    $(document).ready(function() {
        var type = "{$type}";
        if(type == 1){
            // 相关搜索
            $('.final_search').text('最近搜索');
            $('.search_history_list_box').css('display','block');
            $('.con_warp').css('display','none');
        }else if(type == 2){
            // 搜索结果
            $('.final_search').text('相关商品');
            $('.search_history_list_box').css('display','none');
            $('.con_warp').css('display','block');
        }
    })

    // 搜索跳页
    $('.search_search_icon').on('click', function() {
        var find = $('.search_search_input').val();
        var type = "{$Request.param.type}";
        var url = "{:url('Rent/find')}";
        url = url.split('.');
        url = url[0] + '/type/' + type + '/find/' + find + ".html";
        window.location.href = url;
    })

    // 最近搜索
    $('.search_history_list').click(function () {
        var text  = $(this).text();
        $('.search_search_input').val(text);
        var type = "{$Request.param.type}";
        var url = "{:url('Rent/find')}";
        url = url.split('.');
        url = url[0] + '/type/' + type + '/find/' + text + ".html";
        window.location.href = url;
    })
</script>
</body>

</html>