作者 sgj
1 个管道 的构建 通过 耗费 3 秒

修改订单排序顺序

@@ -197,7 +197,7 @@ class UsersController extends HomeBaseController{ @@ -197,7 +197,7 @@ class UsersController extends HomeBaseController{
197 */ 197 */
198 public function getOrder(){ 198 public function getOrder(){
199 $users_id=$this->request->param('users_id'); 199 $users_id=$this->request->param('users_id');
200 - $order=Db::name('order')->where(['users_id'=>$users_id])->paginate(8); 200 + $order=Db::name('order')->where(['users_id'=>$users_id])->order('id',desc)->paginate(8);
201 $data_info=$order->items(); 201 $data_info=$order->items();
202 foreach ($data_info as $k=>$v){ 202 foreach ($data_info as $k=>$v){
203 $time_info=$this->getTimeInfo($v['start_time'],$v['end_time']); 203 $time_info=$this->getTimeInfo($v['start_time'],$v['end_time']);