mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-06 01:52:48 +08:00
文章可设置类型用于不同而类型
This commit is contained in:
@@ -19,7 +19,7 @@ class Category extends Common
|
||||
{
|
||||
//
|
||||
|
||||
$list = ModelCategory::getListLevel();
|
||||
$list = ModelCategory::getListLevel('',$this->request->param('type',1));
|
||||
|
||||
if($this->request->isAjax()){
|
||||
return json_message($list);
|
||||
@@ -39,7 +39,7 @@ class Category extends Common
|
||||
{
|
||||
//
|
||||
|
||||
$list = ModelCategory::getListLevel();
|
||||
$list = ModelCategory::getListLevel('',$this->request->param('type',1));
|
||||
|
||||
View::assign('list_category',$list);
|
||||
|
||||
@@ -107,7 +107,7 @@ class Category extends Common
|
||||
|
||||
$model_category = ModelCategory::find($id);
|
||||
|
||||
$list = ModelCategory::getListLevel();
|
||||
$list = ModelCategory::getListLevel('',$this->request->param('type',1));
|
||||
|
||||
View::assign('list_category',$list);
|
||||
View::assign('category',$model_category);
|
||||
|
||||
@@ -23,7 +23,10 @@ class Post extends Common
|
||||
{
|
||||
//
|
||||
|
||||
$list = ModelPost::with(['categorys.category','tags.tag'])->order('id desc')->paginate();
|
||||
$list = ModelPost::with(['categorys.category','tags.tag'])
|
||||
->where('type',$this->request->param('type',1))
|
||||
->order('id desc')
|
||||
->paginate();
|
||||
|
||||
View::assign('list', $list);
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@ class Tag extends Common
|
||||
{
|
||||
//
|
||||
|
||||
$list_tag = ModelTag::order('id desc')->paginate();
|
||||
$list_tag = ModelTag::order('id desc')
|
||||
->where('type',$this->request->param('type',1))
|
||||
->paginate();
|
||||
|
||||
if($this->request->isAjax()){
|
||||
return json_message($list_tag);
|
||||
|
||||
Reference in New Issue
Block a user