zhangguidong 2 years ago
parent
commit
2256ef32ec
1 changed files with 2 additions and 0 deletions
  1. 2 0
      application/api/controller/Pond.php

+ 2 - 0
application/api/controller/Pond.php

@@ -18,6 +18,7 @@ class Pond extends Api
 
     public function order_list(){
         $order_model = new Order();
+        $order_item_model= new Orderitem();
         $status=input('status',0);
         $stand_time = input('stand_time');
         $end_time = input('end_time');
@@ -67,6 +68,7 @@ class Pond extends Api
         }
         $list= $order_model->where('t_user_id',$this->auth->id)->whereIn('status',$array)->where($where)->order('id','desc')->paginate();
         foreach ($list as &$v){
+            $v['item']=$order_item_model->where('order_id',$v['id'])->select();
             if($v['status']==3){
                 $time=strtotime($v['end'])-strtotime(date( "H:i"));
                 if($time<=1800) {