logout(); $this->response->redirect(['for' => 'web.index']); } /** * @Get("/password/reset", name="web.account.reset_pwd") */ public function resetPasswordAction() { } /** * @Post("/phone/register", name="web.account.register_by_phone") */ public function registerByPhoneAction() { $service = new AccountService(); $service->registerByPhone(); $content = [ 'location' => $this->request->getHTTPReferer(), 'msg' => '注册账户成功', ]; return $this->jsonSuccess($content); } /** * @Post("/email/register", name="web.account.register_by_email") */ public function registerByEmailAction() { $service = new AccountService(); $service->registerByPhone(); $content = [ 'msg' => '注册账户成功', ]; return $this->jsonSuccess($content); } /** * @Post("/password/login", name="web.account.login_by_pwd") */ public function loginByPasswordAction() { $service = new AccountService(); $service->loginByPassword(); return $this->jsonSuccess(); } /** * @Post("/verify/login", name="web.account.login_by_verify") */ public function loginByVerifyAction() { $service = new AccountService(); $service->loginByVerify(); return $this->jsonSuccess(); } /** * @Post("/password/email/reset", name="web.account.reset_pwd_by_email") */ public function resetPasswordByEmailAction() { $service = new PasswordResetService(); $service->handle(); return $this->jsonSuccess(['msg' => '重置密码成功']); } /** * @Post("/password/phone/reset", name="web.account.reset_pwd_by_phone") */ public function resetPasswordByPhoneAction() { $service = new PasswordResetService(); $service->handle(); return $this->jsonSuccess(['msg' => '重置密码成功']); } /** * @Post("/phone/update", name="web.account.update_phone") */ public function updatePhoneAction() { $service = new PhoneUpdateService(); $service->handle(); return $this->jsonSuccess(['msg' => '更新手机成功']); } /** * @Post("/email/update", name="web.account.update_email") */ public function updateEmailAction() { $service = new EmailUpdateService(); $service->handle(); return $this->jsonSuccess(['msg' => '更新邮箱成功']); } /** * @Post("/password/update", name="web.account.update_password") */ public function updatePasswordAction() { $service = new PasswordUpdateService(); $service->handle(); return $this->jsonSuccess(['msg' => '更新密码成功']); } }