|
|
|
@ -9,10 +9,12 @@ class Api_CageController extends Ctrl_Api{ |
|
|
|
|
public $Cagemodel; |
|
|
|
|
public $POST; |
|
|
|
|
public $Cagecolormodel; |
|
|
|
|
public $Usermodel; |
|
|
|
|
public function init() { |
|
|
|
|
$this->Cagemodel = new CageModel(); |
|
|
|
|
$this->POST =json_decode(file_get_contents('php://input'),true); |
|
|
|
|
$this->Cagecolormodel = new CagecolorModel(); |
|
|
|
|
$this->Usermodel = new UserModel(); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 鼠笼列表接口 |
|
|
|
@ -110,5 +112,13 @@ class Api_CageController extends Ctrl_Api{ |
|
|
|
|
$data = $this->Cagecolormodel->getModelList($params); |
|
|
|
|
Tool_Fnc::apiMsg('获取成功', '200',$data); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 获取负责人接口 |
|
|
|
|
*/ |
|
|
|
|
public function getUserAction(){ |
|
|
|
|
$uid = empty($this->POST['uid'])?Tool_Fnc::apiMsg('请先登录', '500'):$this->POST['uid']; |
|
|
|
|
$data = $this->Usermodel->getUser($uid); |
|
|
|
|
Tool_Fnc::apiMsg('获取成功', '200',$data); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|