From 0520aac45a37f987842e27c950c30987b41b8d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E6=9D=BE?= <599194993@qq.com> Date: Mon, 25 Mar 2024 11:40:25 +0800 Subject: [PATCH] fix logout bug. --- simpleui/static/admin/simpleui-x/js/index.js | 5 ++++- simpleui/templates/admin/index.html | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/simpleui/static/admin/simpleui-x/js/index.js b/simpleui/static/admin/simpleui-x/js/index.js index 8a38509e..df819e0a 100644 --- a/simpleui/static/admin/simpleui-x/js/index.js +++ b/simpleui/static/admin/simpleui-x/js/index.js @@ -574,7 +574,10 @@ delete sessionStorage['tabs']; setCookie('theme', ''); setCookie('theme_name', ''); - window.location.href = window.urls.logout; + + //创建一个form post方式提交 + document.querySelector("#logout_form").submit(); + // window.location.href = window.urls.logout; }).catch(function () { }); diff --git a/simpleui/templates/admin/index.html b/simpleui/templates/admin/index.html index 51ecd49d..05db6cf3 100755 --- a/simpleui/templates/admin/index.html +++ b/simpleui/templates/admin/index.html @@ -291,6 +291,9 @@ {% endblock %} + {% block base_script %}