123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- /**
- * @Created by PhpStorm
- * @author: Kirin
- * @day: 2024/11/20
- * @time: 11:24
- */
- namespace app\common;
- use app\Request;
- use qiniu\basic\BaseController;
- abstract class ApiBaseController extends BaseController
- {
- /**
- * 当前登陆用户信息
- * @var
- */
- protected $userInfo;
- /**
- * 当前登陆用户ID
- * @var
- */
- protected $uid;
- protected $service = null;
- /**
- * 初始化
- */
- public function __construct(Request $request)
- {
- parent::__construct($request);
- $this->initialize();
- }
- protected function initialize()
- {
- $this->uid = $this->request->uid();
- $this->userInfo = $this->request->user();
- }
- }
|