/** * ajax获取地区信息 */ public function getlocationAction() { if (ComTool::isAjax()) { $ajax = $this->get('ajax'); $id = intval($this->get('id', 0)); $type = $this->get('t', 'c'); //当前id的类型 city/area $locations = array(); if ($type == 'c') { //获取某城市下区域 $locations = RegionData::getsByPid($id); } elseif ($type == 'a') { //获取某区域的圈子 $locations = GroupData::getsByRid($id); } $this->assign('list', $locations); $this->assign('type', $this->get('type')); $html = $this->fetch("Index/layer/select.html"); ComTool::ajax(100000, 'ok', $html); } }