| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- // +----------------------------------------------------------------------
- // | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
- // +----------------------------------------------------------------------
- // | Released under the MIT License.
- // +----------------------------------------------------------------------
- // | Author: 老猫 <thinkcmf@126.com>
- // +----------------------------------------------------------------------
- namespace app\index\controller;
- use app\index\service\PRedis;
- use cmf\controller\HomeBaseController;
- class LoginController extends HomeBaseController
- {
- public function index()
- {
- return $this->fetch();
- }
- /**
- * 退出登录
- */
- public function logout(){
- $cacheKey = md5(session('UID').'qxq');
- PRedis::del($cacheKey);
- session('UID', 0);
- $this->redirect(url('/index/login/index'));
- }
- public function test(){
- return $this->fetch();
- }
- }
|