PageSourceSearch

https://teemdrop.com/static/js/pages/serviceList/02.js?v=

js teemdrop.com collected 2026-10-03 21:39:13 UTC 2,861 bytes, 98 lines download raw bytes

1// <-- !轮播图开始 -->
2const slider = document.getElementById('slider')
3const slides = slider.querySelectorAll('.slide')
4
5let currentIndex = 0
6let slideCount = slides.length
7let autoPlayInterval
8let isAutoPlay = true
9
10// 切换到指定幻灯片
11function goToSlide(index) {
12  if (index < 0) {
13    currentIndex = slideCount - 1
14  } else if (index >= slideCount) {
15    currentIndex = 0
16  } else {
17    currentIndex = index
18  }
19
20  slider.style.transform = `translateX(-${currentIndex * 100}%)`
21}
22
23// 下一张幻灯片
24function nextSlide() {
25  goToSlide(currentIndex + 1)
26}
27
28// 上一张幻灯片
29function prevSlide() {
30  goToSlide(currentIndex - 1)
31}
32
33// 自动播放功能
34function startAutoPlay() {
35  if (isAutoPlay) {
36    autoPlayInterval = setInterval(() => {
37      nextSlide()
38    }, 5000)
39  }
40}
41
42// 初始化轮播图
43function initSlider() {
44  startAutoPlay()
45
46  // 鼠标悬停时暂停自动播放
47  slider.parentElement.addEventListener('mouseenter', () => {
48    if (isAutoPlay) {
49      clearInterval(autoPlayInterval)
50    }
51  })
52
53  // 鼠标离开时恢复自动播放
54  slider.parentElement.addEventListener('mouseleave', () => {
55    if (isAutoPlay) {
56      startAutoPlay()
57    }
58  })
59}
60// 初始化轮播图
61initSlider()
62
63document.querySelectorAll('.third-block-right-header-text2')[0].classList.add('active')
64document.querySelectorAll('.third-block-right-content')[0].style.display = ''
65document.querySelectorAll('.third-block-right-content')[1].style.display = 'none'
66document.querySelectorAll('.fourth-block-right-header-text2')[0].classList.add('active')
67document.querySelectorAll('.fourth-block-right-content')[0].style.display = ''
68document.querySelectorAll('.fourth-block-right-content')[1].style.display = 'none'
69document.addEventListener('click', function (e) {
70  const el = e.target.closest('.third-block-right-header-text2')
71  if (!el) return
72  const items = document.querySelectorAll('.third-block-right-header-text2')
73  const index = Array.from(items).indexOf(el)
74  el.classList.add('active')
75  items.forEach(item => {
76    if (item !== el) item.classList.remove('active')
77  })
78  const contents = document.querySelectorAll('.third-block-right-content')
79  if (index === 0) {
80    contents[0].style.display = ''
81    contents[1].style.display = 'none'
82  } else {
83    contents[0].style.display = 'none'
84    contents[1].style.display = ''
85  }
86})
87document.addEventListener('click', function (e) {
88  const el = e.target.closest('.sixth-block-box-title')
89  if (!el) return
90  el.querySelector('.sixth-block-box-title-img').classList.toggle('active')
91  el.nextElementSibling.classList.toggle('show')
92  document.querySelectorAll('.sixth-block-box-title').forEach(item => {
93    if (item !== el) {
94      item.querySelector('.sixth-block-box-title-img').classList.remove('active')
95      item.nextElementSibling.classList.remove('show')
96    }
97  })
98})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.