Skip to content

Commit

Permalink
20230508
Browse files Browse the repository at this point in the history
  • Loading branch information
helloxz committed May 8, 2023
1 parent f34b9fa commit ca46009
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
3 changes: 2 additions & 1 deletion data/update.log
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,5 @@ CREATE INDEX on_options_key_IDX ON on_options ("key");

20230507
1. 修复平板电脑登录时循环重定向的BUG
2. 优化了后台页面,去除了顶部重复按钮,添加了加群按钮
2. 优化了后台页面,去除了顶部重复按钮,添加了加群按钮
3. 后台左侧导航栏,点击后高亮显示
29 changes: 26 additions & 3 deletions templates/admin/static/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){
var url = '<a target = "_blank" href = "' + d.url + '" title = "' + d.url + '">' + d.url + '</a>';
return url;
}}
,{field: 'title', title: '链接标题', width:140}
,{field: 'title', title: '链接标题', width:140,edit: 'text'}
,{field: 'add_time', title: '添加时间', width:148, sort: true,templet:function(d){
var add_time = timestampToTime(d.add_time);
return add_time;
Expand All @@ -525,7 +525,7 @@ layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){
}

}}
,{field: 'weight', title: '权重', width: 75,sort:true}
,{field: 'weight', title: '权重', width: 75,sort:true,edit: 'text'}
,{field: 'property', title: '私有', width: 80, sort: true,templet: function(d){
if(d.property == 1) {
return '<button type="button" class="layui-btn layui-btn-xs">是</button>';
Expand Down Expand Up @@ -1150,4 +1150,27 @@ function del_link_icon(){
layer.msg(data.msg,{icon:5});
}
});
}
}

$(document).ready(function() {
// 获取当前页面的 URL
var currentUrl = window.location.href;

// 遍历导航栏菜单的子菜单项
$('.layui-nav-child dd a').each(function() {
var $this = $(this);
var linkUrl = $this.attr('href');

// 如果子菜单项的链接与当前页面的 URL 匹配,则为该子菜单项添加 'layui-this' 类
if (currentUrl.indexOf(linkUrl) !== -1) {
// 移除其他菜单项的 'layui-this' 类
$('.layui-nav-child dd').removeClass('layui-this');

// 为匹配的子菜单项添加 'layui-this' 类
$this.parent().addClass('layui-this');

// 结束遍历
return false;
}
});
});

0 comments on commit ca46009

Please sign in to comment.