protected function _initialize(){
parent::_initialize(); //修改这里
define('USER_ID', Session::get('user_id'));
}
protected function isLogin()
{
if(empty(USER_ID)){
$this->error('用户未登录,无权访问',url('user/login'));
}
}
protected function alreadyLogin()
{
if(empty(USER_ID)){
$this->error('用户已经登录,请勿重复登录',url('index/index'));
}
}
index.html:1 Error in event handler for (unknown): TypeError: Cannot read property 'parentNode' of undefined出现这个报错信息,谢谢帮忙
empty换成defined