From 467b193037e485d2c1d9735629639869a79ffd03 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Sat, 9 Nov 2019 15:35:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->=E9=80=80?= =?UTF-8?q?=E5=87=BA=E7=99=BB=E5=BD=95--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Model/PromoteModel.class.php | 9 +++++++++ Application/Home/Controller/IndexController.class.php | 9 +++++++++ Application/Home/View/default/Public/promote_base.html | 2 +- Application/User/Api/PromoteApi.class.php | 7 +++++++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Model/PromoteModel.class.php b/Application/Admin/Model/PromoteModel.class.php index 06b86a48f..40d0da370 100644 --- a/Application/Admin/Model/PromoteModel.class.php +++ b/Application/Admin/Model/PromoteModel.class.php @@ -161,6 +161,15 @@ class PromoteModel extends Model{ session('promote_auth_sign', data_auth_sign($auth)); } + + /** + * 退出登录 + */ + public function logout(){ + session('promote_auth', null); + session('promote_auth_sign', null); + session('game_divide_second_pwd', null); + } /** * 验证用户密码 diff --git a/Application/Home/Controller/IndexController.class.php b/Application/Home/Controller/IndexController.class.php index f5e2133b5..7f311defd 100644 --- a/Application/Home/Controller/IndexController.class.php +++ b/Application/Home/Controller/IndexController.class.php @@ -283,4 +283,13 @@ class IndexController extends HomeController $this->assign('data', $data); $this->display(); } + + /** + * 退出登录 + */ + public function logout(){ + $Promote = new PromoteApi(); + $Promote->logout(); + redirect(U('Index/index')); + } } diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html index 1ea544a54..e8ec02634 100644 --- a/Application/Home/View/default/Public/promote_base.html +++ b/Application/Home/View/default/Public/promote_base.html @@ -148,7 +148,7 @@
diff --git a/Application/User/Api/PromoteApi.class.php b/Application/User/Api/PromoteApi.class.php index d57581935..e527967fc 100644 --- a/Application/User/Api/PromoteApi.class.php +++ b/Application/User/Api/PromoteApi.class.php @@ -76,6 +76,13 @@ class PromoteApi extends Api{ public function login($username, $password){ return $this->model->login($username, $password); } + + /** + * 退出登录 + */ + public function logout(){ + $this->model->logout(); + } /** *添加推广员