/** * 获取分类信息 */ public function getcategoryAction() { if (ComTool::isAjax()) { $ajax = $this->get('ajax'); $ctype = $this->get('ctype'); $id = intval($this->get('id', 0)); if (empty($id)) { ComTool::ajax(100001, 'empty gid'); } if ($ctype == 'p') { $cats = CategoryData::getl1CatsByGid($id); } elseif ($ctype == 'c') { $cats = CategoryData::getl2CatsByPid($id); } $this->assign('list', $cats); $this->assign('type', $this->get('type')); $html = $this->fetch("Index/layer/select.html"); ComTool::ajax(100000, 'ok', $html); } }