更新1
This commit is contained in:
parent
9097c77c41
commit
465fad3969
@ -13,7 +13,7 @@ class SearchController extends BaseController
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$keyword = input('keyword', '');
|
$keyword = input('keyword', '');
|
||||||
$type = input('type', 'articles'); // 搜索类型:article-文章,resource-资源
|
$type = input('type', 'articles'); // 搜索类型:articles-文章,resources-资源
|
||||||
$page = input('page', 1);
|
$page = input('page', 1);
|
||||||
$limit = input('limit', 10);
|
$limit = input('limit', 10);
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ class SearchController extends BaseController
|
|||||||
$categoryUrl = '/index/articles/category';
|
$categoryUrl = '/index/articles/category';
|
||||||
$status = 2; // 文章状态为2
|
$status = 2; // 文章状态为2
|
||||||
$fields = 'id, title, cate, image, author, FROM_UNIXTIME(create_time, "%Y-%m-%d") as publishdate';
|
$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();
|
$model = new Resources();
|
||||||
$categoryModel = new ResourcesCategory();
|
$categoryModel = new ResourcesCategory();
|
||||||
$detailUrl = '/index/resources/detail';
|
$detailUrl = '/index/resources/detail';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user