|
@@ -489,9 +489,14 @@ class CategoryMysqldb extends Service implements CategoryInterface
|
|
|
'parent_id' => $currentCategory['parent_id'],
|
|
|
];
|
|
|
if ($currentCategory['parent_id']) {
|
|
|
- $allParent = $this->getParentCategory($currentCategory['parent_id']);
|
|
|
- $allParent[] = $returnData['current'];
|
|
|
- $data = $this->getAllParentCate($allParent);
|
|
|
+ $allChild = $this->getChildCategory( $currentId);
|
|
|
+ if(is_array($allChild) && !empty($allChild)){
|
|
|
+ $data = $this->getAllParentCate($allChild);
|
|
|
+ }else{
|
|
|
+ $allParent[] = $returnData['current'];
|
|
|
+ $data = $this->getAllParentCate($allParent);
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
$data = $this->getOneLevelCateChild($returnData['current']);
|
|
|
}
|
|
@@ -592,6 +597,7 @@ class CategoryMysqldb extends Service implements CategoryInterface
|
|
|
'status' => $this->getCategoryEnableStatus(),
|
|
|
'menu_show' => $this->getCategoryMenuShowStatus(),
|
|
|
])->all();
|
|
|
+ print_r($category_id);
|
|
|
$arr = [];
|
|
|
if (is_array($data) && !empty($data)) {
|
|
|
foreach ($data as $one) {
|