mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-03 16:24:28 +08:00
初始化应用
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace app\index\controller;
|
||||
|
||||
use app\model\Post as ModelPost;
|
||||
use think\facade\View;
|
||||
use think\Request;
|
||||
|
||||
class Post extends Common
|
||||
@@ -52,23 +53,12 @@ class Post extends Common
|
||||
|
||||
$model_post = ModelPost::find($id);
|
||||
|
||||
$this->assign('post', $model_post);
|
||||
View::assign('post', $model_post);
|
||||
|
||||
return $this->fetch();
|
||||
return View::fetch();
|
||||
}
|
||||
|
||||
public function __documentsRead()
|
||||
{
|
||||
$category_id = $this->request->param('category_id',0);
|
||||
|
||||
$list_post = [];
|
||||
if(!empty($category_id)){
|
||||
$list_post = ModelPost::hasWhere('categorys',['category_id'=>$category_id])->order('sort desc')->select();
|
||||
}
|
||||
|
||||
$this->assign('list_post',$list_post);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示编辑资源表单页.
|
||||
|
||||
Reference in New Issue
Block a user