|
...
|
...
|
@@ -24,6 +24,34 @@ class BaseController extends Controller |
|
|
|
protected $uid = 0;
|
|
|
|
protected $user = [];//当前登录用户详情
|
|
|
|
/**
|
|
|
|
* 获取所有参数
|
|
|
|
*/
|
|
|
|
public function __construct(Request $request)
|
|
|
|
{
|
|
|
|
$this->request = $request;
|
|
|
|
$this->param = $this->request->all();
|
|
|
|
$this->token = $this->request->header('token');
|
|
|
|
if(!empty($this->token) && !empty(Cache::get($this->token))){
|
|
|
|
$info = Cache::get($this->token);
|
|
|
|
$this->user = $info;
|
|
|
|
$this->uid = $info['id'];
|
|
|
|
//参数处理
|
|
|
|
$this->get_param();
|
|
|
|
//日志记录
|
|
|
|
$this->set_user_log();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :ceshi
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/9 11:43
|
|
|
|
*/
|
|
|
|
public function ceshi(){
|
|
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @name 参数过滤
|
|
|
|
* @return void
|
|
|
|
* @author :liyuhang
|
...
|
...
|
|