删除多余的文件
This commit is contained in:
parent
de082bc9b1
commit
0022719b12
@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\basics\Api;
|
||||
use app\common\server\ConfigServer;
|
||||
use app\common\server\JsonServer;
|
||||
|
||||
class GetLocation extends Api
|
||||
{
|
||||
public $like_not_need_login = ['getLocation',];
|
||||
|
||||
public function getLocation(){
|
||||
$post = $this->request->post();
|
||||
$url = 'https://apis.map.qq.com/ws/geocoder/v1?key=' . ConfigServer::get('map', 'tx_map_key') . '&address=' . $post['address'];
|
||||
$result = file_get_contents($url);
|
||||
$data = json_decode($result, true);
|
||||
if ($data['message'] == 'Success') {
|
||||
return JsonServer::success('', $data['result']['location']);
|
||||
}
|
||||
|
||||
return JsonServer::error('获取失败');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user