From 48713329ecf03fa4dc807205a542073c92505b58 Mon Sep 17 00:00:00 2001 From: hujl Date: Mon, 20 Dec 2021 09:58:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E8=8F=9C=E5=8D=95=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/views/index.jsp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/index.jsp b/src/main/webapp/WEB-INF/views/index.jsp index 30681800..fd09e738 100644 --- a/src/main/webapp/WEB-INF/views/index.jsp +++ b/src/main/webapp/WEB-INF/views/index.jsp @@ -61,6 +61,8 @@ show: true//弹出对话框 }); //}, 14400000); + //跳转登录界面 + }else{ setTimeout(function () { $('#exampleModal').modal({ @@ -155,9 +157,15 @@ $("#stateBtn").click(function () { $('#exampleModal').modal('hide'); //手动关闭 - //跳转浏览器地址 - var loginUrl="http://<%=res.getString("POWER_IP")%>:<%=res.getString("POWER_PORT")%>/power"; - window.location.replace(loginUrl); + var loginUrl = "http://<%=res.getString("POWER_IP")%>:<%=res.getString("POWER_PORT")%>/power"; + if (${menuList == null}) { + //最外层的页面跳转跳转浏览器地址 + top.location.href = loginUrl; + }else { + //跳转浏览器地址 + + window.location.replace(loginUrl); + } }); $("ul.treeview-menu li").on({