| xqd
@@ -16,7 +16,8 @@ class TestController extends Controller
|
|
|
$client = new Client();
|
|
|
$from = '39.916527,116.397128';
|
|
|
$to = $from;
|
|
|
- $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();
|
|
|
dd($res);
|
|
|
return response()->json(['status' => 'success', 'data' => $res]);
|