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.