Common.php 638 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\home\controller;
  3. use think\Lang;
  4. use think\Cache;
  5. use think\Request;
  6. use think\Controller;
  7. use think\Validate;
  8. /**
  9. * 主页管理类
  10. */
  11. class Common extends Controller
  12. {
  13. /**
  14. * 构造函数
  15. *
  16. * @access public
  17. */
  18. public function __construct()
  19. {
  20. parent::__construct();
  21. $this->assign('user_info', $this->systemLogin());
  22. }// end__construct()
  23. protected final function systemLogin()
  24. {
  25. $user_info = array(
  26. 'user_id' => session('user_id'),
  27. 'user_email' => session('user_email'),
  28. );
  29. return $user_info;
  30. }
  31. }