更好发挥
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2025-11-23 00:58:33 +08:00
parent 318dae48de
commit f060daa9f4
3 changed files with 60 additions and 52 deletions

View File

@@ -78,6 +78,7 @@
background: rgba(15, 23, 42, 0.95); background: rgba(15, 23, 42, 0.95);
backdrop-filter: blur(20px); backdrop-filter: blur(20px);
border-bottom: 1px solid rgba(148, 163, 184, 0.15); border-bottom: 1px solid rgba(148, 163, 184, 0.15);
z-index: 998;
} }
#index .nav-item-box { #index .nav-item-box {
@@ -1812,6 +1813,8 @@ html {
/* 确保所有section背景连贯 */ /* 确保所有section背景连贯 */
#index .section.banner { #index .section.banner {
background: transparent; background: transparent;
position: relative;
z-index: 1;
} }
#index .section.service { #index .section.service {

View File

@@ -78,7 +78,6 @@
<!-- 如果需要分页器 --> <!-- 如果需要分页器 -->
<div class="swiper-pagination"></div> <div class="swiper-pagination"></div>
</div> </div>
</div>
<div class="banner-s"> <div class="banner-s">
<div class="section-content banner-list"> <div class="section-content banner-list">
<div class="banner-item" id="cloud-box"> <div class="banner-item" id="cloud-box">

View File

@@ -1,4 +1,6 @@
$(function () { $(function () {
// 产品详情页的图片预览轮播(仅在存在时初始化)
if ($('.gallery-thumbs').length > 0 && $('.gallery-top').length > 0) {
var galleryThumbs = new Swiper('.gallery-thumbs', { var galleryThumbs = new Swiper('.gallery-thumbs', {
spaceBetween: 10, spaceBetween: 10,
slidesPerView: 10, slidesPerView: 10,
@@ -6,7 +8,6 @@ $(function () {
watchSlidesVisibility: true, watchSlidesVisibility: true,
watchSlidesProgress: true, watchSlidesProgress: true,
noSwiping: true noSwiping: true
}); });
var galleryTop = new Swiper('.gallery-top', { var galleryTop = new Swiper('.gallery-top', {
spaceBetween: 10, spaceBetween: 10,
@@ -18,6 +19,10 @@ $(function () {
prevEl: '.swiper-button-prev', prevEl: '.swiper-button-prev',
}, },
}); });
}
// 首页 Banner 轮播(仅在存在时初始化)
if ($('.banner-cont').length > 0) {
const mySwiper = new Swiper(".banner-cont", { const mySwiper = new Swiper(".banner-cont", {
loop: true, // 循环模式选项 loop: true, // 循环模式选项
autoplay: { autoplay: {
@@ -35,11 +40,11 @@ $(function () {
on: { on: {
slideChange: function () { slideChange: function () {
// 移除所有进度条动画 // 移除所有进度条动画
document.querySelectorAll('.swiper-pagination-bullet').forEach(function(bullet) { document.querySelectorAll('.banner-cont .swiper-pagination-bullet').forEach(function(bullet) {
bullet.classList.remove('progress-active'); bullet.classList.remove('progress-active');
}); });
// 给当前激活的添加进度动画 // 给当前激活的添加进度动画
const activeBullet = document.querySelector('.swiper-pagination-bullet-active'); const activeBullet = document.querySelector('.banner-cont .swiper-pagination-bullet-active');
if (activeBullet) { if (activeBullet) {
activeBullet.classList.add('progress-active'); activeBullet.classList.add('progress-active');
} }
@@ -47,7 +52,7 @@ $(function () {
init: function () { init: function () {
// 初始化时给第一个添加进度动画 // 初始化时给第一个添加进度动画
setTimeout(function() { setTimeout(function() {
const activeBullet = document.querySelector('.swiper-pagination-bullet-active'); const activeBullet = document.querySelector('.banner-cont .swiper-pagination-bullet-active');
if (activeBullet) { if (activeBullet) {
activeBullet.classList.add('progress-active'); activeBullet.classList.add('progress-active');
} }
@@ -55,4 +60,5 @@ $(function () {
} }
} }
}); });
}
}) })