mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-16 22:34:17 +00:00
文章列表页报错
This commit is contained in:
parent
4fe22856c2
commit
0f4de27051
@ -34,12 +34,18 @@ class Article extends AuthController
|
|||||||
$where['merchant'] = 0;//区分是管理员添加的图文显示 0 还是 商户添加的图文显示 1
|
$where['merchant'] = 0;//区分是管理员添加的图文显示 0 还是 商户添加的图文显示 1
|
||||||
$catlist = ArticleCategoryModel::where('is_del',0)->select()->toArray();
|
$catlist = ArticleCategoryModel::where('is_del',0)->select()->toArray();
|
||||||
//获取分类列表
|
//获取分类列表
|
||||||
|
if($catlist){
|
||||||
$tree = Phptree::makeTreeForHtml($catlist);
|
$tree = Phptree::makeTreeForHtml($catlist);
|
||||||
$this->assign(compact('tree'));
|
$this->assign(compact('tree'));
|
||||||
if($pid){
|
if($pid){
|
||||||
$pids = Util::getChildrenPid($tree,$pid);
|
$pids = Util::getChildrenPid($tree,$pid);
|
||||||
$where['cid'] = ltrim($pid.$pids);
|
$where['cid'] = ltrim($pid.$pids);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
$tree = [];
|
||||||
|
$this->assign(compact('tree'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->assign('cate',ArticleCategoryModel::getTierList());
|
$this->assign('cate',ArticleCategoryModel::getTierList());
|
||||||
$this->assign(ArticleModel::getAll($where));
|
$this->assign(ArticleModel::getAll($where));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user