正在显示
1 个修改的文件
包含
28 行增加
和
0 行删除
| @@ -24,6 +24,34 @@ class BaseController extends Controller | @@ -24,6 +24,34 @@ class BaseController extends Controller | ||
| 24 | protected $uid = 0; | 24 | protected $uid = 0; |
| 25 | protected $user = [];//当前登录用户详情 | 25 | protected $user = [];//当前登录用户详情 |
| 26 | /** | 26 | /** |
| 27 | + * 获取所有参数 | ||
| 28 | + */ | ||
| 29 | + public function __construct(Request $request) | ||
| 30 | + { | ||
| 31 | + $this->request = $request; | ||
| 32 | + $this->param = $this->request->all(); | ||
| 33 | + $this->token = $this->request->header('token'); | ||
| 34 | + if(!empty($this->token) && !empty(Cache::get($this->token))){ | ||
| 35 | + $info = Cache::get($this->token); | ||
| 36 | + $this->user = $info; | ||
| 37 | + $this->uid = $info['id']; | ||
| 38 | + //参数处理 | ||
| 39 | + $this->get_param(); | ||
| 40 | + //日志记录 | ||
| 41 | + $this->set_user_log(); | ||
| 42 | + } | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + /** | ||
| 46 | + * @name :ceshi | ||
| 47 | + * @author :lyh | ||
| 48 | + * @method :post | ||
| 49 | + * @time :2023/5/9 11:43 | ||
| 50 | + */ | ||
| 51 | + public function ceshi(){ | ||
| 52 | + | ||
| 53 | + } | ||
| 54 | + /** | ||
| 27 | * @name 参数过滤 | 55 | * @name 参数过滤 |
| 28 | * @return void | 56 | * @return void |
| 29 | * @author :liyuhang | 57 | * @author :liyuhang |
-
请 注册 或 登录 后发表评论