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 @@
今天是: 您好!{:session('promote_auth.account')} - +
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(); + } /** *添加推广员