优化搜索
This commit is contained in:
parent
465fad3969
commit
b5ac7e8f32
49
app/index/view/common/error.php
Normal file
49
app/index/view/common/error.php
Normal file
@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>错误提示</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<link rel="stylesheet" href="/static/layui/css/layui.css">
|
||||
<style>
|
||||
.error-container {
|
||||
text-align: center;
|
||||
padding: 50px 20px;
|
||||
}
|
||||
.error-icon {
|
||||
font-size: 48px;
|
||||
color: #FF5722;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.error-message {
|
||||
font-size: 18px;
|
||||
color: #666;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.back-btn {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="error-container">
|
||||
<div class="error-icon">
|
||||
<i class="layui-icon layui-icon-face-cry"></i>
|
||||
</div>
|
||||
<div class="error-message">
|
||||
<?php echo $msg; ?>
|
||||
</div>
|
||||
<div class="back-btn">
|
||||
<a href="javascript:history.back();" class="layui-btn layui-btn-primary">返回上一页</a>
|
||||
<a href="/" class="layui-btn">返回首页</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/layui/layui.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -156,8 +156,8 @@ $loginStatus = [
|
||||
<div class="search-container">
|
||||
<div class="search-box">
|
||||
<select id="searchType" class="search-type">
|
||||
<option value="article">文章</option>
|
||||
<option value="resource">资源</option>
|
||||
<option value="articles">文章</option>
|
||||
<option value="resources">资源</option>
|
||||
</select>
|
||||
<input type="text" id="searchInput" placeholder="请输入搜索关键词">
|
||||
<button id="searchBtn">搜索</button>
|
||||
|
||||
@ -77,8 +77,8 @@ $loginStatus = [
|
||||
<div class="search-container">
|
||||
<div class="search-box">
|
||||
<select id="searchType" class="search-type">
|
||||
<option value="article">文章</option>
|
||||
<option value="resource">资源</option>
|
||||
<option value="articles">文章</option>
|
||||
<option value="resources">资源</option>
|
||||
</select>
|
||||
<input type="text" id="searchInput" placeholder="请输入搜索关键词">
|
||||
<button class="search-btn" id="searchBtn">搜索</button>
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
{if $items}
|
||||
{volist name="items" id="item"}
|
||||
<div class="layui-col-md12">
|
||||
<div class="search-result-item" onclick="window.location.href='<?php echo $type == 'article' ? url('article/detail', ['id' => $item['id']]) : $item['detail_url'] ?>'">
|
||||
<div class="search-result-item" onclick="window.location.href='<?php echo $type == 'articles' ? url('articles/detail', ['id' => $item['id']]) : $item['detail_url'] ?>'">
|
||||
<div class="search-result-image">
|
||||
<?php if($type == 'article'): ?>
|
||||
<img src="<?php echo $item['image'] ?: '/static/images/default.jpg' ?>" alt="<?php echo $item['title'] ?>">
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?php /*a:5:{s:63:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\articles\detail.php";i:1748423296;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\head.php";i:1747617129;s:71:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\header-simple.php";i:1749174451;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\footer.php";i:1749170849;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\foot.php";i:1747616844;}*/ ?>
|
||||
<?php /*a:5:{s:63:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\articles\detail.php";i:1748423296;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\head.php";i:1747617129;s:71:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\header-simple.php";i:1749181062;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\footer.php";i:1749170849;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\foot.php";i:1747616844;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
@ -176,8 +176,8 @@ $loginStatus = [
|
||||
<div class="search-container">
|
||||
<div class="search-box">
|
||||
<select id="searchType" class="search-type">
|
||||
<option value="article">文章</option>
|
||||
<option value="resource">资源</option>
|
||||
<option value="articles">文章</option>
|
||||
<option value="resources">资源</option>
|
||||
</select>
|
||||
<input type="text" id="searchInput" placeholder="请输入搜索关键词">
|
||||
<button id="searchBtn">搜索</button>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?php /*a:4:{s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\index\index.php";i:1746865108;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\header.php";i:1749178268;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\main.php";i:1749172174;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\footer.php";i:1749170849;}*/ ?>
|
||||
<?php /*a:4:{s:59:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\index\index.php";i:1746865108;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\header.php";i:1749181124;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\main.php";i:1749172174;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\footer.php";i:1749170849;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
@ -95,8 +95,8 @@ $loginStatus = [
|
||||
<div class="search-container">
|
||||
<div class="search-box">
|
||||
<select id="searchType" class="search-type">
|
||||
<option value="article">文章</option>
|
||||
<option value="resource">资源</option>
|
||||
<option value="articles">文章</option>
|
||||
<option value="resources">资源</option>
|
||||
</select>
|
||||
<input type="text" id="searchInput" placeholder="请输入搜索关键词">
|
||||
<button class="search-btn" id="searchBtn">搜索</button>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?php /*a:5:{s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\program\detail.php";i:1748423318;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\head.php";i:1747617129;s:71:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\header-simple.php";i:1749174451;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\footer.php";i:1749170849;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\foot.php";i:1747616844;}*/ ?>
|
||||
<?php /*a:5:{s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\program\detail.php";i:1748423318;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\head.php";i:1747617129;s:71:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\header-simple.php";i:1749181062;s:64:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\footer.php";i:1749170849;s:62:"E:\Demos\DemoOwns\PHP\yunzer\app\index\view\component\foot.php";i:1747616844;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
@ -176,8 +176,8 @@ $loginStatus = [
|
||||
<div class="search-container">
|
||||
<div class="search-box">
|
||||
<select id="searchType" class="search-type">
|
||||
<option value="article">文章</option>
|
||||
<option value="resource">资源</option>
|
||||
<option value="articles">文章</option>
|
||||
<option value="resources">资源</option>
|
||||
</select>
|
||||
<input type="text" id="searchInput" placeholder="请输入搜索关键词">
|
||||
<button id="searchBtn">搜索</button>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user