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) {