|
...
|
...
|
@@ -897,15 +897,7 @@ class BTemplateLogic extends BaseLogic |
|
|
|
* @time :2023/12/20 10:26
|
|
|
|
*/
|
|
|
|
public function getCategoryList($categoryModel,$status = 0,$filed = ['*']){
|
|
|
|
$data = array();
|
|
|
|
$list = $categoryModel->list(['pid'=>0,'status'=>$status],['sort','id'],$filed);
|
|
|
|
foreach ($list as $v){
|
|
|
|
$data[] = $v;
|
|
|
|
$son_list = $categoryModel->list(['pid'=>$v['id'],'status'=>$status],['sort','id'],$filed);
|
|
|
|
foreach ($son_list as $v1){
|
|
|
|
$data[] = $v1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$data = $categoryModel->list(['status'=>$status],['sort','id'],$filed);
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -917,15 +909,7 @@ class BTemplateLogic extends BaseLogic |
|
|
|
* @time :2023/12/20 10:26
|
|
|
|
*/
|
|
|
|
public function getCategoryModuleList($categoryModel,$module_id,$status = 0,$filed = ['*']){
|
|
|
|
$data = array();
|
|
|
|
$list = $categoryModel->list(['pid'=>0, 'module_id'=>$module_id , 'status'=>$status],['sort','id'],$filed);
|
|
|
|
foreach ($list as $v){
|
|
|
|
$data[] = $v;
|
|
|
|
$son_list = $categoryModel->list(['pid'=>$v['id'],'module_id'=>$module_id,'status'=>$status],['sort','id'],$filed);
|
|
|
|
foreach ($son_list as $v1){
|
|
|
|
$data[] = $v1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$data = $categoryModel->list(['module_id'=>$module_id , 'status'=>$status],['sort','id'],$filed);
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|