getListByPid($pid)); } /** * 获取层级列表 * @param int $level * @return Response */ public function tree(int $level) { return success((new AreaService())->getAreaTree($level)); } /** * @return Response */ public function addressInfo() { $data = $this->request->params([ ['address', ''], ]); return success((new AreaService())->getAddress($data['address'])); } /** * @return Response */ public function contraryAddress() { $data = $this->request->params([ ['location', ''], ]); return success((new AreaService())->getAddressInfo($data['location'])); } /** * * @return void */ public function areaByAreaCode(string $code) { return success((new AreaService())->getAreaByAreaCode($code)); } }