From ea680129c89150b31e634f7582cfb020a9ca7aff Mon Sep 17 00:00:00 2001 From: "yangsai@163.com" <2624183217@qq.com> Date: Thu, 6 Jun 2024 15:59:28 +0800 Subject: [PATCH] YS --- application/controllers/Api/Squirrel.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/controllers/Api/Squirrel.php b/application/controllers/Api/Squirrel.php index ae60f3d..ed439d5 100644 --- a/application/controllers/Api/Squirrel.php +++ b/application/controllers/Api/Squirrel.php @@ -436,5 +436,13 @@ class Api_SquirrelController extends Ctrl_Api{ } Tool_Fnc::apiMsg('设置失败', '500'); } + public function deleteNewSquirrelAction(){ + $uid = empty($this->POST['uid'])?Tool_Fnc::apiMsg('请登录', '500'):$this->POST['uid']; + $id = empty($this->POST['id'])?Tool_Fnc::apiMsg('幼崽信息获取失败', '500'):$this->POST['id']; + if(!$this->NewSquirrelmodel->where("id={$id} and c_user_id={$uid}")->del()){ + Tool_Fnc::apiMsg('删除失败', '1'); + } + Tool_Fnc::apiMsg('删除成功', '500'); + } }