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