thinkphp5 不刷新退出

控制器:
/**
* 退出登录
*/
public function logout()
{
Session::delete('user_id');
Session::delete('user_name');
// $this->success('退出成功', 'Index/index/index');
$this->redirect('home/index/index','退出成功');
}
前台:
<a href="{:url('home/login/logout')}" id="login_out">退出登录</a>。
posted @ 2017-06-19 15:09  摘星怪丶  阅读(363)  评论(0编辑  收藏  举报