From fb482ded018bc7a86d572199fb30b1f9b8f8181d Mon Sep 17 00:00:00 2001 From: wuyanwen Date: Fri, 17 Jan 2020 11:30:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9request?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Request.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/Request.php b/app/Request.php index 64c6133..7e3a236 100644 --- a/app/Request.php +++ b/app/Request.php @@ -9,12 +9,18 @@ class Request extends \think\Request { protected $auth; - public function user() - { - if (!$this->auth) { - $this->auth = new CatchAuth; - } - - return $this->auth->user(); + /** + * login user + * + * @time 2020年01月09日 + * @return mixed + */ + public function user() + { + if (!$this->auth) { + $this->auth = new CatchAuth; } + + return $this->auth->user(); + } }