52 lines
2.2 KiB
HTML
Executable File
52 lines
2.2 KiB
HTML
Executable File
<extend name="Base/common" />
|
|
<block name="body">
|
|
<div class="container">
|
|
<form action="#" method="get" class="search-form">
|
|
<input name="word" type="text" placeholder="单行输入" name="word" value="{$search_title}">
|
|
<button type="submit">搜索</button>
|
|
</form>
|
|
<!-- <php>if($show_keywords===1):</php>
|
|
<div class="hot-search-keyword">
|
|
<div class="field">热门搜索:</div>
|
|
<div class="key-word">
|
|
<volist name="keyword" id="vo">
|
|
<a href="{:U('/home/News/index',['keywords_id'=>$vo['id']])}">{$vo.name}</a>
|
|
</volist>
|
|
</div>
|
|
</div>
|
|
<php>endif;</php> -->
|
|
<php>if(I('get.word')||I('get.author')):</php>
|
|
<div class="search-result">
|
|
<div class="count-box">共 <span>{$count}</span> 条相关结果</div>
|
|
<div class="search-result-list">
|
|
<volist name="res" id="vo">
|
|
<a href="{$vo.url}" class="search-result-list-item">
|
|
<p class="title text-limit2" data-highlight="true">{$vo.title}</p>
|
|
<div class="bottom-box">
|
|
<p class="source" data-highlight="true">{$vo.author}</p>
|
|
<p class="date">{:date('Y-m-d',$vo['in_date'])}</p>
|
|
</div>
|
|
</a>
|
|
</volist>
|
|
</div>
|
|
<div class="show-more-data">
|
|
<a href="javascript:;" class="more-handle">点击显示更多内容</a>
|
|
<div class="loading"><i class="icon-loading"></i><span>加载中</span></div>
|
|
</div>
|
|
</div>
|
|
<php>endif;</php>
|
|
</div>
|
|
</block>
|
|
<block name="script">
|
|
<script>
|
|
$(function () {
|
|
var newsList = loadMore('.search-result-list', "{:U('')}",{word:'{$search_title}'});
|
|
addSpanSearch('{$search_title}','.search-result-list','s-text-orange');
|
|
$('.search-result-list+.show-more-data > .more-handle').click(function () {
|
|
newsList(function () {
|
|
addSpanSearch('{$search_title}','.search-result-list','s-text-orange');
|
|
});
|
|
})
|
|
})
|
|
</script>
|
|
</block> |