diff --git a/application/master/controller/Journal.php b/application/master/controller/Journal.php index bd515af..fc9a2d7 100644 --- a/application/master/controller/Journal.php +++ b/application/master/controller/Journal.php @@ -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){