修改request

This commit is contained in:
wuyanwen
2020-01-08 22:43:40 +08:00
parent a5242b3aea
commit e5c8c71011
3 changed files with 96 additions and 2 deletions

View File

@@ -3,12 +3,18 @@ namespace app;
// 应用请求对象类
use catchAdmin\user\Auth;
use catcher\CatchAuth;
class Request extends \think\Request
{
protected $auth;
public function user()
{
return Auth::user();
if (!$this->auth) {
$this->auth = new CatchAuth;
}
return $this->auth->user();
}
}