"
);
$(".tools-item > .searchRouter").click(function() {
var url =
"/_web/_search/api/search/new.rst?locale=zh_CN&request_locale=zh_CN&context=&_p=YXM9NTkmdD0xOTg2JmQ9Njg0NCZwPTEmbT1OJg__"
locations.href = url
})
$("#searchRouterss").click(function() {
var url =
"/_web/_search/api/search/new.rst?locale=zh_CN&request_locale=zh_CN&context=&_p=YXM9NTkmdD0xOTg2JmQ9Njg0NCZwPTEmbT1OJg__"
locations.href = url
})
$("#searchRoutersss").click(function() {
var url =
"/_web/_search/api/search/new.rst?locale=zh_CN&request_locale=zh_CN&context=&_p=YXM9NTkmdD0xOTg2JmQ9Njg0NCZwPTEmbT1OJg__"
locations.href = url
})
$("#searchRouters").click(function() {
var url =
"/_web/_search/api/search/new.rst?locale=zh_CN&request_locale=zh_CN&context=&_p=YXM9NTkmdD0xOTg2JmQ9Njg0NCZwPTEmbT1OJg__"
locations.href = url
})
$('.slick-banner').slick({
autoplay: true,
arrows: false,
dots: true,
customPaging: function customPaging(slider, i) {
return "
".concat("");
}
}); ///
// 学院新闻查看更多
$('#clickRightStor').click(function() {
$(" #ceshi > .more > .more-link > .moretext").trigger('click');
})
// 通知公告查看更多
$('#notice').click(function() {
$(" .big > .kd > .ul > .more > .more-link > .moretext").trigger('click');
})
// 专题专栏查看更多
$('#moreClic1').click(function() {
$(" .more1 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic2').click(function() {
$(" .more2 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic3').click(function() {
$(" .more3 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic4').click(function() {
$(" .more4 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic5').click(function() {
$(" .more5 > .more > .more-link > .moretext").trigger('click');
})
// $('#moreClic6').click(function() {
// $(" .more6 > .more > .more-link > .moretext").trigger('click');
// })
$('#moreClic6').click(function() {
locations.href='/__xh__/csun.upc.edu.cn/_s59/_t1986/hdzq/list.psp';
});
$('#moreClic7').click(function() {
$(" .more7 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic8').click(function() {
$(" .more8 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic9').click(function() {
$(" .more9 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic10').click(function() {
$(" .more10 > .more > .more-link > .moretext").trigger('click');
})
$('#notice').click(function() {
$(" .big > .kd > .ul > .more > .more-link > .moretext").trigger('click');
})
// 专题专栏查看更多
$('#moreClic1s').click(function() {
$(" .more1 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic2s').click(function() {
$(" .more2 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic3s').click(function() {
$(" .more3 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic4s').click(function() {
$(" .more4 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic5s').click(function() {
$(" .more5 > .more > .more-link > .moretext").trigger('click');
})
// $('#moreClic6s').click(function() {
// $(" .more6 > .more > .more-link > .moretext").trigger('click');
// })
$('#moreClic6s').click(function() {
locations.href='/__xh__/csun.upc.edu.cn/_s59/_t1986/hdzq/list.psp';
});
$('#moreClic7s').click(function() {
$(" .more7 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic8s').click(function() {
$(" .more8 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic9s').click(function() {
$(" .more9 > .more > .more-link > .moretext").trigger('click');
})
$('#moreClic10s').click(function() {
$(" .more10 > .more > .more-link > .moretext").trigger('click');
})
// 院部动态查看更多
$('#xueshu').click(function() {
// window.locations.href="/__xh__/wzqlogin2.upc.edu.cn/_s104/xsxxwxw/list.psp"
$(".dynamicsUl > .more > .more-link > .moretext").trigger('click');
})
// 通知公告
$('.home1 > .unit2 > .ul > .li').hover(function() {
$(this).find('.d').css('background-image', 'url(/__xh__/csun.upc.edu.cn/_upload/tpl/07/c2/1986/template1986/../image/tzgg_2.png)');
}, function() {
$(this).find('.d').css('background-image', 'url(/__xh__/csun.upc.edu.cn/_upload/tpl/07/c2/1986/template1986/../image/tzgg_1.png)');
});
// 点击收起展开
$(".img_mod").click(function() {
var $container = $(".tools-mod");
var $content1 = $(".tools-mod_div1");
var $content2 = $(".tools-mod_div2");
var $content3 = $(".tools-mod_div3");
// var $content4 = $(".tools-mod_div4");
if ($container.hasClass("collapsed")) {
// 展开特效
$container.removeClass("collapsed").css("height", "180px");
$content1.animate({
opacity: 1
}, 500);
$content2.animate({
opacity: 1
}, 500);
$content3.animate({
opacity: 1
}, 500);
// $content4.animate({
// opacity: 1
// }, 500);
// 图片旋转特效
$(".img_mod").css("transform", "rotate(0deg)");
} else {
// 收起特效
$content1.animate({
opacity: 0
}, 600, function() {
$container.addClass("collapsed").css("height", "25px");
});
$content2.animate({
opacity: 0
}, 600, function() {
$container.addClass("collapsed").css("height", "25px");
});
$content3.animate({
opacity: 0
}, 600, function() {
$container.addClass("collapsed").css("height", "25px");
});
// $content4.animate({
// opacity: 0
// }, 600, function() {
// $container.addClass("collapsed").css("height", "25px");
// });
// 图片旋转特效
$(".img_mod").css("transform", "rotate(180deg)");
}
});
// 数据追加
// $('.list-item').each(function() {
// // 获取当前列表项中的数据
// var times = $(this).find('.d').text();
// // 将数据赋值给另一个盒子
// var convertedDate = convertToDate(times);
// $('.times').text(convertedDate);
// });
// 为列表项添加鼠标移入事件监听器
$('.list-item').mouseover(function() {
// 获取当前列表项中的数据
var title = $(this).find('.t').text();
var content = $(this).find('.p').text();
var time = $(this).find('.noticeTime').text();
var image = $(this).find('.i').attr('src');
// 如果image为空,则设置默认图片
if (!image) {
image =
'/_upload/article/images/01/f0/b5ff24cc49d7934cf73999b94db3/e9306760-ad27-4ff7-ad58-887cad09e0ed.png';
}
// 将数据赋值给另一个盒子
$('.outputTitle').text(title);
$('.outputContent').text(content);
$('.outputImage').html('

');
$('.time').text(time);
});
$('.tt a').mouseover(function() {
var link = $(this).attr('href');
$('.output a').attr('href', link);
});
var link = $('.tt a').attr('href');
$('.href_div a').attr('href', link);
// 经过后的日期
setTimeout(function() {
var noticeTimeArr = $('.noticeTime');
var noticeTimeDayArr = $('.noticeTimeDay');
var noticeTimeMonthArr = $('.noticeTimeMonth');
for (var i = 0; i < noticeTimeArr.length; i++) {
var noticeTimeStrArr = $(noticeTimeArr[i]).text().split('-');
$(noticeTimeDayArr[i]).text(noticeTimeStrArr[2]);
$(noticeTimeMonthArr[i]).text('' + noticeTimeStrArr[0] + '-' + noticeTimeStrArr[1]);
}
}, 50);
// 默认日期
setTimeout(function() {
var releaseTimeArrs = $('.releaseTime');
var releaseMonthDateArrs = $('.releaseMonthDate');
for (var i = 0; i < releaseTimeArrs.length; i++) {
var noticeTimeStrArrs = $(releaseTimeArrs[i]).text().split('-');
$(releaseMonthDateArrs[i]).text('' + noticeTimeStrArrs[1] + '-' + noticeTimeStrArrs[2]);
}
}, 50);
// 默认日期
setTimeout(function() {
var noticeTimeArrs = $('.noticeTimes');
var noticeTimeMonthArrs = $('.noticeTimeMonths');
for (var i = 0; i < noticeTimeArrs.length; i++) {
var noticeTimeStrArrs = $(noticeTimeArrs[i]).text().split('-');
$(noticeTimeMonthArrs[i]).text('' + noticeTimeStrArrs[1] + '-' + noticeTimeStrArrs[2]);
}
}, 50);
// 触发默认经过事件
$('.list-item').eq(0).trigger('mouseenter');
// 通知公告
var originalBackground = $('.li .transform').css('background-image');
var originalColor = $('.li .transform .yearMonth').css('color');
var originalColors = $('.li .transform .day').css('color');
var originalColorss = $('.li .transform .span_s').css('color');
$('.li').hover(
function() {
$(this).find('.transform').css('background-image', 'url(/__xh__/csun.upc.edu.cn/_upload/tpl/07/c2/1986/template1986/images/icon6.png)');
// $(this).find('.yearMonth').css('color', '#ffffff');
// $(this).find('.day').css('color', '#ffffff');
// $(this).find('.span_s').css('color', '#ffffff');
},
function() {
$(this).find('.transform').css('background-image', 'url(/__xh__/csun.upc.edu.cn/_upload/tpl/07/c2/1986/template1986/images/icon6.png)');
// $(this).find('.yearMonth').css('color', '#0044b4');
// $(this).find('.day').css('color', '#909090');
// $(this).find('.span_s').css('color', '#0B8EEF');
}
);
// 视差
//滚动视差
// var $window = $(window);
// var $bgobj = $('#parallax');
// $(window).scroll(function() {
// var scrollTop = $(document).scrollTop();
// var speed = $bgobj.data('speed');
// var yPos = -(scrollTop / speed);
// var coords = '50% ' + yPos + 'px';
// $bgobj.css('background-position', coords);
// });
// 点击跳转教师名录1
$('.search-btn').click(function() {
var firstName = $('#search-input').val();
sessionStorage.setItem('firstName', firstName);
window.locations.href='/__xh__/computer.upc.edu.cn/_s104/_t1903/jsml/list.psp?firstName=' +
encodeURIComponent(firstName);
});
// 点击跳转教师名录2
$('.search-btns').click(function() {
var firstName = $('#search-inputs').val();
sessionStorage.setItem('firstName', firstName);
window.locations.href='/__xh__/computer.upc.edu.cn/_s104/_t1903/jsml/list.psp?firstName=' +
encodeURIComponent(firstName);
});
// 点击title跳转
$('.search_name span').click(function() {
var selectedDepartment = $(this).text();
sessionStorage.setItem('selectedDepartment', selectedDepartment);
window.locations.href='/__xh__/computer.upc.edu.cn/_s104/_t1903/jsml/list.psp';
});
// 滑动出现
// 监听 #xBody 的滚动事件
// $('#xBody').scroll(function() {
// // 获取 #xBody 的滚动位置
// var scrollPosition = $(this).scrollTop(); // 获取 #xBody 当前的滚动位置
// var windowHeight = $(this).outerHeight(); // 获取 #xBody 的高度
// $(".fade-up").each(function() {
// var offset = $(this).position().top; // 获取每个 fade-up 元素相对于 #xBody 的位置
// // 判断每个 fade-up 元素是否进入可视区域
// if (scrollPosition + windowHeight > offset) {
// $(this).addClass("fade-in");
// }
// });
// });
// 监听 #xBody 的滚动事件
$('#xBody').scroll(function() {
var scrollPosition = $(this).scrollTop();
var windowHeight = $(this).outerHeight();
// 设置调整参数
var divisor = 100; // 或其他值
var maxBgPosition = 68;
var minBgPosition = 40;
var bgPositionY = Math.max(minBgPosition, Math.min(maxBgPosition, maxBgPosition - (
scrollPosition / divisor)));
$('#top-slider .slider-bg').css('background-position', '0 ' + bgPositionY + '%');
$(".fade-up").each(function() {
var offset = $(this).position().top;
if (scrollPosition + windowHeight > offset) {
$(this).addClass("fade-in");
}
});
});
// 多彩计科
// 监听 #xBody 的滚动事件
$('#xBody').scroll(function() {
// 获取 #xBody 的滚动位置
var scrollPosition = $(this).scrollTop(); // 获取内部元素的当前滚动位置
var windowHeight = $(this).outerHeight(); // 获取 #xBody 的高度
// 处理 .fade-ups
$(".fade-ups").each(function() {
var offset = $(this).position().top; // 获取相对于 #xBody 的位置
if (scrollPosition > offset - windowHeight) {
$(this).addClass("fade-ins");
}
});
// 处理 .slide-left
$(".slide-left").each(function() {
var offset = $(this).position().top; // 获取相对于 #xBody 的位置
if (scrollPosition > offset - windowHeight) {
$(this).addClass("fade-ins");
}
});
// 处理 .slide-right
$(".slide-right").each(function() {
var offset = $(this).position().top; // 获取相对于 #xBody 的位置
if (scrollPosition > offset - windowHeight) {
$(this).addClass("fade-ins");
}
});
});
// 底部快捷方式
window.addEventListener('scroll', function() {
var links = document.querySelectorAll('.unit .link');
for (var i = 0; i < links.length; i++) {
var link = links[i];
var bounding = link.getBoundingClientRect();
if (
bounding.top >= 0 &&
bounding.left >= 0 &&
bounding.right <= (window.innerWidth || document.documentElement.clientWidth) &&
bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight)
) {
if (!link.classList.contains('visible')) {
link.classList.add('visible');
}
} else {
link.classList.remove('visible');
}
}
});
// $(function() {
// const scrollAnim = document.querySelector(".scroll-anim");
// const contentasd = document.querySelector(".contentasd");
// window.addEventListener("scroll", function() {
// const scrollY = window.scrollY;
// if (scrollY > 0) {
// scrollAnim.classList.add("active");
// contentasd.classList.add("scroll-anim");
// contentasd.style.animation = "slideInDown 0.5s"; // 自上而下显示的动画效果
// } else {
// scrollAnim.classList.remove("active");
// contentasd.style.animation = "slideOutUp 0.5s"; // 自下而上隐藏的动画效果
// }
// });
// });
});
function funasd() {
const scrollAnim = document.querySelector(".contentasd");
scrollAnim.classList.remove("scroll-anim");
}
function Carousel(container) {
this.container = container;
this.slides = container.querySelector('.slides');
this.slideCount = this.slides.children.length;
this.currentIndex = 0;
this.autoPlayInterval = null;
this.initDots();
this.addEventListeners();
this.startAutoPlay();
}
// 初始化 dots
Carousel.prototype.initDots = function() {
var dotsContainer = this.container.querySelector('.dots');
var dotsHTML = '';
for (var i = 0; i < this.slideCount; i++) {
dotsHTML += '
';
}
dotsContainer.innerHTML = dotsHTML;
};
// 添加事件监听器
Carousel.prototype.addEventListeners = function() {
var self = this;
// 兼容性事件绑定
function addEvent(element, event, handler) {
if (element.addEventListener) {
element.addEventListener(event, handler, false);
} else if (element.attachEvent) {
element.attachEvent('on' + event, handler);
}
}
var prevBtn = this.container.querySelector('.prev');
var nextBtn = this.container.querySelector('.next');
var dotsContainer = this.container.querySelector('.dots');
addEvent(prevBtn, 'click', function() {
self.prevSlide();
});
addEvent(nextBtn, 'click', function() {
self.nextSlide();
});
addEvent(dotsContainer, 'click', function(e) {
e = e || window.event;
var target = e.target || e.srcElement;
if (target.className.indexOf('dot') !== -1) {
var index = parseInt(target.getAttribute('data-index'));
self.goToSlide(index);
}
});
// 新增鼠标悬停控制
addEvent(this.container, 'mouseenter', function() {
self.stopAutoPlay();
});
addEvent(this.container, 'mouseleave', function() {
self.startAutoPlay();
});
};
// 更新轮播状态
Carousel.prototype.update = function() {
// 兼容性处理 transform
var transformValue = 'translateX(-' + (this.currentIndex * 100) + '%)';
this.slides.style.transform = transformValue;
this.slides.style.webkitTransform = transformValue; // 兼容 WebKit 内核
this.slides.style.msTransform = 'translateX(-' + (this.currentIndex * 100) + '%)'; // 兼容 IE
var dots = this.container.querySelectorAll('.dot');
for (var i = 0; i < dots.length; i++) {
var dot = dots[i];
if (i === this.currentIndex) {
dot.className = dot.className.replace(/\bactive\b/g, '') + ' active';
} else {
dot.className = dot.className.replace(/\bactive\b/g, '');
}
}
};
// 下一张幻灯片
Carousel.prototype.nextSlide = function() {
this.currentIndex = (this.currentIndex + 1) % this.slideCount;
this.update();
};
// 上一张幻灯片
Carousel.prototype.prevSlide = function() {
this.currentIndex = (this.currentIndex - 1 + this.slideCount) % this.slideCount;
this.update();
};
// 跳转到指定幻灯片
Carousel.prototype.goToSlide = function(index) {
this.currentIndex = index;
this.update();
};
// 开始自动轮播
Carousel.prototype.startAutoPlay = function() {
var self = this;
this.autoPlayInterval = setInterval(function() {
self.nextSlide();
}, 5000);
};
// 停止自动轮播
Carousel.prototype.stopAutoPlay = function() {
clearInterval(this.autoPlayInterval);
};
// 初始化轮播
new Carousel(document.querySelector('.carousel'));
setTimeout(function() {
var noticeTimeArr = $('.dynamics')
var noticeTimeDayArr = $('.dynamicsYearMonth')
var noticeTimeMonthArr = $('.dynamicsDay')
for (var i = 0; i < noticeTimeArr.length; i++) {
var noticeTimeStrArr = $(noticeTimeArr[i]).text().split('-')
$(noticeTimeMonthArr[i]).text('' + noticeTimeStrArr[1] + '/' + noticeTimeStrArr[2])
$(noticeTimeDayArr[i]).text(noticeTimeStrArr[0])
}
// var allYear = $('')
}, 50)
// 点击跳转学校日历
$('.tools-mod_div3').click(function() {
window.open('https://jwc.upc.edu.cn/2026/0508/c603a490075/page.htm', '_blank');
});
document.addEventListener('DOMContentLoaded', function() {
var banner = document.querySelector('.banner');
var xBody = document.querySelector('.x-body');
var resizeTimeout;
function updateXBodyPosition() {
var bannerHeight = banner.offsetHeight;
xBody.style.top = bannerHeight + 'px'; // 设置 top 值为轮播图高度
}
// 初始调用
updateXBodyPosition();
// 监听窗口大小变化
window.addEventListener('resize', function() {
// 清除之前的定时器
clearTimeout(resizeTimeout);
// 设置新的定时器,延迟执行更新
resizeTimeout = setTimeout(function() {
updateXBodyPosition();
}, 250); // 250ms 的延迟,可以根据需要调整
});
});
更多内容
本页围绕「星空综合登录入口操作说明」整理公开信息,便于对照栏目动态与后续阅读。 对照阅读
移动端与电脑端入口保持一致。 相关文章如某条暂不可用,可改走栏目列表继续查找。
若从搜索引擎进入,可先确认当前栏目名称,再按需打开相关阅读。 相关文章
- 民兵整组
- 军事动态
- 第十五周宿舍卫生检查结果
- 常用下载
- 心理测评系统
- 科室职能
快速通道
网站首页 / 深层油气全国重点实验室 / 教工入口 / "小知士"智能体
公开资讯滚动更新。建议通过站内栏目继续浏览,核对最新条目。