/** * 第二期首页 */ public function indexAction() { $cityId = (int) $this->get("city_id", 0); $datacourseModel = new DatasourceModel(); $city = $datacourseModel->getCity($cityId); $schoolModel = new SchoolModel(); $list = $schoolModel->getSchoolList($cityId, $this->uid); $this->assign("school_list", $list); $this->assign("city", $city); }
function listAction() { $cityId = (int) $this->get("city_id", 0); if (!$cityId) { $this->displayJson(Common_Error::ERROR_FAIL); } else { $this->displayJsonUdo(Common_Error::ERROR_SUCCESS, $cityId); } $schoolModel = new SchoolModel(); $list = $schoolModel->getSchoolList($cityId, $this->uid); if ($this->isMobile) { $this->displayJson(Common_Error::ERROR_SUCCESS, $list); } }