作者 郭文星

123

@@ -929,12 +929,12 @@ class Car extends Base @@ -929,12 +929,12 @@ class Car extends Base
929 $number = $this->request->param("number");//乘车人数 929 $number = $this->request->param("number");//乘车人数
930 $reservation_time = $this->request->param("reservation_time");//预约时间 930 $reservation_time = $this->request->param("reservation_time");//预约时间
931 $phone = $this->request->param("phone");//联系电话 931 $phone = $this->request->param("phone");//联系电话
932 - $carmodel_id = $this->request->param("carmodel_id");//车型id  
933 - $charter_num = $this->request->param("charter_num");//包车数量 932 +
934 $intended_driver_id = $this->request->param("intended_driver_id");//意向司机 933 $intended_driver_id = $this->request->param("intended_driver_id");//意向司机
935 $remarks = $this->request->param("remarks");//备注 934 $remarks = $this->request->param("remarks");//备注
936 - $carmodel=Db::name("carmodel")->where("id",$carmodel_id)->find();  
937 - $price=bcmul($charter_num,$carmodel['price'],2); 935 + $car=Db::name("car")->where("driver_id",$intended_driver_id)->find();
  936 + $carmodel=Db::name("carmodel")->where("id",$car["carmodel_id"])->find();
  937 + $price=bcmul($number,$carmodel['price'],2);
938 $data=[ 938 $data=[
939 "order_no"=>getOrderSn(), 939 "order_no"=>getOrderSn(),
940 "price"=>$price, 940 "price"=>$price,