index.html 2.0 KB
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <title>搜索页</title>
    <link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_859074_afg7uk9zst.css"/>
    <link href="__TMPL__/public/assets/css/init.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/search.css">
</head>
<body>
<div class="container">
    <div class="serach_box">
        <div class="search_item">
            <div class="iconfont icon-sousuo"></div>
            <div class="input_box">
                <input id="keyword" type="text" placeholder="输入搜索相关内容">
                <!--<div class="iconfont icon-cha"></div>-->
            </div>
        </div>
        <div class="search">搜索</div>
    </div>
    <div class="content_box">
        <div class="content_title_box">
            <div class="content_title">搜索历史</div>
            <div class="content_title_info">
                <!--<text class="iconfont icon-shanchu"></text>-->
                <text>清空历史</text>
            </div>
        </div>
        <div class="content_item">
        <volist name="keyword" id="vo" empty="暂无数据">
          <a href="{:url('portal/search/searchResult',['keyword'=>$vo.name])}">  <div class="lable_item">{$vo.name}</div></a>
        </volist>
        </div>
    </div>
</div>
<script type="text/javascript" src="__TMPL__/public/assets/js/fontsize.js"></script>
<script type="text/javascript" src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script>
<script>
    $(document).ready(function () {
        $('.search').click(function (res) {
            var keyword1=$('#keyword').val()
            console.log(keyword1);
            if (!keyword1){
                alert('请输入正确的关键词!');
                return;
            }
           window.location.href="{:url('portal/search/searchResult')}"+'?keyword='+keyword1;
        })
    })
</script>
</body>
</html>