mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
添加的文章回显问题修复
This commit is contained in:
parent
72653993c3
commit
99253b7972
@ -165,10 +165,14 @@ class ArticleCategory extends AuthController
|
||||
/**
|
||||
* 树形列表
|
||||
* @return mixed
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function getTreeList()
|
||||
{
|
||||
$list = $this->service->getTreeList();
|
||||
foreach ($list as &$item) {
|
||||
$item['disabled'] = !$item['status'] || $item['is_del'];
|
||||
}
|
||||
return app('json')->success($list);
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,9 +86,10 @@ class ArticleCategoryDao extends BaseDao
|
||||
* 添加修改选择上级分类列表
|
||||
* @param array $where
|
||||
* @return array
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function getMenus(array $where)
|
||||
{
|
||||
return $this->search($where)->order('sort desc,id desc')->column('title,pid,id');
|
||||
return $this->search($where)->order('sort desc,id desc')->column('title,pid,id,is_del,status');
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,10 +151,10 @@ class ArticleCategoryServices extends BaseServices
|
||||
/**
|
||||
* 树形列表
|
||||
* @return array
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function getTreeList()
|
||||
{
|
||||
$where['status'] = 1;
|
||||
return sort_list_tier($this->dao->getMenus($where));
|
||||
return sort_list_tier($this->dao->getMenus([]));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user