20201112
This commit is contained in:
@@ -322,10 +322,26 @@ class Journal extends Controller {
|
||||
$frag[] = $v;
|
||||
}
|
||||
}
|
||||
$ff = [];
|
||||
foreach ($frag as $kk => $vv){
|
||||
$frag[$kk] = $this->getChieldarr($vv,$res);
|
||||
$ff[] = $this->getpChieldarr($vv, $res);
|
||||
// $frag[$kk] = $this->getChieldarr($vv,$res);
|
||||
}
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['parentList'=>$frag]]);
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['parentList'=>$ff]]);
|
||||
}
|
||||
|
||||
private function getpChieldarr($vv,$res){
|
||||
if($vv['is_final']==1){
|
||||
return $vv;
|
||||
}
|
||||
$frag = [];
|
||||
$frag[] = $vv;
|
||||
foreach ($res as $v){
|
||||
if($v['parent_id'] == $vv['journal_topic_id']){
|
||||
$frag[] = $this->getChieldarr($v, $res);
|
||||
}
|
||||
}
|
||||
return $frag;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user