mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-04 00:24:29 +08:00
优化页面标题seo
This commit is contained in:
@@ -56,7 +56,7 @@ class Index extends Common
|
||||
|
||||
$model_sub_category = Category::find($sub_category_id);
|
||||
|
||||
$page_title .= "|{$model_sub_category->title}";
|
||||
$page_title .= "-{$model_sub_category->title}";
|
||||
$model_post = Post::hasWhere('categorys', ['category_id' => $sub_category_id])->where('status', 1)->order('id desc');
|
||||
}
|
||||
} else {
|
||||
@@ -71,12 +71,12 @@ class Index extends Common
|
||||
if (!empty($keywords)) {
|
||||
$model_post->whereLike('title|desc|content', "%$keywords%");
|
||||
|
||||
$page_title .= "|{$keywords}";
|
||||
$page_title .= "-{$keywords}";
|
||||
}
|
||||
|
||||
$page = $this->request->param('page', 1);
|
||||
|
||||
$page_title .= "|第{$page}页";
|
||||
$page_title .= "-第{$page}页";
|
||||
|
||||
$list_post = $model_post->paginate([
|
||||
'url' => 'Index/index',
|
||||
|
||||
Reference in New Issue
Block a user