12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace app\home\controller;
- use app\common\controller\ControllerBase;
- class HomeBase extends ControllerBase
- {
-
- protected $title = '';
-
- public function __construct()
- {
-
- parent::__construct();
-
- $this->initBaseInfo();
- }
-
- final private function initBaseInfo()
- {
-
- if(session('user_info.id') < 1)
- {
- $this->jump(RESULT_ERROR,'请登录', url('login/index'));
- }
-
- if(session('user_info.id') > 0)
- {
- $this->assign('user_info', session('user_info'));
- }
- }
- }
|