This commit is contained in:
wangjinlei
2020-11-14 14:23:07 +08:00
parent a0ce7b1060
commit 607d0f9cb6

View File

@@ -314,6 +314,7 @@ class Journal extends Controller {
->where('journal_id',$data['journal_id'])
->where('state',0)
->where('is_final',0)
->order('sort desc')
->select();
//处理数组
$frag = [];
@@ -327,7 +328,13 @@ class Journal extends Controller {
$ff[] = $this->getpChieldarr($vv, $res);
// $frag[$kk] = $this->getChieldarr($vv,$res);
}
return json(['code'=>0,'msg'=>'success','data'=>['parentList'=>$ff]]);
$fff = [];
foreach ($ff as $vvv){
foreach ($vvv as $vvvv){
$fff[] = $vvvv;
}
}
return json(['code'=>0,'msg'=>'success','data'=>['parentList'=>$fff]]);
}
private function getpChieldarr($vv,$res){