diff --git a/application/wap/controller/My.php b/application/wap/controller/My.php index 962e5874..68f4bca6 100755 --- a/application/wap/controller/My.php +++ b/application/wap/controller/My.php @@ -34,6 +34,7 @@ use app\wap\model\user\UserAddress; use app\wap\model\user\UserSign; use app\wap\model\user\Message; use app\wap\model\user\MessageType; +use app\wap\model\user\WechatUser; use service\CacheService; use service\GroupDataService; use service\JsonService; @@ -668,4 +669,14 @@ class My extends AuthController { return $this->fetch(); } + public function deleteUser(){ + $uid = $this->uid; + User::where('uid', $uid)->delete(); + WechatUser::where('uid', $uid)->delete(); + PhoneUser::where('uid', $uid)->delete(); + Cookie::delete('__login_phone'); + Session::delete('__login_phone_num' . $uid, 'wap'); + Session::delete('loginUid', 'wap'); + return JsonService::successful('注销成功'); + } }