Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save naffan2014/5849de782c8845fa3aa38f922957d30a to your computer and use it in GitHub Desktop.
Save naffan2014/5849de782c8845fa3aa38f922957d30a to your computer and use it in GitHub Desktop.
楼盘字典脚本
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