diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php index b68ecae7..8188197b 100644 --- a/application/admin/controller/Index.php +++ b/application/admin/controller/Index.php @@ -128,14 +128,12 @@ class Index extends Backend public function logout() { if ($this->request->isPost()) { + $this->token(); $this->auth->logout(); Hook::listen("admin_logout_after", $this->request); $this->success(__('Logout successful'), 'index/login'); } - $html = "
"; - $html .= ""; - - return $html; + return $this->view->fetch(); } } diff --git a/application/admin/lang/zh-cn/index.php b/application/admin/lang/zh-cn/index.php index dcb72058..8873cb66 100644 --- a/application/admin/lang/zh-cn/index.php +++ b/application/admin/lang/zh-cn/index.php @@ -37,6 +37,8 @@ return [ 'Please try again after 1 day' => '请于1天后再尝试登录', 'Login successful' => '登录成功!', 'Logout successful' => '退出成功!', + 'Are you sure you want to sign out?' => '确定要退出后台管理吗?', + 'Confirm sign out' => '确定退出', 'Verification code is incorrect' => '验证码不正确', 'Wipe cache completed' => '清除缓存成功', 'Wipe cache failed' => '清除缓存失败', diff --git a/application/admin/view/index/logout.html b/application/admin/view/index/logout.html new file mode 100644 index 00000000..2f6f908e --- /dev/null +++ b/application/admin/view/index/logout.html @@ -0,0 +1,47 @@ + + + + {include file="common/meta" /} + + + + +