...
|
...
|
@@ -10,12 +10,27 @@ class CoaController extends AdminBaseController{ |
|
|
//说明文献显示
|
|
|
public function index(){
|
|
|
|
|
|
|
|
|
$data = Db::name('portal_category') -> select();
|
|
|
$shuju = $this -> wuxian($data);
|
|
|
dump($shuju);die;
|
|
|
return $this -> fetch();
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
public function wuxian($data,$pid=12){
|
|
|
|
|
|
static $arr = [];
|
|
|
foreach ($data as $key => $value) {
|
|
|
if($value['parent_id'] == $pid){
|
|
|
$arr[] = $value;
|
|
|
$this -> wuxian($data,$value['id']);
|
|
|
}
|
|
|
}
|
|
|
return $arr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
...
|
...
|
|