正在显示
1 个修改的文件
包含
10 行增加
和
0 行删除
| @@ -645,11 +645,19 @@ class Car extends Base | @@ -645,11 +645,19 @@ class Car extends Base | ||
| 645 | ->where('car_id',$car_id) | 645 | ->where('car_id',$car_id) |
| 646 | ->field("seat_no") | 646 | ->field("seat_no") |
| 647 | ->select(); | 647 | ->select(); |
| 648 | + | ||
| 648 | if($order){ | 649 | if($order){ |
| 649 | foreach ($order as $k=>$v){ | 650 | foreach ($order as $k=>$v){ |
| 650 | $seat_no[$k]=$order[$k]["seat_no"]; | 651 | $seat_no[$k]=$order[$k]["seat_no"]; |
| 651 | } | 652 | } |
| 652 | } | 653 | } |
| 654 | + $seat_no = array_filter($seat_no, function($value) { | ||
| 655 | + return !empty($value); | ||
| 656 | + }); | ||
| 657 | + $seat_no = implode(',', $seat_no); | ||
| 658 | + | ||
| 659 | + $seat_no = explode(",", $seat_no); | ||
| 660 | + | ||
| 653 | foreach ($seat['seat'] as $k=>$v){ | 661 | foreach ($seat['seat'] as $k=>$v){ |
| 654 | if($order){ | 662 | if($order){ |
| 655 | if( in_array($seat['seat'][$k]['seat_no'],$seat_no)){ | 663 | if( in_array($seat['seat'][$k]['seat_no'],$seat_no)){ |
| @@ -873,6 +881,7 @@ class Car extends Base | @@ -873,6 +881,7 @@ class Car extends Base | ||
| 873 | */ | 881 | */ |
| 874 | public function createintercityorder(){ | 882 | public function createintercityorder(){ |
| 875 | $route_id = $this->request->param("route_id");//线路 | 883 | $route_id = $this->request->param("route_id");//线路 |
| 884 | + $is_qrcode = $this->request->param("is_qrcode");//乘车人数 | ||
| 876 | $number = $this->request->param("number");//乘车人数 | 885 | $number = $this->request->param("number");//乘车人数 |
| 877 | $reservation_time = $this->request->param("reservation_time");//预约时间 | 886 | $reservation_time = $this->request->param("reservation_time");//预约时间 |
| 878 | $phone = $this->request->param("phone");//联系电话 | 887 | $phone = $this->request->param("phone");//联系电话 |
| @@ -888,6 +897,7 @@ class Car extends Base | @@ -888,6 +897,7 @@ class Car extends Base | ||
| 888 | "reservation_time"=>$reservation_time, | 897 | "reservation_time"=>$reservation_time, |
| 889 | "is_pay"=>"2",//未支付 | 898 | "is_pay"=>"2",//未支付 |
| 890 | "route_id"=>$route_id, | 899 | "route_id"=>$route_id, |
| 900 | + "is_qrcode"=>$is_qrcode, | ||
| 891 | "user_id"=>$this->auth->id, | 901 | "user_id"=>$this->auth->id, |
| 892 | "phone"=>$phone, | 902 | "phone"=>$phone, |
| 893 | "create_time"=>time(), | 903 | "create_time"=>time(), |
-
请 注册 或 登录 后发表评论