作者 何书鹏
1 个管道 的构建 通过 耗费 2 秒

消息排序

@@ -504,9 +504,10 @@ class HouseBoard extends Api @@ -504,9 +504,10 @@ class HouseBoard extends Api
504 'house_user_id' => $wuye_user_id, 504 'house_user_id' => $wuye_user_id,
505 ], 505 ],
506 ]; 506 ];
507 - $order = ['createtime'=>'asc']; 507 + $order = ['createtime'=>'desc'];
508 $comment = $model->pageSelect($page,$where_c,'*',$order,config('option.num')); 508 $comment = $model->pageSelect($page,$where_c,'*',$order,config('option.num'));
509 $list = $comment->items(); 509 $list = $comment->items();
  510 + array_multisort(array_column($list,'createtime'),SORT_ASC,$list);
510 $user_model = new \app\api\model\User(); 511 $user_model = new \app\api\model\User();
511 if(count($list) == 0) { 512 if(count($list) == 0) {
512 $first = [ 513 $first = [