From d2e58be34462ccb6b49710c3a98fa5e3a80fbf42 Mon Sep 17 00:00:00 2001 From: gzydong <837215079@qq.com> Date: Tue, 20 Jul 2021 23:18:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/Api/V1/AuthController.php | 4 ++-- app/Event/{UserLogin.php => LoginEvent.php} | 3 ++- app/Event/TalkEvent.php | 1 - .../{UserLoginListener.php => LoginListener.php} | 9 +++++---- 4 files changed, 9 insertions(+), 8 deletions(-) rename app/Event/{UserLogin.php => LoginEvent.php} (96%) rename app/Listener/{UserLoginListener.php => LoginListener.php} (75%) diff --git a/app/Controller/Api/V1/AuthController.php b/app/Controller/Api/V1/AuthController.php index 1cd375e..294baea 100644 --- a/app/Controller/Api/V1/AuthController.php +++ b/app/Controller/Api/V1/AuthController.php @@ -10,7 +10,7 @@ namespace App\Controller\Api\V1; -use App\Event\UserLogin; +use App\Event\LoginEvent; use Hyperf\Di\Annotation\Inject; use Hyperf\HttpServer\Annotation\Controller; use Hyperf\HttpServer\Annotation\RequestMapping; @@ -60,7 +60,7 @@ class AuthController extends CController return $this->response->error('登录异常,请稍后再试!'); } - event()->dispatch(new UserLogin($this->request, $user)); + event()->dispatch(new LoginEvent($this->request, $user)); return $this->response->success([ 'authorize' => [ diff --git a/app/Event/UserLogin.php b/app/Event/LoginEvent.php similarity index 96% rename from app/Event/UserLogin.php rename to app/Event/LoginEvent.php index 1cd8648..48fe5a3 100644 --- a/app/Event/UserLogin.php +++ b/app/Event/LoginEvent.php @@ -1,11 +1,12 @@