From 607d0f9cb6f69891ff476878053cc4fe81830c6a Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Sat, 14 Nov 2020 14:23:07 +0800 Subject: [PATCH] 20201112 --- application/master/controller/Journal.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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){