...
|
...
|
@@ -88,6 +88,7 @@ class Car extends Base |
|
|
$phone = $this->request->param("phone");//联系手机号码
|
|
|
$user_name = $this->request->param("user_name");//联系人
|
|
|
$position = $this->request->param("position");//上车地址
|
|
|
$seat_no = $this->request->param("seat_no");//经度
|
|
|
$lat = $this->request->param("lat");//经度
|
|
|
$lng = $this->request->param("lng");//维度
|
|
|
$remarks = $this->request->param("remarks");//备注
|
...
|
...
|
@@ -128,6 +129,9 @@ class Car extends Base |
|
|
}else{
|
|
|
$order_review_id=$order_review['id'];
|
|
|
}
|
|
|
|
|
|
//计算价格
|
|
|
|
|
|
$data=[
|
|
|
"order_no"=>getOrderSn(),
|
|
|
"price"=>bcmul($route['price'],$number,2),
|
...
|
...
|
@@ -325,7 +329,29 @@ class Car extends Base |
|
|
public function selectroutebyname(){
|
|
|
$start_address=$this->request->param("start_address");
|
|
|
$end_address=$this->request->param("end_address");
|
|
|
$route=Db::name("route")->where("end_address",$end_address)->where("start_address",$start_address)->find();
|
|
|
$route=Db::name("route")
|
|
|
->where("end_address",$end_address)
|
|
|
->where("type",2)
|
|
|
->where("start_address",$start_address)
|
|
|
->find();
|
|
|
return $this->success("请求成功",$route);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 通过位置查询线路
|
|
|
* @return void
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
|
* @throws \think\exception\DbException
|
|
|
*/
|
|
|
public function selectintercityroutebyname(){
|
|
|
$start_address=$this->request->param("start_address");
|
|
|
$end_address=$this->request->param("end_address");
|
|
|
$route=Db::name("route")
|
|
|
->where("end_address",$end_address)
|
|
|
->where("type",1)
|
|
|
->where("start_address",$start_address)
|
|
|
->find();
|
|
|
return $this->success("请求成功",$route);
|
|
|
}
|
|
|
|
...
|
...
|
|