From dd19eab5d5ea44166ce723ad29ad2e343fa83e48 Mon Sep 17 00:00:00 2001 From: "mengkang.zmk" Date: Thu, 16 Jun 2022 14:09:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/templates/admin/admin_modify_password.html | 7 +++++-- assets/templates/index/index.html | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/assets/templates/admin/admin_modify_password.html b/assets/templates/admin/admin_modify_password.html index 7125c63..d9c47a5 100644 --- a/assets/templates/admin/admin_modify_password.html +++ b/assets/templates/admin/admin_modify_password.html @@ -132,8 +132,11 @@ okay: { text: '关闭', action: function () { - parent.window.close(); - window.open("/login"); + if (window.frames.length !== parent.frames.length) { + parent.window.open("/login",'_self'); + }else{ + window.open("/login",'_self'); + } } } } diff --git a/assets/templates/index/index.html b/assets/templates/index/index.html index 1b22b4e..43b5347 100644 --- a/assets/templates/index/index.html +++ b/assets/templates/index/index.html @@ -281,8 +281,11 @@ $.cookie('_nav_title_', ''); $.cookie('_login_token_', ''); - parent.window.close(); - window.open("/login"); + if (window.frames.length !== parent.frames.length) { + parent.window.open("/login",'_self'); + }else{ + window.open("/login",'_self'); + } }, function (response) { AjaxError(response);