From eb328a4ff17059362258212f0e9d51c1d3c4a600 Mon Sep 17 00:00:00 2001 From: "yangsai@163.com" <2624183217@qq.com> Date: Thu, 16 May 2024 15:22:35 +0800 Subject: [PATCH] =?UTF-8?q?YS:=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/Api/Login.php | 1 + application/controllers/Api/Squirrel.php | 1 + 2 files changed, 2 insertions(+) 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}";