var swiperFullpage; // 鍏ㄥ睆婊氬姩Swiper var swiperFirstScreenVideo; // 绗竴灞忚棰慡wiper var swiperAnimes; // 鍔ㄧ敾Swiper var swiperFirstScreenVideoPlayStatus = 0; // 绗竴灞忚棰戝綋鍓嶆挱鏀剧姸鎬併€?: 鏆傚仠锛?: 鎾斁锛 var swiperFirstScreenVideoIndex = 0; // 绗竴灞忚棰戝綋鍓嶆挱鏀剧殑绱㈠紩銆 var swiperFirstScreenVideoVolumeValue = 0; // 绗竴灞忚棰戝綋鍓嶉煶閲忋€?-1 initSwiperFullpage(); // 鍒濆鍖栧叏灞忔粴鍔⊿wiper initSwiperFirstScreenVideo(); // 鍒濆鍖栫涓€灞忚棰慡wiper monitorMouseScrolling(); // 鐩戝惉榧犳爣鐨勬粴鍔 initFirstScreenVideos(); // 鍒濆鍖栫涓€灞忕殑瑙嗛 initSecondScreen(); // 鍒濆鍖栫浜屽睆鐨勯紶鏍囨搷浣 initComponentContainerIndexAboutOlympic(); // 鍒濆鍖栫粍浠 // 绉婚櫎鍐呴〉鐙湁鐨刢lass $(".header-inner-page").removeClass("header-inner-page"); $(".shrink").removeClass("shrink"); function initScrollReveal(id) { new scrollReveal({ elem: document.getElementById("srcontainer" + id), enter: "bottom", move: "80px", over: "1s", easing: "ease-in-out", reset: false, init: true, viewportFactor: 0.02, }); } /** * #################################################################################################### * ### 鍒濆鍖栧叏灞忔粴鍔⊿wiper * ### 璇wiper绂佺敤鎺変簡鎷栧姩鍜屾粴杞垏鎹㈡晥鏋滐紝鍥犱负璇ラ〉闈㈡湁澶氬闇€瑕佺洃鍚紶鏍囨粴杞粴鍔ㄤ簨浠讹紝 * ### 浼氬拰Swiper鐨勪簨浠跺啿绐侊紝鎵€浠ョ鐢ㄦ帀浜 * ### Swiper鐨勫垏鎹㈢粺涓€鍦ㄩ紶鏍囩殑婊氳疆鐨勭洃鍚簨浠朵腑杩涜澶勭悊 * #################################################################################################### */ function initSwiperFullpage() { swiperFullpage = new Swiper(".swiper-container_fullpage", { initialSlide: 0, // 璁惧畾鍒濆鍖栨椂slide鐨勭储寮 direction: "vertical", // 婊戝姩鏂瑰悜锛屽彲璁剧疆涓烘按骞虫柟鍚戝垏鎹?horizontal)鎴栧瀭鐩存柟鍚戝垏鎹?vertical) speed: 900, // 鍒囨崲閫熷害锛屽嵆slider鑷姩婊戝姩寮€濮嬪埌缁撴潫鐨勬椂闂达紙鍗曚綅ms锛 resistance: false, // 杈圭紭鎶垫姉 resistanceRatio: 0, // 鎶垫姉鐜囥€傝竟缂樻姷鎶楀姏鐨勫ぇ灏忔瘮渚嬨€傚€艰秺灏忔姷鎶楄秺澶ц秺闅惧皢slide鎷栫杈圭紭锛?鏃跺畬鍏ㄦ棤娉曟嫋绂 slidesPerView: "auto", // 璁剧疆slider瀹瑰櫒鑳藉鍚屾椂鏄剧ず鐨剆lides鏁伴噺(carousel妯″紡) mousewheel: false, // 鍒嗛〉鍣 pagination: { el: ".swiper-container_fullpage_pagination", }, noSwipingClass: isPc() ? "swiper-slide_fullpage_no-swiping" : "swiper-no-swiping", // 涓嶅彲鎷栧姩鍧楃殑绫诲悕 // 浜嬩欢 on: { init: function () { // console.log(isPc()); if (isPc()) { $("ul.right-nav-list").removeClass("hide"); } else { $("ul.right-nav-list").addClass("hide"); } // if (isPc()) { // $("ul.right-nav-list").removeClass("hide"); // } else { // $("ul.right-nav-list").addClass("hide"); // } }, // 浠庡綋鍓峴lide寮€濮嬭繃娓″埌鍙︿竴涓猻lide鏃舵墽琛 slideChangeTransitionStart: function () { // console.log("initSwiperFullpage Slide Start", this); // 杩涘叆绗竴灞 if (this.activeIndex == 0) { // 涓虹涓€灞忕殑Header娣诲姞鍗曠嫭鐨刢lass $(".header-pc-wrapper").addClass("first-screen"); if (!isPc()) { $("ul.right-nav-list").addClass("hide"); } else { $("ul.right-nav-list").removeClass("hide"); } } if (this.activeIndex == 1) { initScrollReveal(1); // console.log(isPc()); $("ul.right-nav-list").removeClass("hide"); } if (this.activeIndex == 2) { initScrollReveal(2); $("ul.right-nav-list").removeClass("hide"); } if (this.activeIndex == 3) { initScrollReveal(3); $(".swiper-container_fullpage_pagination").addClass("black"); $("ul.right-nav-list").removeClass("hide"); } else { $(".swiper-container_fullpage_pagination").removeClass("black"); } if (this.activeIndex == 4) { initScrollReveal(4); $("ul.right-nav-list").removeClass("hide"); } if (this.activeIndex == 2 || this.activeIndex == 3) { $(".header-pc-wrapper") .removeClass("first-screen") .addClass("second-screen"); } else { $(".header-pc-wrapper") .removeClass("second-screen") .addClass("first-screen"); } }, // 浠庝竴涓猻lide杩囨浮鍒板彟涓€涓猻lide缁撴潫鏃舵墽琛 slideChangeTransitionEnd: function () { if (!isPc()) { $(".swiper-container_fullpage_pagination").show(); } // console.log("initSwiperFullpage Slide Ended", this); // 绂诲紑绗竴灞 if (this.activeIndex != 0) { // 绉婚櫎涓虹涓€灞忕殑Header娣诲姞鍗曠嫭鐨刢lass $(".header-pc-wrapper").removeClass("first-screen"); // 鍋滄绗竴灞忕殑瑙嗛鎾斁 videoFirstScreenStop(); } else { if (swiperFirstScreenVideoIndex === 0) { videoFirstScreenPlay(); } } if (this.activeIndex == 2) { // console.log("page 3"); initComponentContainerDataDisplayOlympic(); } // 绂诲紑鍔ㄧ敾灞 if (this.activeIndex != 3) { // 閲嶇疆鍔ㄧ敾涓哄垵濮嬬姸鎬 // aniReset(); } }, // 鏈€鍚庝竴涓猻lide reachEnd: function () { if (!isPc()) { $(".swiper-container_fullpage_pagination").hide(); } new scrollReveal({ elem: document.getElementById("footer"), enter: "bottom", move: "80px", over: "1s", easing: "ease-in-out", reset: false, init: true, viewportFactor: 0.02, }); }, }, }); } /** * #################################################################################################### * ### 鍒濆鍖栫涓€灞忚棰慡wiper * #################################################################################################### */ function initSwiperFirstScreenVideo() { var countCurrent = document.querySelector(".count-num"); var countTotal = document.querySelector(".count-total"); swiperFirstScreenVideo = new Swiper(".swiper-container_first-screen-video", { initialSlide: 0, // 璁惧畾鍒濆鍖栨椂slide鐨勭储寮 direction: "horizontal", // 婊戝姩鏂瑰悜锛屽彲璁剧疆涓烘按骞虫柟鍚戝垏鎹?horizontal)鎴栧瀭鐩存柟鍚戝垏鎹?vertical) speed: 900, // 鍒囨崲閫熷害锛屽嵆slider鑷姩婊戝姩寮€濮嬪埌缁撴潫鐨勬椂闂达紙鍗曚綅ms锛 autoplay: { delay: 8000, // 8绉掑垏鎹竴娆 }, // 濡傛灉闇€瑕佸墠杩涘悗閫€鎸夐挳 navigation: { nextEl: ".swiper-container_first-screen-video .swiper-button-next", prevEl: ".swiper-container_first-screen-video .swiper-button-prev", }, // 浜嬩欢 on: { init: function (swiper) { var slides = this.slides; var num = this.slides.length; // slides.each(function (el, i) { // if (!isPc()) { // if ( // slides[el] // .getAttribute("class") // .indexOf("swiper-slide-banner-mobile") !== -1 // ) { // num = num -= 1; // } // } else { // if ( // slides[el] // .getAttribute("class") // .indexOf("swiper-slide-banner-pc") !== -1 // ) { // num = num -= 1; // } // } // }); // countTotal.innerHTML = (num * 1) < 10 ? "0" + num : num; }, // 浠庝竴涓猻lide杩囨浮鍒板彟涓€涓猻lide缁撴潫鏃舵墽琛 slideChangeTransitionEnd: function () { // console.log('initSwiperFirstScreenVideo Slide Ended', this); countCurrent.innerHTML = this.activeIndex < 9 ? "0" + (this.activeIndex + 1) : this.activeIndex; swiperFirstScreenVideoIndex = this.activeIndex; if ( this.slides && this.slides[this.activeIndex] && this.slides[this.activeIndex].videoPlayer ) { swiperFirstScreenVideoPlayStatus = 1; videoFirstScreenPlay(); $(".play-video").show(); } else { swiperFirstScreenVideoPlayStatus = 0; videoFirstScreenStop(); $(".play-video").hide(); } }, }, }); } /** * #################################################################################################### * ### 鍒濆鍖栫涓€灞忕殑瑙嗛 * #################################################################################################### */ function initFirstScreenVideos() { var videos; if (isPc()) { $(".swiper-slide_first-screen-video .video_pc").show(); $(".swiper-slide_first-screen-video .video_mo").hide(); videos = $(".swiper-slide_first-screen-video .video_pc"); } else { $(".swiper-slide_first-screen-video .video_pc").hide(); $(".swiper-slide_first-screen-video .video_mo").show(); videos = $(".swiper-slide_first-screen-video .video_mo"); } // console.log('Init Videos', videos); videos.each(function (index, el) { var player = videojs(el, { loop: true, autoplay: index == 0 ? true : false, }); player.volume(0); if ( swiperFirstScreenVideo && swiperFirstScreenVideo.slides && swiperFirstScreenVideo.slides[index] ) { swiperFirstScreenVideo.slides[index].videoPlayer = player; videoFirstScreenPlay(); // 閲嶅啓瑙嗛鎾斁鐘舵€ swiperFirstScreenVideoPlayStatus = 1; // 涓嶅厑璁歌嚜鍔ㄥ垏鎹 swiperFirstScreenVideo.autoplay.stop(); setTimeout(function () { swiperFirstScreenVideo.autoplay.start(); }, 8000); // setTimeout(() => { // // 瑙嗛鎾斁 // swiperFirstScreenVideo.slides[index].videoPlayer.play(); // // 閲嶅啓鑷姩鍒囨崲鐨勬椂闂撮棿闅 // swiperFirstScreenVideo.params.autoplay.delay = 8000; // setTimeout(function () { // // 瑙嗛鏆傚仠 // player.pause(); // // 閲嶇疆瑙嗛杩涘害 // player.currentTime(0); // // 閲嶅啓瑙嗛鎾斁鐘舵€ // swiperFirstScreenVideoPlayStatus = 1; // // 婊戝姩鍒颁笅涓€灞 // swiperFirstScreenVideo.slideNext(); // $('.play-video').hide() // }, 7800); // }, 100); } }); } /** * #################################################################################################### * ### 鎾斁绗竴灞忕殑瑙嗛 * #################################################################################################### */ function videoFirstScreenPlay() { // console.log("Video Play"); if (!swiperFirstScreenVideo) { // console.log("Video Swiper Uninit"); return; } // 鑾峰彇鍒板綋鍓嶆槸绗嚑涓棰 var videoCurrent = swiperFirstScreenVideo.activeIndex; // 鏆傚仠鍏朵粬瑙嗛锛屾挱鏀惧綋鍓嶈棰 if (swiperFirstScreenVideo.slides) { swiperFirstScreenVideo.slides.each(function (index, el) { if (el.videoPlayer) { if (index == videoCurrent) { el.videoPlayer.currentTime(0); el.videoPlayer.play(); // 涓嶅厑璁歌嚜鍔ㄥ垏鎹 swiperFirstScreenVideo.autoplay.stop(); setTimeout(function () { swiperFirstScreenVideo.autoplay.start(); }, 8000); } else { el.videoPlayer.pause(); } } }); } // 鏇存柊鎾斁鐘舵€ swiperFirstScreenVideoPlayStatus = 1; // 鏄剧ず鎾斁鎸夐挳 $(".play-video").show(); } /** * #################################################################################################### * ### 鏆傚仠绗竴灞忕殑瑙嗛 * #################################################################################################### */ function videoFirstScreenStop() { // console.log("Video Stop"); if (!swiperFirstScreenVideo) { // console.log("Video Swiper Uninit"); return; } if (swiperFirstScreenVideo.slides) { swiperFirstScreenVideo.slides.each(function (index, el) { if (el.videoPlayer) { el.videoPlayer.pause(); el.videoPlayer.currentTime(0); swiperFirstScreenVideo.autoplay.start(); } }); } // 鏇存柊鎾斁鐘舵€ swiperFirstScreenVideoPlayStatus = 0; // 闅愯棌鎾斁鎸夐挳 $(".play-video").hide(); } /** * #################################################################################################### * ### 鐩戝惉榧犳爣婊氬姩 * #################################################################################################### */ function monitorMouseScrolling() { $(window).mousewheel(function (event) { // console.log("monitorMouseScrolling", event); // if(sessionStorage['wheeling'] == 'ing') { // return; // } // if (localStorage.getItem('wheeling') == 'ing') { // return; // } // deltaX锛氬€间负璐熺殑锛?1锛夛紝鍒欒〃绀烘粴杞悜宸︽粴鍔ㄣ€傚€间负姝g殑锛?锛夛紝鍒欒〃绀烘粴杞悜鍙虫粴鍔ㄣ€ // deltaY锛氬€间负璐熺殑锛?1锛夛紝鍒欒〃绀烘粴杞悜涓嬫粴鍔ㄣ€傚€间负姝g殑锛?锛夛紝鍒欒〃绀烘粴杞悜涓婃粴鍔ㄣ€ // deltaFactor锛氬閲忓洜瀛愩€傞€氳繃 deltaFactor * deltaX 鎴栬€ deltaFactor * deltaY 鍙互寰楀埌娴忚鍣ㄥ疄闄呯殑婊氬姩璺濈銆 // 鍚戜笅婊氬姩 if (event.deltaY == -1) { // console.log("Mouse Down"); // 榧犳爣鍚戜笅婊氬姩鐨勫鐞嗗嚱鏁 mouseDown(); // sessionStorage['wheeling'] = 'ing'; localStorage.setItem("wheeling", "ing"); var timer = setTimeout(function () { // sessionStorage['wheeling'] = ''; localStorage.setItem("wheeling", ""); }, 1200); return; } // 鍚戜笂婊氬姩 if (event.deltaY == 1) { // console.log("Mouse Up"); // 榧犳爣鍚戜笂婊氬姩鐨勫鐞嗗嚱鏁 mouseUp(); // sessionStorage['wheeling'] = 'ing'; localStorage.setItem("wheeling", "ing"); var timer = setTimeout(function () { // sessionStorage['wheeling'] = ''; localStorage.setItem("wheeling", ""); }, 1200); return; } }); } /** * #################################################################################################### * ### 榧犳爣鍚戜笅婊氬姩鐨勫鐞嗗嚱鏁 * #################################################################################################### */ function mouseDown() { // 鍒ゆ柇涓€涓嬫槸鍚︽湁Swiper绀轰緥锛屾病鏈塖wiper绀轰緥鐨勮瘽璇存槑Swiper杩樻病鍒濆鍖栵紝浠€涔堜篃鍋氫笉浜 if (!swiperFullpage) { // console.log("Fullpage Swiper Uninit"); return; } // 鏄惁姝e湪杩囨浮 // 姝e湪杩囨浮鐨勬椂鍊欎粈涔堜篃涓嶅仛 if (swiperFullpage.animating) { // console.log("Fullpage Swiper Animating"); return; } // 姝e湪灞曞紑鎴栨敹璧稨eader锛屼粈涔堜篃涓嶅仛 if (sessionStorage["isHeaderShrink"] == "ing") { // console.log("Header Shrinking"); return; } // 濡傛灉鏄涓€灞忥紝骞朵笖Header涓哄睍寮€鐘舵€侊紝骞朵笖鏄湪PC绔 if (swiperFullpage.activeIndex == 0 && headerStatus()) { // 鏀惰捣Header headerShrink(); // 璁句釜瀹氭椂鍣紝閬垮厤婊戝姩杩囧揩 var timer = setTimeout(function () { clearTimeout(timer); timer = null; sessionStorage["isHeaderShrink"] = ""; }, 900); sessionStorage["isHeaderShrink"] = "ing"; return; } // 婊戝姩鍒颁笅涓€灞 swiperFullpage.slideNext(); // 鏄惁鏄疐ooter灞忥紵 var pageCurrent = $( ".swiper-container_fullpage_pagination .swiper-pagination-bulvar-active" ).index(); if (pageCurrent == 5) { // $('.header-pc-wrapper').addClass('hide'); } } /** * #################################################################################################### * ### 榧犳爣鍚戜笂婊氬姩鐨勫鐞嗗嚱鏁 * #################################################################################################### */ function mouseUp() { // 鍒ゆ柇涓€涓嬫槸鍚︽湁Swiper绀轰緥锛屾病鏈塖wiper绀轰緥鐨勮瘽璇存槑Swiper杩樻病鍒濆鍖栵紝浠€涔堜篃鍋氫笉浜 if (!swiperFullpage) { // console.log("Fullpage Swiper Uninit"); return; } // 鏄惁姝e湪杩囨浮 // 姝e湪杩囨浮鐨勬椂鍊欎粈涔堜篃涓嶅仛 if (swiperFullpage.animating) { // console.log("Fullpage Swiper Animating"); return; } // 姝e湪灞曞紑鎴栨敹璧稨eader锛屼粈涔堜篃涓嶅仛 if (sessionStorage["isHeaderShrink"] == "ing") { // console.log("Header Shrinking"); return; } // 濡傛灉鏄涓€灞忥紝骞朵笖Header涓烘敹缂╃姸鎬 if (swiperFullpage.activeIndex == 0 && !headerStatus()) { // 灞曞紑Header headerExpand(); // 璁句釜瀹氭椂鍣紝閬垮厤婊戝姩杩囧揩 var timer = setTimeout(function () { clearTimeout(timer); timer = null; sessionStorage["isHeaderShrink"] = ""; }, 900); sessionStorage["isHeaderShrink"] = "ing"; return; } // 婊戝姩鍒颁笂涓€灞 swiperFullpage.slidePrev(); // 鏄惁鏄疐ooter灞忥紵 var pageCurrent = $( ".swiper-container_fullpage_pagination .swiper-pagination-bulvar-active" ).index(); // console.log("pageCurrent", pageCurrent); if (pageCurrent != 5) { $(".header-pc-wrapper").removeClass("hide"); $(".whell-down-icon-wrapper").removeClass("up"); } } /** * #################################################################################################### * ### 寰楀埌Header鐨勬樉绀虹姸鎬 * ### 姝e父鐘舵€佽繑鍥瀟rue锛屾敹缂╃姸鎬佽繑鍥瀎alse * #################################################################################################### */ function headerStatus() { return !$(".header-pc-wrapper").hasClass("shrink"); } /** * #################################################################################################### * ### 鏀剁缉Header * #################################################################################################### */ function headerShrink() { $(".header-pc-wrapper").addClass("shrink"); } /** * #################################################################################################### * ### 灞曞紑Header * #################################################################################################### */ function headerExpand() { $(".header-pc-wrapper").removeClass("shrink"); } /** * #################################################################################################### * ### 杩斿洖椤堕儴 * #################################################################################################### */ $("a.home-top").on("click", function () { if (swiperFullpage) { swiperFullpage.slideTo(0); headerExpand(); } }); /** * #################################################################################################### * ### 鐐瑰嚮宸︿晶鍒嗛〉鍣ㄥ垏鎹㈤〉闈 * #################################################################################################### */ $(".swiper-pagination-bullet").on("click", function () { if (swiperFullpage) { swiperFullpage.slideTo($(this).index()); headerShrink(); // 鏄惁鏄疐ooter灞忥紵 var pageCurrent = $( ".swiper-container_fullpage_pagination .swiper-pagination-bulvar-active" ).index(); // console.log("pageCurrent", pageCurrent); if (pageCurrent == 5) { $(".header-pc-wrapper").addClass("hide"); $(".whell-down-icon-wrapper").addClass("up"); } else { $(".header-pc-wrapper").removeClass("hide"); $(".whell-down-icon-wrapper").removeClass("up"); } } }); // 鍒濆鍖栫粍浠 function initComponentContainerIndexAboutOlympic() { // 鎾斁鎸夐挳 var btnPlay = document.querySelector( ".swiper-slide_fullpage_first-screen .btn-play" ); // 鍏抽棴鎸夐挳 var btnClose = document.querySelector( ".swiper-slide_fullpage_first-screen .btn-close" ); // 瑙嗛鐩掑瓙 var videoContainer = document.querySelector( ".swiper-slide_fullpage_first-screen .video-modal-container" ); // 瑙嗛 var video = document.querySelector( ".swiper-slide_fullpage_first-screen .video-modal" ); // 澶撮儴瀵艰埅 var headNav = document.querySelector("#header"); // 鍒嗛〉鍣 var pagination = document.querySelector( ".swiper-container_fullpage_pagination" ); // 鎾斁瑙嗛 if (btnPlay) { btnPlay.onclick = function () { if (videoContainer && video) { videoContainer.classList.add("transition"); videoContainer.classList.add("show"); headNav.style.display = "none"; pagination.style.display = "none"; var timer = setTimeout(function () { clearTimeout(timer); video.play(); }, 400); } }; } // 鍏抽棴瑙嗛 if (btnClose) { btnClose.onclick = function () { if (videoContainer && video) { videoContainer.classList.remove("transition"); videoContainer.classList.remove("show"); headNav.style.display = "block"; pagination.style.display = "block"; video.pause(); } }; } } // 绗簩灞忕殑榧犳爣绉诲叆绉诲嚭鏁堟灉 function initSecondScreen() { var products = document.querySelectorAll( ".second-screen-container .products-list .item" ); $(".second-screen-container .head .total").html(products.length); var productBgs = document.querySelectorAll(".second-screen-bg"); productBgs[0].style.zIndex = "9"; $(products).mouseenter(function () { var el = $(this)[0]; var num = $(this).index() + 1; $(this).addClass("active").siblings().removeClass("active"); $(productBgs).each(function (el, i) { productBgs[el].style.zIndex = "1"; }); productBgs[$(this).index()].style.zIndex = "9"; if (el.getAttribute("data-title")) { $(".second-screen-container .head .tit").html( el.getAttribute("data-title") ); } if (el.getAttribute("data-description")) { $(".second-screen-container .head .desc").html( el.getAttribute("data-description") ); } if (el.getAttribute("data-id")) { $(".second-screen-container .head .btn").attr( "href", "/device/" + el.getAttribute("data-id") + "/" ); } $(".second-screen-container .head .current").html( num < 10 ? "0" + num : num ); }); $(products).mouseleave(function () { $(productBgs).each(function (el, i) { productBgs[el].style.zIndex = "1"; }); productBgs[$(this).index()].style.zIndex = "9"; }); } // 绗笁灞忔暟瀛楁粴鍔 function initComponentContainerDataDisplayOlympic() { // 鐩掑瓙 var container = document.querySelector(".third-screen-container .statistics"); // items var items = container.querySelectorAll( ".third-screen-container .item-num .number" ); var itemsLen = items.length || 0; // 鍒ゆ柇鍏冪礌鏄惁鍦ㄥ彲瑙佸尯鍩 function isElementInViewport() { var rect = container.getBoundingClientRect(); var winH = window.innerHeight || document.documentElement.clientHeight; var winW = window.innerWidth || document.documentElement.clientWidth; return winH - rect.top > 10; } // 鍒ゆ柇鏄惁闇€瑕佹粴鍔ㄦ暟瀛 function judgeIsCount() { // 婊氬姩鐘舵€ var isHasCountup = container.getAttribute("data-is-countup-init"); // 婊氬姩杩囦簡 if (isHasCountup === "true") return; // 鍦ㄥ彲瑙嗗尯鍩熷唴 if (isElementInViewport()) { // 寰幆澶勭悊 for (var i = 0; i < itemsLen; i++) { (function (i) { var count = new CountUp( items[i], 0, parseInt(items[i].getAttribute("data-number-value")), 0, 4 ); if (!count.error) { count.start(); } else { // console.log(count.error); } })(i); } // 鏇存柊婊氬姩鐘舵€ container.setAttribute("data-is-countup-init", true); } } // 榛樿鎵ц涓€閬 judgeIsCount(); // 婊氬姩鏉℃粴鍔ㄧ殑鏃跺€欎篃闇€瑕佸垽鏂 window.onscroll = judgeIsCount; } // function initRightNav() { // $('.right-nav-btn').click(function () { // $(this).hide() // $('.right-nav-list').css('right', '15px') // }) // } // 鍚堜綔浼欎即鐨剆wiper var partnerSwiper = new Swiper(".partner-swiper", { slidesPerView: "auto", freeMode: true, mousewheel: false, scrollbar: { el: ".partner-swiper .swiper-scrollbar", }, }); // 鏂伴椈鐨剆wiper var partnerSwiper = new Swiper(".industry-swiper", { slidesPerView: !isPc() ? 1 : 3, mousewheel: false, scrollbar: { el: ".industry-swiper .swiper-scrollbar", }, }); // 鏂伴椈妯″潡鐨勭矑瀛愯儗鏅澘 VANTA.NET({ el: "#vanta-canvas-test", mouseControls: true, touchControls: true, gyroControls: false, minHeight: 200.0, minWidth: 200.0, scale: 1.0, scaleMobile: 1.0, color: 0xffffff, backgroundColor: "#000", points: 20.0, maxDistance: 24.0, spacing: 20.0, });