uid = Dever::load('user/lib/info')->check(false); if ($this->uid <= 0) { $this->uid = Dever::db('user/info')->config['auto']; } $this->user = Dever::load('user/lib/info')->get($this->uid); if ($this->user) { $this->user['uid'] = $this->user['id']; } if ($this->login) { $this->checkLogin(); } } public function checkLogin() { if (!$this->uid || $this->uid <= 0) { Dever::alert('请先登录', -2); } } }