Created
July 11, 2019 09:06
-
-
Save naffan2014/5849de782c8845fa3aa38f922957d30a to your computer and use it in GitHub Desktop.
楼盘字典脚本
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function loadMapBuilding() | |
{ | |
$this->resetParams(); | |
$resblockIds = $this->requestParams['resblockIds']; | |
$resArr = explode(",",$resblockIds); | |
$test = new GetResblockDetail($this->_searchServiceProvider, $this->_openApiServiceProvider, $this->requestParams); | |
foreach($resArr as $k => $v ){ | |
$rinfo = $test->getDetail($v); | |
$cityId = $rinfo['resblockInfo']['baseInfo']['cityId']; | |
$plng = $rinfo['resblockInfo']['baseInfo']['pointLng']; | |
$plat = $rinfo['resblockInfo']['baseInfo']['pointLat']; | |
$name = $rinfo['resblockInfo']['baseInfo']['resblockName']; | |
$webappBuildingInstance = new Building($this->_searchServiceProvider, $this->_openApiServiceProvider, $this->requestParams); | |
$buildList = $webappBuildingInstance->getNearBuilding( | |
$this->requestParams['radius'], | |
$cityId, | |
$plng, | |
$plat | |
); | |
if (false === $buildList) { | |
return $this->fail( | |
$webappBuildingInstance->getErrorCode(), | |
$webappBuildingInstance->getErrorMsg(), | |
$webappBuildingInstance->getServiceErrorData() | |
); | |
} | |
$a = $this->success($buildList); | |
Storage::put($v.".json", $a); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment