Silent 6 years ago
parent
commit
bb7d2a5f2e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Http/Controllers/WeChat/ApiController.php

+ 1 - 1
app/Http/Controllers/WeChat/ApiController.php

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