From 465fad3969ccc4d889f5e1502c534f0922a13338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E5=BC=BA?= <357099073@qq.com> Date: Fri, 6 Jun 2025 11:26:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/controller/SearchController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/index/controller/SearchController.php b/app/index/controller/SearchController.php index 9c9e44f..3e9b0e1 100644 --- a/app/index/controller/SearchController.php +++ b/app/index/controller/SearchController.php @@ -13,7 +13,7 @@ class SearchController extends BaseController public function index() { $keyword = input('keyword', ''); - $type = input('type', 'articles'); // 搜索类型:article-文章,resource-资源 + $type = input('type', 'articles'); // 搜索类型:articles-文章,resources-资源 $page = input('page', 1); $limit = input('limit', 10); @@ -29,7 +29,7 @@ class SearchController extends BaseController $categoryUrl = '/index/articles/category'; $status = 2; // 文章状态为2 $fields = 'id, title, cate, image, author, FROM_UNIXTIME(create_time, "%Y-%m-%d") as publishdate'; - } else if ($type == 'resource') { + } else if ($type == 'resources') { $model = new Resources(); $categoryModel = new ResourcesCategory(); $detailUrl = '/index/resources/detail';