d("video").each(function () { var video = $(this).get(0); video.pause(); video.currentTime = 0; }); // 动画暂停并回到第一帧 anmtArr[index].pause(); anmtArr[index].seek(0); }); var banvideo = { play: function () { $obj.slick('slickPlay'); autoplay = true; }, pause: function () { autoplay = false; $obj.slick('slickPause'); } }; return banvideo; } // 点击轮播点跳转 $(".ybdu_li").click(function () { var index = $(this).index(); $(this).addClass("on").siblings().removeClass("on"); $(".ys_ban_slick").slick("slickGoTo", index) }) $('.ys_ban_slick').on('beforeChange', function (event, slick, currentSlide, nextSlide) { var index = nextSlide; $(".ybdu_li").eq(index).addClass("on").siblings().removeClass("on"); }); } // bannerw文字 $(function () { if ($(window).width() > 1199) { var arrtop = []; var index = []; $('.hbbu_li').each(function (index, item) { arrtop[index] = $(this).offset().top - $('.ys_hd_pc').height(); }); $(window).scroll(function () { for (var i = 0; i < arrtop.length; i++) { if ($(window).scrollTop() > arrtop[i] - ($('.ys_hd_pc').height() + 50)) { index = i } }; $('.hbbu_li').eq(index).addClass('act').siblings().removeClass('act'); var lastElement = $('.hbbu_li:last'); var lastElementTop = lastElement.offset().top - $(window).scrollTop(); if (lastElementTop <= -150) { setTimeout(function () { $('.hbbu_li').parents('.home_ban').addClass('appear'); }, 200) } else { $('.hbbu_li').parents('.home_ban').removeClass('appear') } }); if ($(".home_solu_video").hasClass("play")) { $(".home_solu_video").removeClass("play"); $('.home_solu_video video').get(0).play(); } else { $(".home_solu_video").addClass("play"); $('.home_solu_video video').get(0).pause(); $('.home_solu_video video').get(0).currentTime = 0; } } }); // 轮播控件显示与隐藏 var total = $('.ys_ban_li').length; if (total <= 1) { $('.ys_ban_dots').remove() } // 倒计时 $(document).ready(function () { var time = "2025-04-10"; var targetDate = new Date(time).getTime(); var intervalId; function updateCountdown() { var currentDate = new Date().getTime(); var timeDifference = targetDate - currentDate; if (timeDifference <= 0) { clearInterval(intervalId); $('.home_time').addClass('end') } else { // 倒计时尚未结束,继续更新显示 $('.home_time').removeClass('end') var days = Math.floor(timeDifference / (1000 * 60 * 60 * 24)); var hours = Math.floor((timeDifference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); var minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60)); var seconds = Math.floor((timeDifference % (1000 * 60)) / 1000); $('.htcu_li_date .htcu_li_num').text(days); $('.htcu_li_hour .htcu_li_num').text(hours); $('.htcu_li_minu .htcu_li_num').text(minutes); $('.htcu_li_seco .htcu_li_num').text(seconds); } } // 每秒更新一次倒计时显示 setInterval(updateCountdown, 1000); }); // // 数字滚动 ys.numRoll(".ys_demo_num", false, 1000); // 热点推荐 var mySwiper = new Swiper('.esg_empl_swip', { loop: false, pagination: { el: '.swiper-pagination', type: 'progressbar', }, navigation: { nextEl: '.home_news .arrows_next', prevEl: '.home_news .arrows_prev', }, breakpoints: { 360: { slidesPerView: 1, spaceBetween: 10, }, 481: { slidesPerView: 2, spaceBetween: 10, }, 992: { slidesPerView: 3, spaceBetween: 18, }, 1681: { slidesPerView: 3, spaceBetween: 18, } } }); rotaplay('.home_news', mySwiper); $(window).scroll(function () { rotaplay('.home_news', mySwiper); }); if ($(window).width() > 991) { var itemLength3 = $(".esg_empl_swip_li").length; if (itemLength3 <= 3) { $(".home_news .swiper-pagination").css("display", "none") $(".home_news .mod_arrows ").css("display", "none") } } if ($(window).width() > 480) { var itemLength3 = $(".esg_empl_swip_li").length; if (itemLength3 <= 2) { $(".home_news .swiper-pagination").css("display", "none") $(".home_news .mod_arrows ").css("display", "none") } } if ($(window).width() < 481) { var itemLength3 = $(".esg_empl_swip_li").length; if (itemLength3 <= 1) { $(".home_news .swiper-pagination").css("display", "none") $(".home_news .mod_arrows ").css("display", "none") } } // WOD会议与活动 var mySwiper2 = new Swiper('.home_meet_swip', { loop: false, pagination: { el: '.swiper-pagination', type: 'progressbar', }, navigation: { nextEl: '.home_meet .arrows_next', prevEl: '.home_meet .arrows_prev', }, breakpoints: { 360: { slidesPerView: 1, spaceBetween: 10, }, 481: { slidesPerView: 2, spaceBetween: 10, }, 992: { slidesPerView: 2, spaceBetween: 20, }, 1681: { slidesPerView: 2, spaceBetween: 24, } } }); rotaplay('.home_meet', mySwiper2); $(window).scroll(function () { rotaplay('.home_meet', mySwiper2); }); if ($('.home_meet').length > 0) { } else { $('.home_news').addClass('nomore') } // 关于数智范式会展 $(window).scroll(function () { about() }); function about() { if ($(window).width() > 768) { var navHeight = $(".ys_hd_pc").height(); var itemTop = $(".home_about_wrap").offset().top - $(window).height() / 4 * 2; var itemBot = $(".home_about_hide").offset().top - $(window).height(); var scroll = $(window).scrollTop(); if (scroll > itemTop) { $(".home_about").addClass("start") } else { $(".home_about").removeClass("start") } if ($(window).width() > 1199) { if (scroll > itemBot) { if ($(".home_about_hide").hasClass("play") && $('.home_about_hide video').length > 0) { $(".home_about_hide").removeClass("play"); $('.home_about_hide video').get(0).play(); } } else { $(".home_about_hide").addClass("play"); $('.home_about_hide video').get(0).pause(); $('.home_about_hide video').get(0).currentTime = 0 } } } else { var navHeight = $(".ys_hd_pc").height(); var itemTop = $(".home_about_wrap").offset().top - $(window).height() / 5 * 2; var itemBot = $(".home_about_hide").offset().top - $(window).height(); var scroll = $(window).scrollTop(); if (scroll > itemTop) { $(".home_about").addClass("start") } else { $(".home_about").removeClass("start") } } } if ($(window).width() < 1199) { $('.home_solu_video').addClass('wow ys_fadeup1') } $(".mod_aside_back").click(function () { $('.home_ban').addClass('more') })