|
...
|
...
|
@@ -65,7 +65,16 @@ class CustomModuleContentController extends BaseController |
|
|
|
public function getCategoryList(){
|
|
|
|
$categoryModel = new CustomModuleCategory();
|
|
|
|
$list = $categoryModel->list(['project_id'=>$this->user['project_id'],'module_id'=>$this->param['module_id']],['id','name']);
|
|
|
|
$this->response('success',Code::SUCCESS,$list);
|
|
|
|
$menu = [];
|
|
|
|
if(!empty($list)){
|
|
|
|
foreach ($list as $v){
|
|
|
|
if($v['pid'] == 0){
|
|
|
|
$v['sub'] = _get_child($v['id'],$list);
|
|
|
|
$menu[] = $v;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->response('success',Code::SUCCESS,$menu);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|