| xqd
@@ -64,7 +64,8 @@ class ApiController extends Controller
|
|
|
$client = new Client();
|
|
|
$from = $tmp[0] . ',' . $tmp[1];
|
|
|
$to = $request->input('latitude') . ',' . $request->input('longitude');
|
|
|
- $res = $client->get('https://apis.map.qq.com/ws/distance/v1/', ['from' => $from, 'to' => $to, 'key' => env('TECENT_POSITION_KEY')]);
|
|
|
+ $url = 'https://apis.map.qq.com/ws/distance/v1/?from=' . $from . '&to=' . $to . '&key=' . env('TECENT_POSITION_KEY');
|
|
|
+ $res = $client->get($url);
|
|
|
$res = (string)$res->getBody();
|
|
|
return response()->json(['status' => 'success', 'data' => $res]);
|
|
|
}
|