From 676ba29d4e9e6515b8e86df8ac0b9e876bc7ed05 Mon Sep 17 00:00:00 2001 From: lqmac Date: Sat, 24 Feb 2024 15:12:15 +0800 Subject: [PATCH] 1 --- app/api/controller/User.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/api/controller/User.php b/app/api/controller/User.php index c0073103..d5104c96 100644 --- a/app/api/controller/User.php +++ b/app/api/controller/User.php @@ -34,6 +34,15 @@ use think\response\Json; */ class User extends Controller { + /** + * 注销账号 + * [delete description] + * @return [type] [description] + */ + public function delete(){ + $user_id = UserService::getCurrentLoginUserId(); + UserModel::where('user_id', $user_id)->update(['is_delete' => 1,'update_time' => time()]); + } /** * 当前用户详情 * @return Json