| xqd
@@ -1698,14 +1698,14 @@ class AlbumController extends Controller
|
|
|
$data = $request->input();
|
|
|
$url = "https://apis.map.qq.com/ws/geocoder/v1/?address=".$data['address']."&key=U5DBZ-X5VCO-6UUWV-SGPU3-PD5X2-NDFXA";
|
|
|
$local = $this->curl_get($url);
|
|
|
- dd(json_decode($local,true));die;
|
|
|
+ $res = json_decode($local,true);
|
|
|
$agent_check = AlbumAgentModel::where([['store_id',$data['store_id']],['user_id',$userAuth->id]])->first();
|
|
|
if($agent_check){
|
|
|
if($agent_check->status==0) return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '该用户已提交申请!');
|
|
|
$agent_check->phone = $data['phone'];
|
|
|
$agent_check->address = $data['address'];
|
|
|
- $agent_check->lon = $data['lon'];
|
|
|
- $agent_check->lat = $data['lat'];
|
|
|
+ $agent_check->lon = $res['result']['location']['lon'];
|
|
|
+ $agent_check->lat = $res['result']['location']['lat'];
|
|
|
$agent_check->realname = $data['realname'];
|
|
|
if($agent_check->save()) return $this->api([
|
|
|
'code' =>0,
|