作者 刘朕
1 个管道 的构建 失败 耗费 0 秒

google定位接口格式调整

@@ -101,8 +101,7 @@ class Common extends Api @@ -101,8 +101,7 @@ class Common extends Api
101 $key = config('site.google_map_key'); 101 $key = config('site.google_map_key');
102 $apiurl = "https://maps.googleapis.com/maps/api/geocode/json?address=$address&key=$key"; 102 $apiurl = "https://maps.googleapis.com/maps/api/geocode/json?address=$address&key=$key";
103 $data = file_get_contents($apiurl); 103 $data = file_get_contents($apiurl);
104 - print_r($data);exit;  
105 - $this->success('获取成功',['address'=>$data]); 104 + $this->success('获取成功',['address'=>json_decode($data,true)]);
106 } 105 }
107 106
108 /** 107 /**