PageSourceSearch

https://www.aufe.edu.cn/_upload/tpl/0a/e6/2790/template2790/js/main.js?version=1.0.3

js aufe.edu.cn collected 2026-10-02 16:27:08 UTC 9,617 bytes, 398 lines download raw bytes

1$(function () {
2	var videos1 = document.querySelectorAll('.mbanner .swiper-slide video');
3	var banner = new Swiper(".mbanner .swiper", {
4		slidesPerView: 1,
5		lazy: true,
6		speed: 1000,
7		autoplay: {
8			disableOnInteraction: false,
9			delay: 5000,
10		},
11		pagination: {
12			el: ".mbanner .swiper-pagination",
13			clickable: true,
14		},
15		navigation: {
16			nextEl: '.mbanner .swiper-button-next',
17			prevEl: '.mbanner .swiper-button-prev',
18		},
19                effect: 'fade', 
20		on: {
21			slideChangeTransitionEnd: function (swiper) {
22				for (var i = 0; i < videos1.length; i++) {
23					if (videos1[i].src.indexOf("mp4")!=-1) {
24						if (i != this.realIndex) {
25							videos1[i].pause()
26						} else {
27							videos1[i].play()
28						}
29					}
30
31				}
32			}
33
34		}
35	});
36	function initVideoControl() {
37		var videoArray = Array.prototype.slice.call(videos1);
38		for (var i = 0; i < videoArray.length; i++) {
39			var video = videoArray[i];
40			if (video.addEventListener) {
41				video.addEventListener('play', function () {
42					banner.autoplay.stop();
43					banner.params.autoplay.delay = 0;
44				});
45			} else {
46				video.attachEvent('onplay', function () {
47					banner.autoplay.stop();
48					banner.params.autoplay.delay = 0;
49				});
50			}
51
52			if (video.addEventListener) {
53				video.addEventListener('ended', function () {
54					banner.autoplay.start();
55					banner.params.autoplay.delay = 3000;
56				});
57			} else {
58				video.attachEvent('onended', function () {
59					banner.autoplay.start();
60					banner.params.autoplay.delay = 3000;
61				});
62			}
63
64		}
65	}
66	initVideoControl();
67	$(".mbanner .news .news_video").each(function () {
68		if ($(this).find("video").attr("src") == "") {
69			$(this).hide();
70			$(this).siblings(".news_imgs").show();
71		} else {
72			$(this).show();
73			$(this).siblings(".news_imgs").hide();
74		}
75	})
76	var obt1 = new Vivus('numbg', {
77		type: 'delayed',
78		duration: 50
79	});
80	var swiper11 = new Swiper(".post-11 .swiper1", {
81		slidesPerView: 1,
82		lazy: true,
83		speed: 1000,
84		autoplay: {
85			delay: 5000,
86		},
87		navigation: {
88			nextEl: '.post-11 .swiper-button-next',
89			prevEl: '.post-11 .swiper-button-prev',
90		},
91		pagination: {
92			el: '.post-11 .swiper-pagination',
93			clickable: true,
94			renderBullet: function (index, className) {
95				return '<span class="' + className + '">0' + (index + 1) + '</span>';
96			},
97		},
98		on: {
99			init: function (swiper) {
100				document.querySelector(".scrollBall").classList.add("run")
101
102			},
103			slideChangeTransitionStart: function () {
104				var index2 = this.activeIndex;
105				document.querySelector(".dot_box .num").innerText = "0" + (index2 + 1)
106				document.querySelector(".post-11 .con1").style.setProperty("--nowIndex", index2);
107				obt1.reset().play();
108				document.querySelector(".scrollBall").classList.remove("run")
109				setTimeout(function () {
110					document.querySelector(".scrollBall").classList.add("run")
111				})
112			},
113		},
114	});
115	var swiper12 = new Swiper(".post-11 .swiper2", {
116		slidesPerView: 1,
117		lazy: true,
118		speed: 1000,
119		effect: 'fade',
120	});
121	swiper11.controller.control = swiper12; //Swiper1控制Swiper2,需要在Swiper2初始化后
122	swiper12.controller.control = swiper11;
123	$(".back_bb").click(function () {
124		$("html, body").animate({
125			scrollTop: $(".body_m").offset().top,
126		}, 600);
127	});
128	new Swiper(".post-21 .swiper", {
129		slidesPerView: 1,
130		lazy: true,
131		speed: 1000,
132		loop: true,
133		autoplay: {
134			disableOnInteraction: false,
135			delay: 5000,
136		},
137		navigation: {
138			nextEl: '.post-21 .swiper-button-next',
139			prevEl: '.post-21 .swiper-button-prev',
140		},
141	});
142	new Swiper(".post-41 .swiper", {
143		slidesPerView: 1,
144		lazy: true,
145		speed: 1000,
146		spaceBetween: "2.68%",
147		autoplay: {
148			disableOnInteraction: false,
149			delay: 5000,
150		},
151		scrollbar: {
152			el: '.post-41 .swiper-scrollbar',
153			draggable: true,
154		},
155		navigation: {
156			nextEl: '.post-41 .swiper-button-next',
157			prevEl: '.post-41 .swiper-button-prev',
158		},
159		breakpoints: {
160			320: {  //当屏幕宽度大于等于320
161				slidesPerView: 1,
162			},
163			479: {  //当屏幕宽度大于等于768 
164				slidesPerView: 2,
165			},
166			767: {  //当屏幕宽度大于等于768 
167				slidesPerView: 3,
168			},
169			999: {  //当屏幕宽4,
170				slidesPerView: 4,
171			}
172		}
173	});
174	new Swiper(".post-61 .swiper", {
175		slidesPerView: 4,
176		lazy: true,
177		speed: 1000,
178		spaceBetween: "2.68%",
179		autoplay: {
180			disableOnInteraction: false,
181			delay: 5000,
182		},
183		navigation: {
184			nextEl: '.post-61 .swiper-button-next',
185			prevEl: '.post-61 .swiper-button-prev',
186		},
187		breakpoints: {
188			320: {  //当屏幕宽度大于等于320
189				slidesPerView: 2,
190			},
191			767: {  //当屏幕宽度大于等于768 
192				slidesPerView: 3,
193			},
194			999: {  //当屏幕宽4,
195				slidesPerView: 4,
196			}
197		}
198	});
199	$(".main3 .sudy-tab").sudyTab({
200		handle: ".tab-menu .tit",
201		content: ".tab-con .post",
202		trigger: "mouseenter",
203		start: 1,
204		autoPlay: {
205			active: false
206		}
207	});
208	$(".main5 .post2 .news .news_video").each(function () {
209		if ($(this).find("video").attr("src") == "") {
210			$(this).hide();
211			$(this).siblings("a").show();
212		} else {
213			$(this).show();
214			$(this).siblings("a").hide();
215		}
216	});
217	const videos = document.querySelectorAll(".main5 .post2 .news .news_video video");
218	const buttons = document.querySelectorAll(".main5 .post2 .news .news_video .play");
219	buttons.forEach(function (button, index) {
220		button.addEventListener("click", function () {
221			videos.forEach(function (el, index2) {
222				if (index != index2) {
223					videos[index2].pause();
224					buttons[index2].classList.remove("pause");
225				}
226			});
227			button.classList.toggle("pause");
228			if (button.classList.contains("pause")) {
229				videos[index].play();
230			} else {
231				videos[index].pause();
232			}
233		});
234	});
235	// //监听滑动或者鼠标滚动
236	// ScrollTrigger.observe({
237	//     target: ".body_b", // can be any element (selector text is fine)
238	//     type: "wheel,touch,scroll,pointer", // comma-delimited list of what to listen for ("wheel,touch,scroll,pointer")
239	//     onUp: function (self) {
240	//     },
241	//     onDown: function (self) {
242	//         if (!ScrollTrigger.isTouch) {
243	//             $(".back_bb").click()
244	//             $(".body_m").addClass("showdiv")
245	//             $("body").addClass("ovAuto")
246	//         }
247	//     },
248	// });
249	// ScrollTrigger.observe({
250	//     target: ".body_m", // can be any element (selector text is fine)
251	//     type: "wheel,touch,scroll,pointer", // comma-delimited list of what to listen for ("wheel,touch,scroll,pointer")
252	//     onUp: function (self) {
253	//         //self.event.type 判断触发类型(touch,wheel...) 
254	//         const rect = document.querySelector(".body_m").getBoundingClientRect();
255	//         if ($(".body_m").scrollTop() == 0) {
256	//             $(".body_m").removeClass("showdiv")
257	//             $("body").removeClass("ovAuto")
258	//         }
259	//     }
260	// });
261	particlesJS('particles-js', {
262		particles: {
263			number: {
264				//下面这个数约大越密集 太大浏览器会卡
265				value: 20,
266				density: {
267					enable: true,
268					//下面这个数约大越稀疏 太小浏览器会卡
269					value_area: 80
270				}
271			},
272			//交点的颜色
273			color: {
274				value: '#ffffff'
275			},
276			opacity: {
277				value: 0.1,
278				random: false,
279				anim: {
280					enable: false,
281					speed: 10,
282					opacity_min: 0,
283					sync: false
284				}
285			},
286
287			//别动就对了-——
288			shape: {
289				type: 'circle',
290				stroke: {
291					width: 0,
292					color: '#98aee8'
293				},
294				polygon: {
295					nb_sides: 5
296				},
297				image: {
298					src: 'img/github.svg',
299					width: 100,
300					height: 100
301				}
302			},
303			//透明度
304			opacity: {
305				value: 0.1,
306				random: false,
307				anim: {
308					enable: false,
309					speed: 1,
310					opacity_min: 0.1,
311					sync: false
312				}
313			},
314			//端点尺寸
315			size: {
316				value: 2,
317				random: true,
318				anim: {
319					enable: false,
320					speed: 40,
321					size_min: 0.1,
322					sync: false
323				}
324			},
325			//线
326			line_linked: {
327				enable: true,
328				distance: 80,
329				//距离内连线
330				color: '#ffffff',
331				opacity: 0.2,
332				width: 1
333			},
334			//移动属性
335			move: {
336				enable: true,
337				//动画速度在这里!!
338				speed: 3,
339				direction: 'none',
340				random: false,
341				straight: false,
342				out_mode: 'out',
343				attract: {
344					enable: false,
345					rotateX: 600,
346					rotateY: 1200
347				}
348			}
349		},
350		//交互
351		interactivity: {
352			detect_on: 'canvas',
353			events: {
354				//鼠标滑过 和 鼠标点击 属性模式 //true表示开启 false 关闭
355				onhover: {
356					enable: true,
357					mode: 'grab'
358				},
359				onclick: {
360					enable: false,
361					mode: 'push'
362				},
363				resize: true
364			},
365			//各种模式属性 把属性名替换 两个状态的 "mode": 即可1653/1657附近 "grab" "bubble" "repulse" "push" "remove"
366			//下面是鼠标事件名称
367			modes: {
368				//鼠标与distance范围内点连线
369				grab: {
370					distance: 100,
371					line_linked: {
372						opacity: 1
373					}
374				},
375				//改变周围点相应属性
376				bubble: {
377					distance: 100,
378					size: 10,
379					duration: 2,
380					opacity: 8,
381					speed: 3
382				},
383				//鼠标周围distance范围排斥
384				repulse: {
385					distance: 100
386				},
387				//添加 或 删除点de数量
388				push: {
389					particles_nb: 4
390				},
391				remove: {
392					particles_nb: 2
393				}
394			}
395		},
396		retina_detect: true
397	});
398});

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.