$(function () { // 导航 $("#mob-menubtn").on("click", function () { $('.main-header').addClass('open'); $('#close-menubtn').show(); $('#mob-menubtn').hide(); $('.guide').hide(); // $('.nav-new').addClass('active') $('body').css('overflow', 'hidden') // $('.logo img').attr('src', 'https://e.huawei.com/topic/sitecore/2023-mwc/img/banner/logo_huawei.png'); }) $("#close-menubtn").on("click", function () { closeMenu() }) //mob端关闭导航 function closeMenu() { $('.main-header').removeClass('open'); $('#close-menubtn').hide(); $('#mob-menubtn').show(); $('.guide').show(); $('body').css('overflow', 'auto') } // 定位导航 function fixedNav() { // 基础对象 var winW = $(window).width(); // 对象 var navObj = $('.bz-header'); var liObj = navObj.find('.li'); var boxObj = $('.anchorpoint'); // 锚点定位,如果链接有带参数,自动触发点击事件 anchorFun(); // 点击导航栏按钮事件 liObj.on('click', function (e) { // 阻止时间冒泡 e.stopPropagation(); var _this = $(this); clickEvent(_this); }); // 滚动页面,导航栏跟着变化事件 $(window).on("scroll.bz-header", function () { // 获取滚动条当前位置 var scrollTop = $(window).scrollTop(); // // 显示、隐藏当前导航栏 if (scrollTop >= 70) { navObj.addClass('fix'); } else { navObj.removeClass('fix'); } // 获取每个版块的到页面顶部的位置 var anchorpointArr = []; boxObj.each(function () { anchorpointArr.push(Math.ceil($(this).offset().top - 65)); }) // 获取当前可预览的板块在哪个位置 var curLightHighIndex = 0; for (var i = 0; i < anchorpointArr.length; i++) { if (scrollTop >= anchorpointArr[i]) { curLightHighIndex = i; liObj.eq(curLightHighIndex).addClass('active').siblings().removeClass('active'); } else { curLightHighIndex = i; liObj.eq(curLightHighIndex).removeClass('active') } } // 当前导航栏跟着页面滚动高亮当前按钮 // liObj.eq(curLightHighIndex).addClass('active').siblings().removeClass('active'); }) function clickEvent(obj) { if (winW < 992) { closeMenu() } // 获取点击位置 var li_index = obj.index(); // 获取位置的top值 var willScrollTop = Math.ceil(boxObj.eq(li_index).offset().top - 65); // console.log(willScrollTop) // 执行动画 $("body,html").stop(true, true).animate({ "scrollTop": willScrollTop }, 300); // 高亮当前定位按钮 // obj.addClass('active').siblings().removeClass('active'); }; // 获取链接参数 function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); } // 锚点定位函数 function anchorFun() { var queryStr = getQueryString("section"); if (queryStr == undefined) return // 清除滚动条默认位置 if ('scrollRestoration' in history) { history.scrollRestoration = 'manual'; } liObj.each(function () { var _this = $(this); if (_this.data('key') == queryStr) { setTimeout(function () { _this.trigger('click'); }, 500) } }) } } function init() { fixedNav(); // 定位导航 } init(); // banner if ($('.e-module-202501091041').length > 0) { function module202501091041Fun($target) { var module202501091041Obj = { init: function () { this.win = $(window); this.moduleObj = $target; this.conObj = $target.find(".e-con"); this.conTextObj = $target.find(".con"); this.resizeInit(); this.setHeight(); this.addVideoLink(this.moduleObj.find('.e-bg')); this.setVideoCenterShow(); this.createCover(); // this.setAnimate(); this.scrollbannerFixed(); this.resizeEvent(); }, resizeInit: function () { this.winw = this.win.width(); this.winh = this.win.height(); }, createCover: function () { var html = "
"; this.moduleObj.prepend(html); this.coverObj = this.moduleObj.find(".cover"); }, setHeight: function () { var This = this; if (This.winw > 1200) { var whiteHeadH = $(".bz-header .main-header").outerHeight(); This.moduleH = This.winh - whiteHeadH; This.moduleObj.height(This.moduleH); This.conObj.height(This.moduleH); }; }, setVideoCenterShow: function () { // 设计规则:视频尺寸比例必须是1920*1080 var videoObj = this.moduleObj.find('.video'); if ((this.moduleObj.height() / this.winw) > (1080 / 1920)) { // 视频就需要高度100%显示,左右裁切 videoObj.css({ width: 'auto', height: '101%' }) } else { videoObj.css({ width: '101%', height: 'auto' }) } }, addVideoLink: function (bgObj) { _this = this; if (bgObj.data('url') != undefined && bgObj.data('url') != '' && this.winw > 1200) { // 添加video的dom结构 if (bgObj.find('.video').length == 0) { bgObj.append(""); } // 判断视频是否已经赋值,如果赋值了,就不需要再次赋值了。 var videoObj = bgObj.find('.video'); if (videoObj.attr("src") != bgObj.data('url')) { videoObj.attr("src", bgObj.data('url')); this.setTextTime(); } } else { if (this.winw > 1200) { _this.moduleObj.addClass("animate-v2"); } else { bgObj.find('.video').remove(); } } }, // setAnimate: function () { // var This = this; // if (This.winw > 992) { // This.moduleObj.addClass("animeta"); // } else { // This.moduleObj.removeClass("animeta"); // }; // }, scrollbannerFixed: function () { var This = this; This.win.on("scroll.202501091041", function () { if (This.winw > 1024) { var scrollTop = This.win.scrollTop(); if (scrollTop > 0) { This.coverObj.css("opacity", scrollTop / This.moduleH); // This.conTextObj.css("transform", "scale3d(" + (1 - scrollTop / This.moduleH * .2) + "," + (1 - scrollTop / This.moduleH * .2) + "," + (1 - scrollTop / This.moduleH * .2) + ")"); } else { This.coverObj.css("opacity", 0); }; }; }); }, setTextTime: function () { var _this = this; var videoObj = $(".e-module-202501091041 .video")[0]; var videoCurrentTime = 0; var loopStart = 5; var loopEnd = 11; var aaa = setInterval(function () { videoCurrentTime = Math.round(videoObj.currentTime); if (videoCurrentTime == loopEnd) { videoObj.currentTime = loopStart; }; if (videoObj.currentTime > loopStart) { _this.moduleObj.addClass("animate-v2"); } }, 100); }, resizeEvent: function () { var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202501091041', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; if (resizeTimer) { clearTimeout(resizeTimer); }; resizeTimer = setTimeout(function () { _this.resizeInit(); _this.setHeight(); _this.scrollbannerFixed(); }, 100) }; }); }, }; module202501091041Obj.init(); }; $('.e-module-202501091041').each(function () { var _this = $(this); if (_this.data('init')) { return; }; _this.data('init', true); module202501091041Fun($(this)); }); }; if ($(".e-countdown-v1").length > 0) { var countdownObj = $(".e-countdown-v1"); var timeStr = countdownObj.attr("data-timezone"); var liveTime = countdownObj.attr("data-starttime"); var countdownDays = $('.e-countdown-v1 .days'); var countdownHours = $('.e-countdown-v1 .hours'); var countdownMinutes = $('.e-countdown-v1 .minutes'); var countdownSeconds = $('.e-countdown-v1 .seconds'); function getLocalTimeFun() { var curgetLocalTime = (new Date()).getTime(); var curgetLocalTimeZoneHour = timeStr.split(':')[0] * 1 * 60 * 60 * 1000; var curgetLocalTimeZoneMinutes = timeStr.split(':')[1] * 1 * 60 * 1000; var curgetPcTimeZone = (new Date()).getTimezoneOffset() / 60 * 60 * 60 * 1000; var curtwoContryTime = curgetLocalTimeZoneHour + curgetLocalTimeZoneMinutes + curgetPcTimeZone; var curgetLocalTime = curgetLocalTime + curtwoContryTime; return curgetLocalTime; }; function timestampToTime(timestamp) { var date = new Date(timestamp); var allTime = {}; allTime.day = parseInt(date / 1000 / 60 / 60 / 24); allTime.hours = parseInt(date / 1000 / 60 / 60 % 24); allTime.minutes = parseInt(date / 1000 / 60 % 60); allTime.seconds = parseInt(date / 1000 % 60); return allTime; }; liveTime = new Date(liveTime).getTime(); var countdown = setInterval(function () { if (liveTime - getLocalTimeFun() > 0) { var allTime = timestampToTime(liveTime - getLocalTimeFun()); if (allTime.day != countdownDays.find('.num').text()) { countdownDays.find('.num').text(allTime.day > 9 ? allTime.day : '0' + allTime.day); }; if (allTime.hours != countdownHours.find('.num').text()) { countdownHours.find('.num').text(allTime.hours > 9 ? allTime.hours : '0' + allTime .hours); }; if (allTime.minutes != countdownMinutes.find('.num').text()) { countdownMinutes.find('.num').text(allTime.minutes > 9 ? allTime.minutes : '0' + allTime .minutes); }; countdownSeconds.find('.num').text(allTime.seconds); } else { window.clearInterval(countdown); countdownDays.find('.num').text('00'); countdownHours.find('.num').text('00'); countdownMinutes.find('.num').text('00'); countdownSeconds.find('.num').text('00'); }; }, 1000); }; if ($('.e-module-202408130949').length > 0) { function module202408130949Fun($target) { var module202408130949Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.resizeInit(); // resize初始化 this.clickEvent(); this.scrollEvent(); // 设置滚动事件,文字动画效果 this.resizeEvent(); // 设置自适应 }, resizeInit: function () { this.winw = this.win.width(); this.winh = this.win.height(); // 获取位置 this.scrollTop = this.win.scrollTop(); this.moduleTop = this.moduleObj.offset().top; }, clickEvent: function () { this.moduleObj.find(".why-box .why-left .e-lazy").hover(function () { var thisLiObj = $(this); if ($(window).width() > 1200) { if (thisLiObj.find("video").length == 0) { var videoStr = ""; thisLiObj.find(".video-box").append(videoStr); } else { $(this).find("video")[0].play(); $(this).find(".icon-shipin-0914").css("zIndex", 0); } } }, function () { $(this).find("video")[0].pause(); $(this).find(".icon-shipin-0914").css("zIndex", 3); }); if (this.winw > 992) { // 获取高度 var imgH = this.moduleObj.find(".why-box .why-left .e-lazy").height() - this.moduleObj.find(".why-box .why-right .e-title-1").outerHeight(); this.moduleObj.find(".why-box .why-right .why-con").css('max-height', imgH) } }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202408130949', function () { // 获取位置 _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; }); }, resizeEvent: function () { // 页面resize事件 var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202408130949', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); // resize初始化 _this.scrollEvent(); // 设置滚动事件,文字动画效果 }, 200) } }) } }; module202408130949Obj.init(); } // 初始化 $('.e-module-202408130949').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202408130949Fun($(this)); }) } if ($('.e-module-202408131557').length > 0) { function formatNumberWithCommas(number) { var parts = number.toString().split("."); parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); return parts.join("."); }; if ($(window).width() > 1200) { var off202408131557 = true; $(window).on("scroll.e-module-202408131557", function () { if ($(window).scrollTop() + $(window).height() * 0.5 > $(".e-module-202408131557").offset().top) { if (off202408131557) { off202408131557 = false; $(".e-module-202408131557 .num").each(function () { var _this = $(this); var num = parseInt(_this.attr("data-num")); var cishu = parseInt(num / 50); var curNum = 0; if (cishu < 1) { cishu = 1; } var iTime = setInterval(function () { if (num < curNum + cishu) { clearInterval(iTime); _this.text(formatNumberWithCommas(num)); } else { _this.text(formatNumberWithCommas(curNum += cishu)); } }, 30) }) } } }) } else { $(".e-module-202408131557 .num").each(function () { var _this = $(this); var num = parseInt(_this.attr("data-num")); _this.text(formatNumberWithCommas(num)); }) } } if ($('.e-module-202408141411').length > 0) { function module202408141411Fun($target) { var module202408141411Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.review = this.moduleObj.find('.event-content') this.resizeInit(); // resize初始化 this.clickEvent(); this.setVideoCenterShow(); // 视频居中显示 this.addVideoLink(this.moduleObj.find('.e-bg')); this.scrollEvent(); // 设置滚动事件,文字动画效果 this.resizeEvent(); // 设置自适应 }, resizeInit: function () { this.winw = this.win.width(); this.winh = this.win.height(); // 获取位置 this.scrollTop = this.win.scrollTop(); this.moduleTop = this.moduleObj.offset().top; }, clickEvent: function () { var _this = this; var widthW = 80; var borderR = 20; var paddingB = 120; if (this.winw > 1200) { $(window).on("scroll.e-module-202408141411", function () { var scrollTop = $(window).scrollTop() + $(window).height() * 0.3; if (scrollTop > _this.moduleTop) { // 向下滚动 if (widthW < 100) { widthW++; borderR--; paddingB--; } else { widthW = 100; borderR = 0; paddingB = 0; } _this.review.css({ 'width': widthW + '%', }); _this.moduleObj.css({ 'paddingBottom': paddingB + 'rem', }); _this.review.find('.e-bg').css({ 'borderRadius': borderR + 'rem' }); } else { // 向上滚动 if (widthW > 80) { widthW--; borderR++; paddingB++; } else { widthW = 80 borderR = 20; paddingB = 120; } _this.review.css('width', widthW + '%'); _this.moduleObj.css({ 'paddingBottom': paddingB + 'rem', }); _this.review.find('.e-bg').css({ 'borderRadius': borderR + 'rem' }); } }) } }, setVideoCenterShow: function () { // 设计规则:视频尺寸比例必须是1920*1080 var videoObj = this.moduleObj.find('.video'); if ((this.moduleObj.height() / this.winw) > (666 / 1920)) { // 视频就需要高度100%显示,左右裁切 videoObj.css({ width: 'auto', height: '100%' }) } else { videoObj.css({ width: '100%', height: 'auto' }) } }, addVideoLink: function (bgObj) { if (bgObj.data('src') != undefined && bgObj.data('src') != '' && this.winw > 1200) { // 添加video的dom结构 if (bgObj.find('.video').length == 0) { bgObj.append(""); } $('.open-screen').fadeOut(); // 判断视频是否已经赋值,如果赋值了,就不需要再次赋值了。 var videoObj = bgObj.find('.video'); if (videoObj.attr("src") != bgObj.data('src')) { videoObj.attr("src", bgObj.data('src')); } } else { bgObj.find('.video').remove(); } }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202408141411', function () { // 获取位置 _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; }); }, resizeEvent: function () { // 页面resize事件 var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202408141411', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); // resize初始化 _this.scrollEvent(); // 设置滚动事件,文字动画效果 }, 200) } }) } }; module202408141411Obj.init(); } // 初始化 $('.e-module-202408141411').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202408141411Fun($(this)); }) } if ($(".e-module-202408151601").length > 0 && $(window).width() > 992) { var objModule = $(".e-module-202408151601"); var objTitle = objModule.find(".e-cistern-l"); var objCon = objModule.find(".case-container"); var objImgBox = objModule.find(".case-container"); var objImg = objImgBox.find(".case-plate"); var winW = $(window).width(); var winH = $(window).height(); // 获取数值 var titleLeft = parseInt(objTitle.css("margin-left")); var objImgWidth = objImg.width(); var objImgHeight = objImg.height(); var objModuleHeight = objModule.outerHeight(true) * .8; // console.log(objModule.height() + "111") if (winW > 1024) { // 设置module的高度 objModule.css("height", objImgWidth - $(window).width() + objModuleHeight); // 图片定位后,图片盒子的高度让其不变化 objImgBox.css("height", objImgHeight); $(window).scroll(function () { // 获取对象 var scrollTop = $(window).scrollTop(); var objImgBoxTop = objImgBox.offset().top; // var objImgHeight = parseInt(objImgBox.height()); // var objModulePaddingTop = parseInt(objModule.css("paddingTop")); // 获取定位的位置 var scrollTop = (scrollTop + ($(window).height() - objImgHeight) / 2); if (scrollTop < objImgBoxTop) { objTitle.css({ "position": "relative", "top": 0, "left": 0 }) objImg.css({ "position": "relative", "top": 0, "left": 0 }) } else if (scrollTop > objImgBoxTop && scrollTop < objImgBoxTop + objImgWidth - winW) { // 定位标题板块 var titleTop = (winH - objImgHeight) / 2 - objTitle.height(); objTitle.css({ "position": "fixed", "top": titleTop, "left": titleLeft }) // 隐藏标题 ,滚动条滚动3次,隐藏标题。一次100,三次300 var num = 500; if (scrollTop > objImgBoxTop + num) { objTitle.css("opacity", 0); } else { objTitle.css("opacity", (num - (scrollTop - objImgBoxTop)) / num); } // 定位图片板块 var imgTop = (winH - objImgHeight) / 2; var imgLeft = -(scrollTop - objImgBoxTop); objImg.css({ "position": "fixed", "top": imgTop, "left": imgLeft }) } else { var imgTop = objModule.outerHeight(true) - objModuleHeight + (objModuleHeight - objImgHeight) / 2 - 100; objImg.css({ "position": "absolute", "top": imgTop, "right": 0, }) } }) } } if ($('.e-module-202409041446').length > 0) { function module202409041446Fun($target) { var module202409041446Obj = { init: function () { this.win = $(window); this.moduleObj = $target; this.tabList = this.moduleObj.find(".launch-tablist"); this.launchCon = this.moduleObj.find(".launch-cons"); this.launchConrow = this.moduleObj.find(".launch-cons >.row"); this.clickDown = $target.find('.click-down'); this.clickUp = $target.find('.click-up'); this.wapNavTitle = $target.find('.e-nav-title'); this.resizeInit(); this.scrollEvent(); this.clickEvent(); this.resizeEvent(); this.lazyPicLink(); }, resizeInit: function () { this.winw = this.win.width(); this.winh = this.win.height(); this.scrollTop = this.win.scrollTop(); this.moduleTop = this.moduleObj.offset().top; }, lazyPicLink: function () { if (this.scrollTop + this.winh * 1.5 > this.moduleTop) { this.moduleSlideObj = this.moduleObj.find(".e-lazy"); this.moduleSlideObj.each(function () { var $this = $(this); var imgObj = $this.find('img'); var src = imgObj.attr("data-original"); if (imgObj.attr("src") != src) { imgObj.attr("src", src) }; }); }; }, clickEvent: function () { var _this = this; _this.tabList.find(".launch-tab-item").on('click', function () { $(this).addClass('active').siblings().removeClass('active'); var index = $(this).index(); _this.moduleObj.find(".launch-content .launch-con").eq(index).addClass( 'active').siblings().removeClass('active'); if (_this.winw < 992) { _this.moduleObj.find(".launch-content .launch-con").eq(index).find( '.inner-item').eq(0).show(); _this.moduleObj.find(".launch-content .launch-con").eq(index).find( '.inner-item').eq(1).show(); }; }); _this.tabList.find(".launch-tab-item").eq(0).trigger('click'); _this.moduleObj.find('.inner-box-div').on('click', function () { var This = $(this); $('body').append($(this).parent().find('.launch-detail-pop').clone()).find( '>.launch-detail-pop').show(); $('body').css('overflow', 'hidden'); }); $('body').on('click', ".launch-detail-popcons", function () { $('body').find('>.launch-detail-pop').remove(); $('body').css('overflow', 'auto'); }); $('body').on('click', '.launch_detail_close_btn', function () { $('body').find('>.launch-detail-pop').remove(); $('body').css('overflow', 'auto'); }); $('body').on('click', '.launch-detail-popcon', function (e) { e.stopPropagation(); }); if (_this.winw < 992) { _this.clickDown.on('click', function () { var This = $(this); This.css('display', 'none'); This.parent().find('.inner-item').css('display', 'block'); This.siblings('.click-up').css('display', 'flex'); }); _this.clickUp.on('click', function () { var This = $(this); var box2Obj = This.parent().find('.inner-item'); box2Obj.each(function () { box2Obj.css("display", "none"); This.css('display', 'none'); This.siblings('.click-down').css('display', 'flex'); box2Obj.eq(0).show(); box2Obj.eq(1).show(); }); }); _this.wapNavTitle.on('click', function () { var _this = this; if ($(this).parent(".launch-con").hasClass("active")) { $(this).parent(".launch-con").removeClass("active"); } else { $(this).parents(".launch-content").find(".launch-con").removeClass("active"); $(this).parent(".launch-con").addClass("active"); $(this).parent(".launch-con").find( '.inner-item').eq(0).show(); $(this).parent(".launch-con").find( '.inner-item').eq(1).show(); } }); }; }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202409041446', function () { _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; _this.lazyPicLink(); }); }, resizeEvent: function () { var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202409041446', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; if (resizeTimer) { clearTimeout(resizeTimer); }; resizeTimer = setTimeout(function () { _this.resizeInit(); _this.scrollEvent(); }, 100); }; }); }, }; module202409041446Obj.init(); }; $('.e-module-202409041446').each(function () { var _this = $(this); if (_this.data('init')) { return; }; _this.data('init', true); module202409041446Fun($(this)); }); }; var $backtop = $(".backtop"); var $slide = $('.slidebars'); $(window).on('scroll.backtop', function () { var high = $(window).scrollTop(); var $high = 700; if (high > $high) { $('.xiazai').addClass('active'); setTimeout(() => { $('.xiazai').addClass('hide'); $('.slidebars').addClass('active'); }, 5000); }; high >= 700 ? $slide.fadeIn() : $slide.fadeOut(); }); $backtop.on('click', function () { $("html, body").animate({ scrollTop: 0 }); }); if ($('.translateY1').length > 0) { var winW = $(window).width(); var winH = $(window).height(); var translateY1Obj = $('.translateY1'); var scrollTop = 0; $(window).on("scroll.scrollBottomTopAnimeta", function () { if (winW > 992) { scrollTop = $(window).scrollTop(); translateY1Obj.each(function () { var _this = $(this); if (!_this.hasClass("translate")) { if (_this.offset().top < scrollTop + winH - 150) { _this.addClass("translate"); }; }; }); }; }); } if ($(".translateY1").length > 0 && $(window).width() < 1200) { $(".translateY1").removeClass("translateY1"); } if ($('.e-module-202409050946').length > 0) { function module202409050946Fun($target) { var module202409050946Obj = { init: function () { this.win = $(window); this.moduleObj = $target; this.toptab = $target.find(".agenda-top .tab"); this.agendaBot = $target.find('.agenda-bottom'); this.botTablist = this.agendaBot.find('.bot-tablist'); this.bottab = this.agendaBot.find('.bot-tab'); this.listItem = $target.find('.list-item'); this.detailCon = $target.find('.agenda-detail'); this.sum1 = this.agendaBot.find('.summit .day1').length; this.sum2 = this.agendaBot.find('.summit .day2').length; this.sum3 = this.agendaBot.find('.summit .day3').length; this.ses1 = this.agendaBot.find('.session .day1').length; this.ses2 = this.agendaBot.find('.session .day2').length; this.ses3 = this.agendaBot.find('.session .day3').length; this.forum1 = this.agendaBot.find('.forum .day1').length; this.forum2 = this.agendaBot.find('.forum .day2').length; this.forum3 = this.agendaBot.find('.forum .day3').length; this.filSel = $target.find('.fil-sel'); this.resizeInit(); this.clickEvent(); this.scrollEvent(); this.resizeEvent(); this.lazyPicLink(); }, resizeInit: function () { this.winw = this.win.width(); this.winh = this.win.height(); this.scrollTop = this.win.scrollTop(); this.moduleTop = this.moduleObj.offset().top; }, lazyPicLink: function () { if (this.scrollTop + this.winh * 1.5 > this.moduleTop) { this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.moduleSlideObj.each(function () { var $this = $(this); var imgObj = $this.find('img'); var src = imgObj.attr("data-original"); if (imgObj.attr("src") != src) { imgObj.attr("src", src); }; }); }; }, clickEvent: function () { var _this = this; _this.toptab.click(function () { var $this = $(this); if ($this.parent(".tablist").hasClass("preventClick")) { return; }; var _index = $this.index(); $this.addClass('active').siblings().removeClass('active'); if (_index == 0) { _this.bottab.on('click', function () { var $this = $(this); var index = $this.index(); $this.addClass('active').siblings().removeClass('active'); if (index == 0) { _this.agendaBot.find('.summit').show(); _this.agendaBot.find('.summit .day1').show(); _this.agendaBot.find('.summit .day2').hide(); _this.agendaBot.find('.summit .day3').hide(); _this.agendaBot.find('.session').hide(); } else { _this.agendaBot.find('.summit').hide(); _this.agendaBot.find('.session').show(); _this.agendaBot.find('.session .day1').show(); _this.agendaBot.find('.session .day2').hide(); _this.agendaBot.find('.session .day3').hide(); }; }); _this.bottab.eq(0).trigger('click'); if (_this.sum1 == 0) { _this.botTablist.hide(); } else { _this.agendaBot.find('.age-tit').show(); _this.bottab.eq(0).trigger('click'); }; if (_this.ses1 == 0) { _this.botTablist.hide(); } else { _this.agendaBot.find('.age-tit').show(); _this.bottab.eq(1).trigger('click'); }; if (_this.sum1 != 0 && _this.ses1 != 0) { _this.agendaBot.find('.age-tit').hide(); _this.botTablist.show(); _this.bottab.eq(0).trigger('click'); }; } else if (_index == 1) { _this.bottab.on('click', function () { var $this = $(this); var index = $this.index(); $this.addClass('active').siblings().removeClass('active'); if (index == 0) { _this.agendaBot.find('.summit').show(); _this.agendaBot.find('.summit .day2').show(); _this.agendaBot.find('.summit .day1').hide(); _this.agendaBot.find('.summit .day3').hide(); _this.agendaBot.find('.session').hide(); } else { _this.agendaBot.find('.summit').hide(); _this.agendaBot.find('.session').show(); _this.agendaBot.find('.session .day2').show(); _this.agendaBot.find('.session .day1').hide(); _this.agendaBot.find('.session .day3').hide(); }; }); _this.bottab.eq(0).trigger('click'); if (_this.sum2 == 0) { _this.botTablist.hide(); } else { _this.agendaBot.find('.age-tit').show(); _this.bottab.eq(0).trigger('click'); }; if (_this.ses2 == 0) { _this.botTablist.hide(); } else { _this.agendaBot.find('.age-tit').show(); _this.bottab.eq(1).trigger('click'); }; if (_this.sum2 != 0 && _this.ses2 != 0) { _this.agendaBot.find('.age-tit').hide(); _this.botTablist.show(); _this.bottab.eq(0).trigger('click'); }; } else { _this.bottab.on('click', function () { var $this = $(this); var index = $this.index(); $this.addClass('active').siblings().removeClass('active'); if (index == 0) { _this.agendaBot.find('.summit').show(); _this.agendaBot.find('.summit .day3').show(); _this.agendaBot.find('.summit .day1').hide(); _this.agendaBot.find('.summit .day2').hide(); _this.agendaBot.find('.session').hide(); } else { _this.agendaBot.find('.summit').hide(); _this.agendaBot.find('.session').show(); _this.agendaBot.find('.session .day3').show(); _this.agendaBot.find('.session .day1').hide(); _this.agendaBot.find('.session .day2').hide(); }; }); _this.bottab.eq(0).trigger('click'); if (_this.sum3 == 0) { _this.botTablist.hide(); } else { _this.agendaBot.find('.age-tit').show(); _this.bottab.eq(0).trigger('click'); }; if (_this.ses3 == 0) { _this.botTablist.hide(); } else { _this.agendaBot.find('.age-tit').show(); _this.bottab.eq(1).trigger('click'); }; if (_this.sum3 != 0 && _this.ses3 != 0) { _this.agendaBot.find('.age-tit').hide(); _this.botTablist.show(); _this.bottab.eq(0).trigger('click'); } }; }); _this.toptab.eq(0).trigger('click'); _this.bottab.on('click', function () { var $this = $(this); var _index = $this.index(); $this.addClass('active').siblings().removeClass('active'); if (_index == 0) { _this.agendaBot.find('.summit').show(); _this.agendaBot.find('.summit .day1').show(); _this.agendaBot.find('.summit .day2').hide(); _this.agendaBot.find('.summit .day3').hide(); _this.agendaBot.find('.session').hide(); } else { _this.agendaBot.find('.summit').hide(); _this.agendaBot.find('.session').show(); _this.agendaBot.find('.session .day1').show(); _this.agendaBot.find('.session .day2').hide(); _this.agendaBot.find('.session .day3').hide(); }; }); _this.bottab.eq(0).trigger('click'); _this.filSel.click(function () { $(this).parent().toggleClass('active'); $(this).parent().siblings().removeClass('active'); }); _this.moduleObj.find(".filter .filter-cont .filter-item .fil-list ul li").on("click", function () { _this.moduleObj.find(".age-tit").hide(); _this.moduleObj.find(".agenda-box").hide(); _this.moduleObj.find(".list-item").hide(); _this.moduleObj.find(".list-item1").hide(); var str = $(this).data("type"); _this.moduleObj.find('.current-filter').css('display', 'flex').find(".cur-filter-p2").text(str); if (_this.winw > 992) { _this.moduleObj.find(".filter-item").removeClass('active'); } else { _this.moduleObj.find(".filter-content-list").hide(); $(this).addClass('active').siblings().removeClass('active'); }; _this.moduleObj.find(".list-item").each(function () { if ($(this).data("type") == str) { $(this).show(); $(this).parents(".agenda-box").show().find(".age-tit").show(); $(this).find('.item-time').addClass('active'); }; }); _this.moduleObj.find(".tablist").addClass("preventClick"); _this.toptab.removeClass('active'); _this.botTablist.hide(); }); _this.moduleObj.find('.current-filter-close').on('click', function () { _this.moduleObj.find(".tablist").removeClass("preventClick"); _this.moduleObj.find('.current-filter').hide(); _this.moduleObj.find(".age-tit").show(); _this.moduleObj.find(".agenda-box").show(); _this.moduleObj.find(".list-item").show(); _this.moduleObj.find(".list-item1").show(); _this.moduleObj.find(".list-item").removeClass('active'); _this.moduleObj.find(".list-item").find('.agenda-detail').hide(); _this.toptab.eq(0).trigger('click'); _this.moduleObj.find('.item-time').removeClass('active'); _this.agendaBot.find('.day1').show(); _this.agendaBot.find('.day2').hide(); _this.agendaBot.find('.day3').hide(); _this.botTablist.show(); _this.bottab.eq(0).trigger('click'); }); _this.moduleObj.find('.filter-wap').on('click', function () { $(this).parent().find('.filter-content-list').show(); _this.moduleObj.find(".filter-item").eq(0).addClass('active').siblings().removeClass('active'); }); _this.moduleObj.find('.filter-popup .iconfont').on('click', function () { $(this).parents('.filter-content-list').hide(); }); _this.listItem.find('.agenda-item-con').on('click', function () { $(this).parent().find('.agenda-detail').slideToggle(); $(this).parent().toggleClass('active'); }) }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202409050946', function () { _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; _this.lazyPicLink(); }); }, resizeEvent: function () { var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202409050946', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; if (resizeTimer) { clearTimeout(resizeTimer); }; resizeTimer = setTimeout(function () { _this.resizeInit(); _this.scrollEvent(); }, 100); }; }); }, }; module202409050946Obj.init(); }; $('.e-module-202409050946').each(function () { var _this = $(this); if (_this.data('init')) { return; }; _this.data('init', true); module202409050946Fun($(this)); }); }; if ($('.e-module-202409041335').length > 0) { function module202409041335Fun($target) { var module202409041335Obj = { init: function () { this.win = $(window); this.moduleObj = $target; this.moduleWrapperObj = this.moduleObj.find(".swiper-wrapper"); this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.resizeInit(); this.judgmentSwiper(); this.scrollEvent(); this.resizeEvent(); this.lazyPicLink(); }, resizeInit: function () { this.winw = this.win.width(); this.winh = this.win.height(); this.scrollTop = this.win.scrollTop(); this.moduleTop = this.moduleObj.offset().top; }, judgmentSwiper: function () { if (this.moduleSlideObj.length > 1) { if (this.moduleObj.data("swiper-init")) { return; }; this.moduleObj.data("swiper-init", true); this.initSwiper(); } }, lazyPicLink: function () { if (this.scrollTop + this.winh * 1.5 > this.moduleTop) { this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.moduleSlideObj.each(function () { var $this = $(this); var imgObj = $this.find('img'); var src = imgObj.attr("data-original"); if (imgObj.attr("src") != src) { imgObj.attr("src", src); }; }); }; }, initSwiper: function () { var _this = this; var slidesPerGroup = 2; if (_this.winw > 992) { slidesPerGroup = 4; } var slideLength = $target.find(".swiper-slide").length; var mySwiper = new Swiper($target.find(".swiper"), { watchOverflow: true, spaceBetween: 20, slidesPerView: 2, resistanceRatiao: 1, slidesPerGroup: slidesPerGroup, autoplay: $target.data("auto-time") ? { delay: $target.data("auto-time"), stopOnLastSlide: false, disableOnInteraction: true } : false, loop: slideLength > 2 ? true : false, noSwiping: slideLength > 1 ? false : true, pagination: { el: $target.find('.swiper-pagination'), clickable: true, clickable: true, }, breakpoints: { 1200: { slidesPerView: 4, spaceBetween: 40, loop: slideLength > 4 ? true : false, }, 992: { slidesPerView: 4, spaceBetween: 20, loop: slideLength > 4 ? true : false, }, }, on: { init: function () { if (_this.winw > 992) { if (_this.moduleSlideObj.length < 5) { $target.find('.swiper-button').hide(); $target.find('.swiper-wrapper').css('justify-content', 'space-around'); if (_this.winw > 992 && _this.winw < 1200) { $target.find('.swiper-pagination').hide(); }; }; } else { if (_this.moduleSlideObj.length < 3) { $target.find('.swiper-pagination').hide(); }; }; }, resize: function () { var This = this; setTimeout(function () { if (_this.winw > 992) { slidesPerGroup = 4; } else { slidesPerGroup = 2; } This.emit('init'); This.update(); }, 150); }, }, }); mySwiper.el.onmouseover = function () { mySwiper.autoplay.stop(); }; mySwiper.el.onmouseout = function () { mySwiper.autoplay.start(); }; }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202409041335', function () { _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; _this.lazyPicLink(); }); }, resizeEvent: function () { var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202409041335', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; if (resizeTimer) { clearTimeout(resizeTimer); }; resizeTimer = setTimeout(function () { _this.resizeInit(); _this.judgmentSwiper(); _this.scrollEvent(); }, 100); }; }); }, }; module202409041335Obj.init(); }; $('.e-module-202409041335').each(function () { var _this = $(this); if (_this.data('init')) { return; }; _this.data('init', true); module202409041335Fun($(this)); }); }; })