This commit is contained in:
2025-05-19 13:38:12 +08:00
parent c7efc41b0f
commit 36894647b7
17 changed files with 2358 additions and 989 deletions

View File

@@ -50,6 +50,19 @@ var Jour_num = localStorage.Journals_num;
// tab选项卡
$(document).ready(function () {
// 检查 URL 是否包含参数 pre
const urlParams = new URLSearchParams(window.location.search);
const isPre = urlParams.has('preview');
if (isPre) {
// 页面带了 ?pre 参数,始终执行以下操作
$(".left").css("width", "100%");
$(".right").hide();
}
const element = document.querySelector('.act_chajian'); // 选择 .act_chajian 元素
if (element) {
element.remove(); // 删除该元素
}
$("#tablist li").each(function (index) {
$(this).click(function () {
console.log('this at line 54:', this);
@@ -62,15 +75,15 @@ $(document).ready(function () {
$(".content-box>div").eq(index).addClass("contentin");
$(this).addClass("tabin");
// 判断当前点击的 <li> 是否具有 'tarhtmn' 类名
if ($(this).hasClass('tarhtmn')) {
// 设置当前点击的 <li> 宽度为 100%
$(".left").css("width", "100%");
$(".right").hide(); // 隐藏 .right 标签
} else {
// 移除当前点击的 <li> 宽度样式
$(".left").css("width", "");
$(".right").show(); // 恢复显示 .right 标签
// 如果不包含 pre 参数,才根据点击项控制显示逻辑
if (!isPre) {
if ($(this).hasClass('tarhtmn')) {
$(".left").css("width", "100%");
$(".right").hide();
} else {
$(".left").css("width", "");
$(".right").show();
}
}
});
});
@@ -79,6 +92,7 @@ $(document).ready(function () {
//返回顶部
$.goup({
trigger: 100,