...
|
...
|
@@ -645,11 +645,19 @@ class Car extends Base |
|
|
->where('car_id',$car_id)
|
|
|
->field("seat_no")
|
|
|
->select();
|
|
|
|
|
|
if($order){
|
|
|
foreach ($order as $k=>$v){
|
|
|
$seat_no[$k]=$order[$k]["seat_no"];
|
|
|
}
|
|
|
}
|
|
|
$seat_no = array_filter($seat_no, function($value) {
|
|
|
return !empty($value);
|
|
|
});
|
|
|
$seat_no = implode(',', $seat_no);
|
|
|
|
|
|
$seat_no = explode(",", $seat_no);
|
|
|
|
|
|
foreach ($seat['seat'] as $k=>$v){
|
|
|
if($order){
|
|
|
if( in_array($seat['seat'][$k]['seat_no'],$seat_no)){
|
...
|
...
|
@@ -873,6 +881,7 @@ class Car extends Base |
|
|
*/
|
|
|
public function createintercityorder(){
|
|
|
$route_id = $this->request->param("route_id");//线路
|
|
|
$is_qrcode = $this->request->param("is_qrcode");//乘车人数
|
|
|
$number = $this->request->param("number");//乘车人数
|
|
|
$reservation_time = $this->request->param("reservation_time");//预约时间
|
|
|
$phone = $this->request->param("phone");//联系电话
|
...
|
...
|
@@ -888,6 +897,7 @@ class Car extends Base |
|
|
"reservation_time"=>$reservation_time,
|
|
|
"is_pay"=>"2",//未支付
|
|
|
"route_id"=>$route_id,
|
|
|
"is_qrcode"=>$is_qrcode,
|
|
|
"user_id"=>$this->auth->id,
|
|
|
"phone"=>$phone,
|
|
|
"create_time"=>time(),
|
...
|
...
|
|