<div id="searchhtml" class="none">
|
<!-- 头部 -->
|
<div class="wap_search_header">
|
<div class="wap_search_header_c">
|
<div class="wap_search_headerqx" onclick="searchhtmlhide()"> </div>
|
<form method="get" action="{yun:}$config_wapdomain{/yun}/index.php">
|
<input type="hidden" id="type" name="c" value="{yun:}if $smarty.get.c{/yun}{yun:}$smarty.get.c{/yun}{yun:}else{/yun}job{yun:}/if{/yun}"/>
|
<div class="wap_search_text">
|
<input type="text" value="" onkeyup="this.value = this.value.replace(/[,]/g,'');" id="input_search" name="keyword" class="" placeholder="请输入{yun:}if $smarty.get.c=='job' || !$smarty.get.c{/yun}职位名/公司名{yun:}elseif $smarty.get.c=='resume'{/yun}关键字{yun:}/if{/yun}">
|
|
</div><div class="wap_search_hbth"><input type="submit" value="搜索" class=""></div>
|
</form>
|
|
</div>
|
</div>
|
<!-- 主体 -->
|
<div class="Search_jobs_body">
|
<div class="search_history_tit">
|
<span class=" ">历史搜索</span>
|
<span class="search_history_qc" style="display:none" id="clearhistory"></span>
|
</div>
|
<div class="" id="historylist">
|
<div class="search_history_no">
|
暂无搜索记录~
|
</div>
|
</div>
|
</div>
|
<div class="Search_jobs_body">
|
<div class="search_history_tit">热门搜索</div>
|
<div class="search_history_tag_box">
|
|
{yun:}if $smarty.get.c=='job' || !$smarty.get.c{/yun}
|
{yun:}key limit=12 recom=1 type=3 iswap=1 item=keylist{/yun}
|
<a href="{yun:}$keylist.url{/yun}" class="search_history_tag">{yun:}$keylist.key_name{/yun}</a>
|
{yun:}/key{/yun}
|
{yun:}elseif $smarty.get.c=='resume'{/yun}
|
{yun:}key limit=12 recom=1 type=5 iswap=1 item=key{/yun}
|
<a href="{yun:}$key.url{/yun}" class="search_history_tag">{yun:}$key.key_name{/yun}</a>
|
{yun:}/key{/yun}
|
{yun:}/if{/yun}
|
</div>
|
</div>
|
</div>
|
<script>
|
function clearhis(type) {
|
$.post("index.php?c=search&a=del", {
|
type: type
|
}, function (data) {
|
if (data) {
|
showToast("历史已清除!", 2, function () {
|
window.location.href = data;
|
})
|
return false;
|
} else {
|
showToast("操作失败!");
|
return false;
|
}
|
});
|
}
|
|
function searchhtmlhide() {
|
$("#searchhtml").addClass('none');
|
$("#app").removeClass('none');
|
}
|
|
$(document).ready(function () {
|
$(".searchnew").on('click', function () {
|
setTimeout(function () {
|
$("#app").addClass('none');
|
$("#searchhtml").removeClass('none');
|
}, 400);
|
})
|
var type = $("#type").val();
|
$.post("index.php?c=search&a=history", {
|
type: type
|
}, function (data) {
|
|
if (data) {
|
var data = eval('(' + data + ')');
|
|
if (data.hisid) {
|
$("#clearhistory").html("<a href='javascript:void(0);' onclick=\"clearhis('" + data.hisid + "')\">清除历史</a>");
|
$("#clearhistory").show();
|
}
|
if (data.list) {
|
var html = '';
|
$.each(data.list, function () {
|
html += "<div class=\"search_history_tag\"> <a href=\"" + this.url + "\">" + this.key_name + "</a></div>";
|
});
|
$("#historylist").html(html);
|
}
|
}
|
});
|
});
|
</script>
|