...
|
...
|
@@ -63,7 +63,7 @@ class ListController extends HomeBaseController |
|
|
//产品介绍
|
|
|
if($path[1] == 12){
|
|
|
|
|
|
$jdata[] = Db::name('portal_category') -> where('id',$path[2]) -> find();
|
|
|
/* $jdata[] = Db::name('portal_category') -> where('id',$path[2]) -> find();
|
|
|
|
|
|
$jdata[0]['son'] = Db::name('portal_category') -> where('parent_id',$path[2]) -> select();
|
|
|
|
...
|
...
|
@@ -88,7 +88,13 @@ class ListController extends HomeBaseController |
|
|
foreach ($value as $k => $va) {
|
|
|
$arr3[] = $va['post_id'];
|
|
|
}
|
|
|
}
|
|
|
}*/
|
|
|
|
|
|
$data = Db::name('portal_category') -> select();
|
|
|
$shuju = $this -> wuxian($data);
|
|
|
$this -> assign('jdata',$shuju);
|
|
|
|
|
|
|
|
|
|
|
|
if(count($path) == 4){
|
|
|
|
...
|
...
|
@@ -165,6 +171,24 @@ class ListController extends HomeBaseController |
|
|
|
|
|
|
|
|
|
|
|
public function wuxian($data,$pid=12){
|
|
|
|
|
|
$arr = [];
|
|
|
foreach ($data as $key => $value) {
|
|
|
if($value['parent_id'] == $pid){
|
|
|
$value['son'] = $this -> daohang($data,$value['id']);
|
|
|
$arr[] = $value;
|
|
|
|
|
|
}
|
|
|
}
|
|
|
return $arr;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|