2019-12-02 23:04:43 +08:00
|
|
|
<?php
|
|
|
|
namespace app;
|
|
|
|
|
|
|
|
// 应用请求对象类
|
|
|
|
|
2020-01-08 22:43:40 +08:00
|
|
|
use catcher\CatchAuth;
|
2019-12-12 18:52:11 +08:00
|
|
|
|
2019-12-02 23:04:43 +08:00
|
|
|
class Request extends \think\Request
|
|
|
|
{
|
2020-01-08 22:43:40 +08:00
|
|
|
protected $auth;
|
|
|
|
|
2019-12-12 18:52:11 +08:00
|
|
|
public function user()
|
|
|
|
{
|
2020-01-08 22:43:40 +08:00
|
|
|
if (!$this->auth) {
|
|
|
|
$this->auth = new CatchAuth;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->auth->user();
|
2019-12-12 18:52:11 +08:00
|
|
|
}
|
2019-12-02 23:04:43 +08:00
|
|
|
}
|