From 67b3a4f7e2cafbb7676d01b157acf002efe1c278 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: Sat, 27 Mar 2021 11:12:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E9=94=81=E5=B1=8F=E5=B9=95=E6=89=93?= =?UTF-8?q?=E5=BC=80=E4=B8=8A=E6=AC=A1=E9=A1=B5=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/static/ruoyi/index.js | 1 + ruoyi-admin/src/main/resources/templates/index-topnav.html | 4 ++++ ruoyi-admin/src/main/resources/templates/index.html | 4 ++++ .../src/main/java/com/ruoyi/common/utils/StringUtils.java | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/index.js b/ruoyi-admin/src/main/resources/static/ruoyi/index.js index 23326c47..eae82b06 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/index.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/index.js @@ -501,6 +501,7 @@ $(function() { // 锁定屏幕 $('#lockScreen').on('click', function () { + storage.set('lockPath', $('.page-tabs-content').find('.active').attr('data-id')); location.href = ctx + "lockscreen"; }); diff --git a/ruoyi-admin/src/main/resources/templates/index-topnav.html b/ruoyi-admin/src/main/resources/templates/index-topnav.html index fe9f9320..b30a9866 100644 --- a/ruoyi-admin/src/main/resources/templates/index-topnav.html +++ b/ruoyi-admin/src/main/resources/templates/index-topnav.html @@ -379,6 +379,7 @@ function applyPath(url) { } $(function() { + var lockPath = storage.get('lockPath'); if($.common.equals("history", mode) && window.performance.navigation.type == 1) { var url = storage.get('publicPath'); if ($.common.isNotEmpty(url)) { @@ -386,6 +387,9 @@ $(function() { } else { $(".navbar-toolbar li a").eq(0).click(); } + } else if($.common.isNotEmpty(lockPath)) { + applyPath(lockPath); + storage.remove('lockPath'); } else { var hash = location.hash; if ($.common.isNotEmpty(hash)) { diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html index 13aac3b4..084dd9e4 100644 --- a/ruoyi-admin/src/main/resources/templates/index.html +++ b/ruoyi-admin/src/main/resources/templates/index.html @@ -321,11 +321,15 @@ function applyPath(url) { } $(function() { + var lockPath = storage.get('lockPath'); if($.common.equals("history", mode) && window.performance.navigation.type == 1) { var url = storage.get('publicPath'); if ($.common.isNotEmpty(url)) { applyPath(url); } + } else if($.common.isNotEmpty(lockPath)) { + applyPath(lockPath); + storage.remove('lockPath'); } else { var hash = location.hash; if ($.common.isNotEmpty(hash)) { diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java index 51174f1e..882e94a6 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java @@ -257,7 +257,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils } /** - * 下划线转驼峰命名 + * 驼峰转下划线命名 */ public static String toUnderScoreCase(String str) {