diff --git a/application/controllers/Api/Cage.php b/application/controllers/Api/Cage.php index 9d6cb18..e83e739 100644 --- a/application/controllers/Api/Cage.php +++ b/application/controllers/Api/Cage.php @@ -121,9 +121,7 @@ class Api_CageController extends Ctrl_Api{ } public function getCageinfoACtion(){ $id = empty($this->POST['id'])?Tool_Fnc::apiMsg('缺少笼位ID', '500'):$this->POST['id']; - $type = empty($this->POST['type'])?Tool_Fnc::apiMsg('缺少笼位ID', '500'):$this->POST['type']; $params['where'] = "and cage = {$id}"; - $params['type'] =$type; $data['cage'] = $this->Cagemodel->getOneInfo($id); $data['cage']['code'] = ''; $data['squirrel'] = $this->SquirrelModel->getModelList($params); diff --git a/application/models/Squirrel.php b/application/models/Squirrel.php index cbc1e60..101b982 100644 --- a/application/models/Squirrel.php +++ b/application/models/Squirrel.php @@ -45,7 +45,7 @@ class SquirrelModel extends Orm_Base{ $val['icon'] = $this->getIcon($val['id'])['icon']; } //获取繁殖笼幼崽信息 - $data['youzailishi'] = $params['type']==2?$NewSquirrel->getModelList($params):[]; + $data['youzailishi'] = empty($NewSquirrel->getModelList($params))?$NewSquirrel->getModelList($params):[]; return $data;