params['id']; $address = new AddressModel(); $info = $address->getAreaInfo($id); return $this->response($info); } /** * 列表信息 */ public function lists() { $pid = $this->params['pid'] ?? 0; $address = new AddressModel(); $list = $address->getAreas($pid); return $this->response($list); } /** * 树状结构信息 */ public function tree() { $id = $this->params['id']; $address = new AddressModel(); $tree = $address->getAreas($id); return $this->response($tree); } /** * 解析地址 */ public function analysesAddress() { $address = input('address', ''); $address_model = new AddressModel(); return $this->response($address_model->analysesAddress($address)); } }