From 26159a209551bbb8841e6372135c883750a615ff Mon Sep 17 00:00:00 2001 From: Karson Date: Tue, 20 May 2025 15:26:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=8E=E5=8F=B0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=88=B7=E6=96=B0=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/js/backend/index.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/public/assets/js/backend/index.js b/public/assets/js/backend/index.js index 09c5b3ef..1b8d5eb3 100755 --- a/public/assets/js/backend/index.js +++ b/public/assets/js/backend/index.js @@ -222,16 +222,12 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi //如果是刷新操作则直接返回刷新前的页面 if (Config.referer) { - if (Config.referer === $(addtabs).attr("url")) { - var active = $("ul.sidebar-menu li a[addtabs=" + $(addtabs).attr("addtabs") + "]"); - if (multiplenav && active.length == 0) { - active = $("ul li a[addtabs='" + $(addtabs).attr("addtabs") + "']"); - } - if (active.length > 0) { - active.trigger("click"); - } else { - $(addtabs).appendTo(document.body).addClass("hide").trigger("click"); - } + var active = $("ul.sidebar-menu li a[url='" + Config.referer + "']"); + if (multiplenav && active.length === 0) { + active = $("ul li a[url='" + Config.referer + "']"); + } + if (active.length > 0) { + active.trigger("click"); } else { //刷新页面后跳到到刷新前的页面 Backend.api.addtabs(Config.referer); @@ -333,7 +329,7 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi // 切换菜单栏 $(document).on("click", ".sidebar-toggle", function () { - setTimeout(function(){ + setTimeout(function () { var value = $("body").hasClass("sidebar-collapse") ? 1 : 0; setTimeout(function () { $(window).trigger("resize");