提交 d9b594e0 编写于 作者: T Terry

分类页面,侧栏子分类只显示status为enable的分类

上级 458f4694
......@@ -387,6 +387,7 @@ class CategoryMongodb extends Service implements CategoryInterface
$cate = $this->_categoryModel->find()->asArray()->where([
'parent_id' => $_id,
'status' => $this->getCategoryEnableStatus(),
'menu_show' => $this->getCategoryMenuShowStatus(),
])->all();
if (is_array($cate) && !empty($cate)) {
foreach ($cate as $one) {
......@@ -416,6 +417,7 @@ class CategoryMongodb extends Service implements CategoryInterface
$cate = $this->_categoryModel->find()->asArray()->where([
'parent_id' => $parent_id,
'status' => $this->getCategoryEnableStatus(),
'menu_show' => $this->getCategoryMenuShowStatus(),
])->all();
//var_dump($cate);
//echo '$$$$$$$$$$';
......@@ -456,6 +458,7 @@ class CategoryMongodb extends Service implements CategoryInterface
$data = $this->_categoryModel->find()->asArray()->where([
'parent_id' => $category_id,
'status' => $this->getCategoryEnableStatus(),
'menu_show' => $this->getCategoryMenuShowStatus(),
])->all();
$arr = [];
if (is_array($data) && !empty($data)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册