This commit is contained in:
那些花儿
2025-08-04 09:16:18 +08:00
parent dca6d841ba
commit 58be444981
6 changed files with 800 additions and 266 deletions
@@ -549,6 +549,42 @@
display: none;
}
}
/* 页脚样式 */
.v4-footer {
background: var(--color-primary);
padding: 30px 0;
}
.v4-footer-bottom {
max-width: 1500px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 16px;
}
.v4-footer-copyright p {
margin: 4px 0;
color: #fff;
}
.v4-footer-tech {
color: #fff;
}
.v4-footer-tech a {
color: #fff;
text-decoration: none;
margin-left: 4px;
}
.v4-footer-tech a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
@@ -559,7 +595,7 @@
</div>
<nav class="v4-nav">
<a href="/platform/v4/home" data-pjax class="v4-nav-item">
<a href="/platform/v4/home2" data-pjax class="v4-nav-item">
<i class="fa fa-home"></i>
首页
</a>
@@ -596,9 +632,36 @@
<div class="ele-body" id="container">${layoutContent}</div>
</main>
<!-- 页脚 -->
<footer class="v4-footer" id="v4-footer" style="display: none;">
<div class="v4-footer-bottom">
<div class="v4-footer-copyright">
<p>&copy; 2025 武汉地大三思科技有限公司. 保留所有权利.</p>
<p>ICP备案号:のICP备12345678号-1 | 版本号:v4.0.0</p>
</div>
<div class="v4-footer-tech">
<span>技术支持:</span>
<a href="http://www.3sgo.cn/" target="_blank">武汉地大三思科技有限公司</a>
</div>
</div>
</footer>
<script>
// 处理导航项的active状态
$(document).ready(function () {
// 控制页脚显示的函数
function toggleFooter() {
var currentPath = window.location.pathname
var footer = $("#v4-footer")
if (currentPath === "/platform/v4/home2") {
footer.show()
} else {
footer.hide()
}
}
// 初始化:根据当前URL设置active状态
function setActiveNavItem() {
var currentPath = window.location.pathname
@@ -610,8 +673,9 @@
})
}
// 页面加载时设置active状态
// 页面加载时设置active状态和页脚显示
setActiveNavItem()
toggleFooter()
// 为导航项添加点击事件
$(".v4-nav-item").on("click", function () {
@@ -630,6 +694,7 @@
// 使用pjax的事件来处理导航切换
$(document).on("pjax:complete", function () {
setActiveNavItem()
toggleFooter()
})
})
</script>