diff --git a/application/controllers/Api/Login.php b/application/controllers/Api/Login.php index 818f2f8..1d6afaa 100644 --- a/application/controllers/Api/Login.php +++ b/application/controllers/Api/Login.php @@ -45,6 +45,7 @@ empty($Userinfo)?Tool_Fnc::apiMsg('账号密码错误', '500'):$Userinfo; $Userinfo['password']!=md5($Password.Yaf_Registry::get("config")->psd->default->appsecret)?Tool_Fnc::apiMsg('账号密码错误', '500'):$Userinfo['password']; unset($Userinfo['password']); + $Userinfo['uid'] = $Userinfo['id']; unset($Userinfo['id']); if($Userinfo['status']!=1) Tool_Fnc::apiMsg('等待管理审核', '500'); diff --git a/application/controllers/Api/Squirrel.php b/application/controllers/Api/Squirrel.php index e6c3d6a..b9940bd 100644 --- a/application/controllers/Api/Squirrel.php +++ b/application/controllers/Api/Squirrel.php @@ -44,6 +44,7 @@ class Api_SquirrelController extends Ctrl_Api{ * } */ public function listAction(){ + $uid = empty($this->POST['uid'])||!isset($this->POST['cage_id'])?Tool_Fnc::apiMsg('请先登录', '500'):Tool_Fnc::safe_string($this->POST['uid']); $cage = empty($this->POST['cage_id'])||!isset($this->POST['cage_id'])?Tool_Fnc::apiMsg('缺少重要参数', '500'):Tool_Fnc::safe_string($this->POST['cage_id']); $type = empty($this->POST['type'])||!isset($this->POST['type'])?1:Tool_Fnc::safe_string($this->POST['type']); $params['where'] = "and cage = {$cage}";