作者 郭文星

123

@@ -122,15 +122,16 @@ class Car extends Backend @@ -122,15 +122,16 @@ class Car extends Backend
122 "driver_id"=>$driver["id"], 122 "driver_id"=>$driver["id"],
123 "route_id"=>$route["id"], 123 "route_id"=>$route["id"],
124 ]; 124 ];
125 - $url_data=  
126 - "pages/module/intercityOrder?start_address=".$route['start_address']." 125 + $url_data="pages/module/intercityOrder?start_address=".$route['start_address']."
127 &route_id=".$route['id']." 126 &route_id=".$route['id']."
128 &driver_id=".$driver['id']." 127 &driver_id=".$driver['id']."
129 &license_plate=".$car['license_plate']." 128 &license_plate=".$car['license_plate']."
130 &name=".$driver['name']." 129 &name=".$driver['name']."
131 &end_address=".$route['end_address']." 130 &end_address=".$route['end_address']."
132 &price=".$route['price']; 131 &price=".$route['price'];
  132 + $url_data=urlencode($url_data);
133 $place_image=$this->getQRCode($url_data); 133 $place_image=$this->getQRCode($url_data);
  134 + //encodeURIComponent
134 $result = Db::name('driver')->where('id','=',$driver["id"])->update(['place_image'=>$place_image['fileurl']]); 135 $result = Db::name('driver')->where('id','=',$driver["id"])->update(['place_image'=>$place_image['fileurl']]);
135 Db::commit(); 136 Db::commit();
136 } catch (ValidateException|PDOException|Exception $e) { 137 } catch (ValidateException|PDOException|Exception $e) {
@@ -196,14 +197,15 @@ class Car extends Backend @@ -196,14 +197,15 @@ class Car extends Backend
196 "driver_id"=>$driver["id"], 197 "driver_id"=>$driver["id"],
197 "route_id"=>$route["id"], 198 "route_id"=>$route["id"],
198 ]; 199 ];
199 - $url_data=  
200 - "pages/module/intercityOrder?start_address=".$route['start_address']." 200 + $url_data="pages/module/intercityOrder?start_address=".$route['start_address']."
201 &route_id=".$route['id']." 201 &route_id=".$route['id']."
202 &driver_id=".$driver['id']." 202 &driver_id=".$driver['id']."
203 &license_plate=".$car['license_plate']." 203 &license_plate=".$car['license_plate']."
204 &name=".$driver['name']." 204 &name=".$driver['name']."
205 &end_address=".$route['end_address']." 205 &end_address=".$route['end_address']."
206 - &price=".$route['price'];$place_image=$this->getQRCode($url_data); 206 + &price=".$route['price'];
  207 + $url_data=urlencode($url_data);
  208 + $place_image=$this->getQRCode($url_data);
207 $result = Db::name('driver')->where('id','=',$driver["id"])->update(['place_image'=>$place_image['fileurl']]); 209 $result = Db::name('driver')->where('id','=',$driver["id"])->update(['place_image'=>$place_image['fileurl']]);
208 } 210 }
209 211
@@ -1563,4 +1563,18 @@ class Car extends Base @@ -1563,4 +1563,18 @@ class Car extends Base
1563 $res=SendMessage(117); 1563 $res=SendMessage(117);
1564 $this->success("123",$res); 1564 $this->success("123",$res);
1565 } 1565 }
  1566 +
  1567 + /**
  1568 + * 查询包车车辆
  1569 + * @return void
  1570 + */
  1571 + public function charter_car(){
  1572 + $specificaddress_id = $this->request->param("specificaddress_id");
  1573 + $res=Db::name('chartercar')
  1574 + ->alias("a")
  1575 + ->join("carmodel b","a.carmodel_id=b.id")
  1576 + ->where('specificaddress_id',$specificaddress_id)
  1577 + ->select();
  1578 + $this->success("请求成功",$res);
  1579 + }
1566 } 1580 }