...
|
...
|
@@ -122,7 +122,14 @@ class Car extends Backend |
|
|
"driver_id"=>$driver["id"],
|
|
|
"route_id"=>$route["id"],
|
|
|
];
|
|
|
$url_data="?start_address={$route["start_address"]}&route_id={$route["id"]}&driver_id={$driver["id"]}&license_plate={$car["license_plate"]}&name={$driver["name"]}&end_address{$route["end_address"]}&price{$route["price"]}";
|
|
|
$url_data=
|
|
|
"pages/module/intercityOrder?start_address=".$route['start_address']."
|
|
|
&route_id=".$route['id']."
|
|
|
&driver_id=".$driver['id']."
|
|
|
&license_plate=".$car['license_plate']."
|
|
|
&name=".$driver['name']."
|
|
|
&end_address=".$route['end_address']."
|
|
|
&price=".$route['price'];
|
|
|
$place_image=$this->getQRCode($url_data);
|
|
|
$result = Db::name('driver')->where('id','=',$driver["id"])->update(['place_image'=>$place_image['fileurl']]);
|
|
|
Db::commit();
|
...
|
...
|
@@ -189,8 +196,14 @@ class Car extends Backend |
|
|
"driver_id"=>$driver["id"],
|
|
|
"route_id"=>$route["id"],
|
|
|
];
|
|
|
$url_data="?start_address={$route["start_address"]}&route_id={$route["id"]}&driver_id={$driver["id"]}&license_plate={$car["license_plate"]}&name={$driver["name"]}&end_address{$route["end_address"]}&price{$route["price"]}";
|
|
|
$place_image=$this->getQRCode($url_data);
|
|
|
$url_data=
|
|
|
"pages/module/intercityOrder?start_address=".$route['start_address']."
|
|
|
&route_id=".$route['id']."
|
|
|
&driver_id=".$driver['id']."
|
|
|
&license_plate=".$car['license_plate']."
|
|
|
&name=".$driver['name']."
|
|
|
&end_address=".$route['end_address']."
|
|
|
&price=".$route['price'];$place_image=$this->getQRCode($url_data);
|
|
|
$result = Db::name('driver')->where('id','=',$driver["id"])->update(['place_image'=>$place_image]);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -261,12 +274,10 @@ class Car extends Backend |
|
|
curl_close($curl);
|
|
|
return $result;
|
|
|
}
|
|
|
public function getQRCode(){
|
|
|
public function getQRCode($url_data){
|
|
|
$accessToken = $this->getAccessToken();
|
|
|
if ($accessToken) {
|
|
|
$path = 'pages/module/intercityOrder'; // 小程序内的页面路径
|
|
|
$qrCodeData = $this->createMiniProgramQRCode($accessToken, $path);
|
|
|
print_r($qrCodeData);return;
|
|
|
$qrCodeData = $this->createMiniProgramQRCode($accessToken, $url_data);
|
|
|
return $qrCodeData;
|
|
|
}
|
|
|
}
|
...
|
...
|
|