AuthController.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. declare (strict_types = 1);
  3. // +----------------------------------------------------------------------
  4. // | [ WE CAN DO IT MORE SIMPLE ]
  5. // +----------------------------------------------------------------------
  6. // | Copyright (c) 2018-2020 rights reserved.
  7. // +----------------------------------------------------------------------
  8. // |
  9. // +----------------------------------------------------------------------
  10. // | Date: 2020-08-25 17:23
  11. // +----------------------------------------------------------------------
  12. namespace app\system\controller;
  13. /**
  14. * 基类 所有控制器继承的类
  15. * Class AuthController
  16. * @package app\adminapi\controller
  17. */
  18. class AuthController extends \app\BaseController
  19. {
  20. /**
  21. * 当前登陆管理员信息
  22. * @var
  23. */
  24. protected $adminInfo;
  25. /**
  26. * 当前登陆管理员ID
  27. * @var
  28. */
  29. protected $adminId;
  30. /**
  31. * 当前管理员权限
  32. * @var array
  33. */
  34. protected $auth = [];
  35. /**
  36. * 模型类名
  37. * @var null
  38. */
  39. protected $bindModel = null;
  40. /**
  41. * 初始化
  42. */
  43. protected function initialize()
  44. {
  45. parent::initialize();
  46. $this->adminInfo = $this->request->adminInfo;
  47. event('AdminVisit', [$this->adminInfo, 'system']);
  48. }
  49. }