debug
This commit is contained in:
168
code/app/home/view/shikong/novel/getSearchIndex.html
Normal file
168
code/app/home/view/shikong/novel/getSearchIndex.html
Normal file
@@ -0,0 +1,168 @@
|
||||
{extend name="baseH5" /}
|
||||
{block name="title"}{site:replace code="NOVEL@GETSEARCHNOVEL@TITLE"}{/block}
|
||||
{block name="keywords"}{site:replace code="NOVEL@GETSEARCHNOVEL@KEYWORDS"}{/block}
|
||||
{block name="description"}{site:replace code="NOVEL@GETSEARCHNOVEL@DESCRIPTION"}{/block}
|
||||
|
||||
{block name="head"}
|
||||
<!-- 社交媒体标签 -->
|
||||
<meta property="og:title" content=‘{site:replace code="NOVEL@GETSEARCHNOVEL@TITLE"} />
|
||||
<meta property="og:description" content='{site:replace code="NOVEL@GETSEARCHNOVEL@DESCRIPTION"}' />
|
||||
<meta property="og:url" content="https://{$DomainModel->d_domain}{site:souurl key='$Request.get.keyword' p='1'/}" />
|
||||
<meta property="og:type" content="book" />
|
||||
<meta property="og:site_name" content="{$DomainModel->d_name}">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="{$Request.get.keyword} - {$DomainModel->d_name}搜索 - 第{$Request.get.intPage}页">
|
||||
<meta name="twitter:description" content="{$Request.get.keyword}搜索结果第{$Request.get.intPage}页,免费阅读小说,快来体验!">
|
||||
|
||||
<!-- 结构化数据 -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "SearchResultsPage",
|
||||
"url": "https://{$DomainModel->d_name}{site:souurl key='$Request.get.keyword' p='1'/}",
|
||||
"name": "{$DomainModel->d_name} - {$DomainModel->d_name}搜索 第{$Request.get.intPage}页",
|
||||
"description": "搜索‘{$Request.get.keyword}’结果第{$Request.get.intPage}页,提供{$Request.get.keyword}创作的小说免费阅读。",
|
||||
"datePublished": "{$arrNovel['n_update_time'] ?? time()}",
|
||||
"mainEntity": {
|
||||
"@type": "Book",
|
||||
"name": "{$DomainModel->d_name}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{$DomainModel->d_name}"
|
||||
},
|
||||
"url": "https://{$DomainModel->d_domain}"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
{block name='nav-active-class'}searchhome{/block}
|
||||
{block name="body-class"}novel_so novel_search_page{/block}
|
||||
|
||||
{block name="logo-html"}
|
||||
<h2 class="bookname">
|
||||
<a href="/" style="color:#ffffff">{$DomainModel->d_name}</a>
|
||||
</h2>
|
||||
{/block}
|
||||
|
||||
{block name="head-css"}
|
||||
<link rel="stylesheet" type="text/css" href="/template/shikong/css/search.css">
|
||||
{/block}
|
||||
|
||||
{block name="subcategory"}{/block}
|
||||
{block name="main"}
|
||||
|
||||
<div class="content-box">
|
||||
<div class="item-box">
|
||||
<div class="main-box">
|
||||
<div class="">
|
||||
<div class="search-home">
|
||||
<div class="search-form">
|
||||
<div class="search-content">
|
||||
<div class="input">
|
||||
<input type="text" name="keyword" :placeholder="{site:wz wz="使用+或者空格组合多个关键词" /}"
|
||||
id="search_input" onfocus="onfocusSearch()" oninput="oninputSearch()"
|
||||
onchange="onchangeSearch()">
|
||||
<div class="input-border">
|
||||
<div role="separator" class="van-divider van-divider--hairline"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button" onclick="search()">{site:wz wz="搜索" /}</div>
|
||||
</div>
|
||||
<div class="search-history-content" style="display: none">
|
||||
<div class="title">
|
||||
<div class="title-text">{site:wz wz="搜索历史" /}</div>
|
||||
<div class="delete-all-history" @click="handleDelAll">{site:wz wz="删除历史记录" /}</div>
|
||||
</div>
|
||||
<div class="text">
|
||||
<div class="history-text">{site:wz wz="搜索记录" /}</div>
|
||||
<i class="bi bi-trash3"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-tag-content">
|
||||
|
||||
|
||||
{novel:list count="8" sort_type="tuijian" d_key="key" d_val="Novel" cache_life="86400"}
|
||||
|
||||
<div class="search-tags">
|
||||
<div class="title"><i class="bi {eq name="key" value="0"}bi-fire {else/} bi-heart-fill{/eq}"></i>
|
||||
{$Novel.n_name}</div>
|
||||
<div class="tags tags-rect">
|
||||
<span class="badge badge-light badge-light-click" data-keyword="{$Novel.n_name}">{$Novel.n_author}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/novel:list}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var searchInputActive = false;
|
||||
var searchInputval = '';
|
||||
|
||||
|
||||
function onfocusSearch(e) {
|
||||
searchInputActive = true
|
||||
}
|
||||
|
||||
|
||||
function oninputSearch(e) {
|
||||
let dom = $('#search_input')
|
||||
searchInputval = dom.val()
|
||||
|
||||
}
|
||||
|
||||
|
||||
function onchangeSearch() {
|
||||
searchInputActive = false
|
||||
}
|
||||
|
||||
|
||||
$("#search_input").keydown(function (e) {
|
||||
|
||||
if (e.keyCode == 13) {
|
||||
|
||||
search()
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
$('.badge-light-click').click(function () {
|
||||
$keyword = $(this).data('keyword');
|
||||
$('#search_input').val($keyword)
|
||||
setTimeout(function () {
|
||||
search();
|
||||
}, 60)
|
||||
})
|
||||
|
||||
|
||||
function search(e) {
|
||||
let val = $('#search_input').val()
|
||||
if (!val) {
|
||||
new Noty({
|
||||
layout: 'topCenter',
|
||||
theme: 'bootstrap-v4',
|
||||
text: '关键词不能为空!',
|
||||
progressBar: false,
|
||||
timeout: 1000
|
||||
}).show().setType('alert');
|
||||
return
|
||||
}
|
||||
window.location.replace("{$strSearchIndexUrlTemp}" + `?keyword=${val}`)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
Reference in New Issue
Block a user