mirror of https://github.com/1099438829/apeblog
更改母驴规则
This commit is contained in:
parent
469e711f28
commit
deacf4b4b0
|
|
@ -61,7 +61,7 @@ class Article extends Base
|
|||
$this->urlRecord($dc['title']);
|
||||
}
|
||||
//读取列表页模板
|
||||
$template = Data::DOCUMENT_CATEGORY . '/' . ($dc['template'] ?: 'list_default.html');
|
||||
$template = Data::DOCUMENT_CATEGORY . '/' . ($dc['template'] ?: 'index.html');
|
||||
$templateFile = config('view.view_path') . $template;
|
||||
if (!is_file($templateFile)) {
|
||||
$this->error('模板文件不存在!');
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Page extends Base
|
|||
* @author 木子的忧伤
|
||||
* @date 2021-10-29 0:17
|
||||
*/
|
||||
public function detail()
|
||||
public function index()
|
||||
{
|
||||
$id = input('id');
|
||||
if (!$id) {
|
||||
|
|
@ -49,7 +49,7 @@ class Page extends Base
|
|||
$article['position'] = '<a href="/">首页</a><span>></span>';
|
||||
//更新浏览次数
|
||||
$documentModel->where('id', $article['id'])->inc('view')->update();
|
||||
$template = Data::DOCUMENT_TYPE_PAGE . '/' . ($article['theme'] ?: 'detail.html');
|
||||
$template = Data::DOCUMENT_TYPE_PAGE . '/' . ($article['theme'] ?: 'index.html');
|
||||
$templateFile = config('view.view_path') . $template;
|
||||
if (!is_file($templateFile)) {
|
||||
$this->error('模板文件不存在!');
|
||||
|
|
|
|||
Loading…
Reference in New Issue