首页、登录页完成
This commit is contained in:
1 parent
af94de400d
commit
dfd92b846c
9 files changed
+101
-138
No files matched your search
@@ -63,6 +63,7 @@ class Index extends Base
|
||||
// 查询用户登录次数
|
||||
$admin = new \app\admin\model\Admin;
|
||||
$userid = session('userid');
|
||||
$list['username'] = session('username');
|
||||
$list['denglu'] = $admin->where('id',$userid)
|
||||
->field('denglucishu,lastip,lasttime')
|
||||
->find();
|
||||
@@ -86,19 +87,4 @@ class Index extends Base
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
public function exit()
|
||||
{
|
||||
// 清除cookie
|
||||
cookie(null, 'think_');
|
||||
// 清除session(当前作用域)
|
||||
session(null);
|
||||
|
||||
// 跳转页面
|
||||
$this->redirect('/login');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user