if ($('.e-module-202311071441').length > 0) { function module202311071441Fun($target) { var module202311071441Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.h400TextObj = this.moduleObj.hasClass('h400Text'); this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.resizeInit(); // resize初始化 this.saveAClass(); // 如果移动端设置了文字在图片下面,保存按钮颜色 this.judgmentSwiper(); // 判断需不需要执行swiper,如果只有一个就不需要执行。多个就需要执行 this.scrollEvent(); // 设置滚动事件,文字动画效果 this.resizeEvent(); // 设置自适应 // this.lazyVideoLink(); // 视频是否加载 // 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; }, saveAClass: function () { var _this = this; if (_this.h400TextObj) { _this.aClassArr = []; $target.find('a').each(function () { _this.aClassArr.push($(this).attr('class')); }) } }, 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.addPicLink(); // } // }, // lazyVideoLink: function () { // // 加载视频 // if (this.scrollTop + this.winh * 1.5 > this.moduleTop) { // // 当滚动条滚动到当前位置时,加载视频 // this.addVideoLink(); // } // }, addPicLink: function () { this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.moduleSlideObj.each(function () { var $this = $(this); var src = $this.find('img').attr("data-original"); if ($this.find(".e-bg").css("backgroundImage") != "url(" + src + ")") { $this.find(".e-bg").css("backgroundImage", "url('" + src + "')"); $this.find(".e-lazy").css("display", "none"); } }) }, addVideoLink: function () { if (this.winw > 1200) { this.moduleSlideObj = $target.find(".swiper-slide"); this.moduleSlideObj.each(function () { var $this = $(this); if ($this.find(".e-bg").data('src') != '' && $this.find('.video').length == 0) { // 添加video的dom结构 $this.find(".e-bg").append(""); // 判断视频是否已经赋值,如果赋值了,就不需要再次赋值了。 $this.find('.video').attr("src", $this.find(".e-bg").data('src')); } }) } else { $target.find('.video').remove(); } }, initSwiper: function () { var _this = this; var slideLength = $target.find(".swiper-slide").length; var mySwiper = new Swiper($target.find(".swiper-container"), { pagination: { // 设置点点点 el: $target.find('.swiper-pagination'), clickable: true }, grabCursor: slideLength > 1 ? true : false, autoplay: $target.data("auto-time") ? { delay: $target.data("auto-time"), stopOnLastSlide: false, disableOnInteraction: true } : false, loop: slideLength > 1 ? true : false, // 设置自动轮播 noSwiping: slideLength > 1 ? false : true, runCallbacksOnInit: true, on: { init: function () { $target.find(".swiper-pagination").show(); }, slideChangeTransitionEnd: function () { _this.activeIndex = this.activeIndex; setTimeout(function () { // 根据文字颜色变化底部点点点的颜色 var $currentSilde = $target.find(".swiper-slide-active"); var $pr = $currentSilde.parent(); if ($currentSilde.hasClass('isBlackFont')) { $pr.next('.swiper-pagination').addClass('gray'); } else { $pr.next('.swiper-pagination').removeClass('gray'); } }, 0) }, resize: function () { var _this = this; setTimeout(function () { _this.update(); //窗口变化时,更新Swiper的一些属性,如宽高等 _this.emit('slideChangeTransitionEnd'); }, 250) }, } }); //鼠标覆盖停止自动切换 mySwiper.el.onmouseover = function () { mySwiper.autoplay.stop(); } //鼠标离开开始自动切换 mySwiper.el.onmouseout = function () { mySwiper.autoplay.start(); } }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202311071441', function () { // 获取位置 _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; // _this.lazyVideoLink(); // 视频是否加载 // _this.lazyPicLink(); // 视频是否图片 }); }, resizeEvent: function () { // 页面resize事件 var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202311071441', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); // resize初始化 _this.scrollEvent(); // 设置滚动事件,文字动画效果 }, 200) } }) } }; module202311071441Obj.init(); } // 初始化 $('.e-module-202311071441').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202311071441Fun($(this)); }) } // 应用场景 if ($('.e-module-202311091001').length > 0) { function module202311091001Fun($target) { var module202311091001Obj = { init: function () { // 获取对象 this.win = $(window); this.moduleObj = $target; this.tabLi = this.moduleObj.find('.thumbsslider .li'); this.conList = this.moduleObj.find('.app-box .list'); this.moduleWrapperObj = this.moduleObj.find(".swiper-wrapper"); this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.resizeInit(); // 初始化变量 // this.judgmentSwiper(); // 判断需不需要执行swiper this.lazyPicLink(); // 懒加载图片 this.scrollEvent(); // 滚动事件 this.clickEvent(); // 点击事件 this.resizeEvent(); // 屏幕放大缩小 }, resizeInit: function () { var _this = this; this.winw = this.win.width(); this.winh = this.win.height(); this.switch = true; this.oneClick = false; }, judgmentSwiper: function () { 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(".why-item"); 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; // pc端点击事件 _this.tabLi.off('click').on('click', function () { var This = $(this); var _index = This.index(); This.addClass('active').siblings().removeClass('active'); _this.conList.eq(_index).addClass('active').siblings().removeClass('active'); }) // 移动端点击事件 _this.conList.find('.app-pic').off('click').on('click', function () { var This = $(this); This.parents('.list').addClass('active').siblings().removeClass('active'); var top = This.parents('.list').offset().top - 60; if (_this.oneClick) { $("html,body").animate({ scrollTop: top }); } else { _this.oneClick = true } }) // 默认点击一次 if (this.winw > 992) { _this.tabLi.eq(0).trigger('click'); } else { _this.conList.eq(0).find('.app-pic').trigger('click'); } }, initSwiper: function () { var _this = this; // 每次滚动的数量 var slidesPerGroup = 1; var slideLength = $target.find(".swiper-slide").length; var mySwiper = new Swiper($target.find(".swiper-container"), { watchOverflow: true, // 一屏不显示左右箭头以及pagination spaceBetween: 80, // 板块与板块之间的间距 slidesPerView: 8, //每屏幕显示的个数 slidesPerGroup: slidesPerGroup, // 每次轮播的个数 resistanceRatiao: 1, //触底不反弹 // 如果需要前进后退按钮 navigation: { nextEl: $target.find('.swiper-button-next'), prevEl: $target.find('.swiper-button-prev'), }, autoplay: false, on: { init: function () { }, resize: function () { var This = this; setTimeout(function () { // This.emit('init'); This.update(); //窗口变化时,更新Swiper的一些属性,如宽高等 }, 150) }, } }); }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202311091001', function () { _this.lazyPicLink(); }); }, resizeEvent: function () { // 页面resize事件 var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202311091001', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); // 初始化变量 _this.lazyPicLink(); // 懒加载图片 _this.scrollEvent(); // 滚动事件 _this.clickEvent(); // 点击事件 }, 100) } }) } }; module202311091001Obj.init(); } // 初始化 $('.e-module-202311091001').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202311091001Fun($(this)); }) } //重磅1 if ($('.e-module-202311131515').length > 0) { function module202311131515Fun($target) { var module202311131515Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.h400TextObj = this.moduleObj.hasClass('h400Text'); this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.resizeInit(); // resize初始化 this.judgmentSwiper(); // 判断需不需要执行swiper,如果只有一个就不需要执行。多个就需要执行 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; }, judgmentSwiper: function () { if (this.moduleSlideObj.length > 1) { if (this.moduleObj.data("swiper-init")) { return; } this.moduleObj.data("swiper-init", true); this.initSwiper(); } }, initSwiper: function () { var _this = this; var slideLength = $target.find(".swiper-slide").length; var mySwiper1 = new Swiper($target.find(".wifi-swiper"), { pagination: { el: $target.find('.swiper-pagination1'), clickable: true, }, grabCursor: slideLength > 1 ? true : false, navigation: { nextEl: $target.find('.icon-right'), prevEl: $target.find('.icon-left'), }, noSwiping: slideLength > 1 ? false : true, runCallbacksOnInit: true, on: { init: function () { $target.find(".swiper-pagination1").show(); $target.find(".icon-right").css('display', 'flex'); $target.find(".icon-left").css('display', 'flex'); }, resize: function () { var _this = this; setTimeout(function () { _this.update(); //窗口变化时,更新Swiper的一些属性,如宽高等 }, 250) }, } }); }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202311131515', 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.202311131515', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); // resize初始化 _this.scrollEvent(); // 设置滚动事件,文字动画效果 }, 200) } }) } }; module202311131515Obj.init(); } // 初始化 $('.e-module-202311131515').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202311131515Fun($(this)); }) } //重磅2 if ($('.e-module-202312081506').length > 0) { function module202312081506Fun($target) { var module202312081506Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.h400TextObj = this.moduleObj.hasClass('h400Text'); this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.resizeInit(); // resize初始化 this.judgmentSwiper(); // 判断需不需要执行swiper,如果只有一个就不需要执行。多个就需要执行 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; }, judgmentSwiper: function () { if (this.moduleSlideObj.length > 1) { if (this.moduleObj.data("swiper-init")) { return; } this.moduleObj.data("swiper-init", true); this.initSwiper(); } }, initSwiper: function () { var _this = this; var slideLength = $target.find(".swiper-slide").length; var mySwiper1 = new Swiper($target.find(".wifi-swiper"), { pagination: { el: $target.find('.swiper-pagination1'), clickable: true, }, grabCursor: slideLength > 1 ? true : false, navigation: { nextEl: $target.find('.icon-right'), prevEl: $target.find('.icon-left'), }, noSwiping: slideLength > 1 ? false : true, runCallbacksOnInit: true, on: { init: function () { $target.find(".swiper-pagination1").show(); $target.find(".icon-right").css('display', 'flex'); $target.find(".icon-left").css('display', 'flex'); }, resize: function () { var _this = this; setTimeout(function () { _this.update(); //窗口变化时,更新Swiper的一些属性,如宽高等 }, 250) }, } }); }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202312081506', 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.202312081506', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); // resize初始化 _this.scrollEvent(); // 设置滚动事件,文字动画效果 }, 200) } }) } }; module202312081506Obj.init(); } // 初始化 $('.e-module-202312081506').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202312081506Fun($(this)); }) } if ($('.e-module-202311081035').length > 0) { function module202311081035Fun($target) { var module202311081035Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.wifi6 = this.moduleObj.find('.wifi6-wifi7'); this.wifiJ = this.moduleObj.find('.wifi-zhijianzhou'); this.whyCon = this.moduleObj.find('.why-container'); this.resizeInit(); // resize初始化 if (this.winw < 992) { this.initSwiper(this.whyCon); } this.resizeEvent(); // 设置自适应 this.lazyPicLink(); this.scrollEvent(); // ebgLib.v3SetHeight(this.whyCon, '.why-item', '.why-tit'); // ebgLib.v3SetHeight(this.whyCon, '.why-tit', 'p'); // ebgLib.v3SetHeight(this.whyCon, '.why-tit', 'h3'); }, 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) } }) } }, initSwiper: function (This) { var imgObj = This.find('.e-col-xl-3'); this.mySwiper = ' '; if (imgObj.length > 1) { this.mySwiper = new Swiper(This, { watchOverflow: true, // 一屏不显示左右箭头以及pagination spaceBetween: 20, // 板块与板块之间的间距 slidesPerView: 1, //每屏幕显示的个数 resistanceRatiao: 1, //触底不反弹 slidesPerGroup: 1, pagination: { // 设置点点点 el: This.find('.swiper-pagination') }, breakpoints: { 750: { slidesPerView: 2, spaceBetween: 20, slidesPerGroup: 2, } }, on: { init: function () { This.find(".swiper-pagination").show(); }, resize: function () { var _this = this; setTimeout(function () { _this.update(); //窗口变化时,更新Swiper的一些属性,如宽高等 }, 150) }, } }) } }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202311081035', function () { // 获取位置 _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; if (_this.scrollTop >= _this.wifiJ.offset().top) { _this.wifi6.find('.ani .xian').addClass('active') } }); }, resizeEvent: function () { // 页面resize事件 var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202311081035', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); // resize初始化 // ebgLib.v3SetHeight(this.whyCon, '.why-item', '.why-tit'); // ebgLib.v3SetHeight(this.whyCon, '.why-tit', 'p'); // ebgLib.v3SetHeight(this.whyCon, '.why-tit', 'h3'); _this.scrollEvent(); // 设置滚动事件,文字动画效果 }, 200) } }) } }; module202311081035Obj.init(); } // 初始化 $('.e-module-202311081035').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202311081035Fun($(this)); }) } // 商用部署 if ($('.e-module-202312050931').length > 0) { function module202312050931Fun($target) { var module202312050931Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.moduleWrapperObj = this.moduleObj.find(".swiper-wrapper"); this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.resizeInit(); // resize初始化 this.judgmentSwiper(); // 判断需不需要执行swiper 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 = 1; if (_this.winw > 1200) { slidesPerGroup = 3; } else if (_this.winw > 750) { slidesPerGroup = 1; } var mySwiper = new Swiper($target.find(".swiper"), { watchOverflow: true, // 一屏不显示左右箭头以及pagination spaceBetween: 20, // 板块与板块之间的间距 slidesPerView: "auto", //每屏幕显示的个数 slidesPerGroup: slidesPerGroup, // 每次轮播的个数 // 如果需要前进后退按钮 navigation: { nextEl: $target.find('.swiper-button-next'), prevEl: $target.find('.swiper-button-prev'), }, // 如果需要分页器 pagination: { el: $target.find('.swiper-pagination'), clickable: true, }, breakpoints: { // 最小屏幕 1200: { slidesPerView: "auto", spaceBetween: 30, }, 920: { slidesPerView: "auto", spaceBetween: 20, }, 750: { slidesPerView: "auto", spaceBetween: 20, } }, on: { init: function () { // 在不同屏幕下,是否显示点点点 $target.find(".swiper-pagination").hide(); // 默认先隐藏 if (_this.winw > 1200) { if (_this.moduleSlideObj.length > 3) { $target.find(".swiper-pagination").show(); $target.find(".swiper-button").css({ "display": "flex" }) } else if (_this.moduleSlideObj.length == 3) { $target.find(".swiper-pagination").hide(); } } else if (_this.winw > 750) { $target.find(".swiper-button").css({ "display": "none" }) if (_this.moduleSlideObj.length > 1) { $target.find(".swiper-pagination").show(); } } else { $target.find(".swiper-button").css({ "display": "none" }) if (_this.moduleSlideObj.length > 1) { $target.find(".swiper-pagination").show(); } } }, resize: function () { var This = this; setTimeout(function () { // 不同屏幕下,轮播个数 if (_this.winw > 1200) { This.params.slidesPerGroup = 3; } else if (_this.winw > 750) { This.params.slidesPerGroup = 2; } else { This.params.slidesPerGroup = 1; } This.emit('init'); This.update(); //窗口变化时,更新Swiper的一些属性,如宽高等 }, 150) }, } }); }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202312050931', function () { // 获取位置 _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; _this.lazyPicLink(); // 视频是否图片 }); }, resizeEvent: function () { // 页面resize事件 var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202312050931', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); // resize初始化 _this.judgmentSwiper(); // 判断需不需要执行swiper _this.scrollEvent(); // 设置滚动事件,文字动画效果 }, 100) } }) } }; module202312050931Obj.init(); } // 初始化 $('.e-module-202312050931').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202312050931Fun($(this)); }) } // 大咖观点 if ($('.e-module-202312111022').length > 0) { function module202312111022Fun($target) { var module202312111022Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.moduleWrapperObj = this.moduleObj.find(".swiper-wrapper"); this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.resizeInit(); // resize初始化 this.judgmentSwiper(); // 判断需不需要执行swiper 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("img"); this.moduleSlideObj.each(function () { var $this = $(this); // var imgObj = $this.find('img'); var src = $this.attr("data-original"); if ($this.attr("src") != src) { $this.attr("src", src) } }) } }, clickEvent: function () { var _this = this; }, initSwiper: function () { var _this = this; var mySwiper = new Swiper($target.find(".swiper"), { watchOverflow: true, // 一屏不显示左右箭头以及pagination spaceBetween: 20, // 板块与板块之间的间距 slidesPerView: 1, //每屏幕显示的个数 slidesPerGroup: 1, // 每次轮播的个数 centeredSlides: true, loop: true, autoplay: { delay: 5000 }, // 如果需要前进后退按钮 navigation: { nextEl: $target.find('.swiper-button-next'), prevEl: $target.find('.swiper-button-prev'), }, // 如果需要分页器 pagination: { el: $target.find('.swiper-pagination'), clickable: true, }, breakpoints: { // 最小屏幕 1300: { slidesPerView: 1.5, spaceBetween: 30, }, 1200: { slidesPerView: 1.5, spaceBetween: 20, }, 920: { slidesPerView: 1.3, spaceBetween: 20, }, 750: { slidesPerView: 1, spaceBetween: 20, } }, on: { init: function () { // 在不同屏幕下,是否显示点点点 $target.find(".swiper-pagination").hide(); // 默认先隐藏 if (_this.winw > 1200) { if (_this.moduleSlideObj.length > 1) { $target.find(".swiper-pagination").show(); $target.find(".swiper-btn").css({ "display": "flex" }) } } else if (_this.winw > 750) { $target.find(".swiper-btn").css({ "display": "none" }) if (_this.moduleSlideObj.length > 1) { $target.find(".swiper-pagination").show(); } } else { $target.find(".swiper-btn").css({ "display": "none" }) if (_this.moduleSlideObj.length > 1) { $target.find(".swiper-pagination").show(); } } }, resize: function () { var This = this; setTimeout(function () { This.emit('init'); This.update(); //窗口变化时,更新Swiper的一些属性,如宽高等 }, 150) }, } }); //鼠标覆盖停止自动切换 mySwiper.el.onmouseover = function () { mySwiper.autoplay.stop(); } //鼠标离开开始自动切换 mySwiper.el.onmouseout = function () { mySwiper.autoplay.start(); } }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202312111022', function () { // 获取位置 _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; _this.lazyPicLink(); // 视频是否图片 }); }, resizeEvent: function () { // 页面resize事件 var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202312111022', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); // resize初始化 _this.judgmentSwiper(); // 判断需不需要执行swiper _this.scrollEvent(); // 设置滚动事件,文字动画效果 }, 100) } }) } }; module202312111022Obj.init(); } // 初始化 $('.e-module-202312111022').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202312111022Fun($(this)); }) } // 相关新闻 if ($('.e-module-202312121652').length > 0) { function module202312121652Fun($target) { var module202312121652Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.moduleWrapperObj = this.moduleObj.find(".swiper-wrapper"); this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.resizeInit(); // resize初始化 this.judgmentSwiper(); // 判断需不需要执行swiper 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 = 1; if (_this.winw > 1200) { slidesPerGroup = 4; } else if (_this.winw > 750) { slidesPerGroup = 2; } var mySwiper = new Swiper($target.find(".news-swiper"), { watchOverflow: true, // 一屏不显示左右箭头以及pagination spaceBetween: 20, // 板块与板块之间的间距 slidesPerView: 1, //每屏幕显示的个数 slidesPerGroup: slidesPerGroup, // 每次轮播的个数 // 如果需要前进后退按钮 navigation: { nextEl: $target.find('.icon-right'), prevEl: $target.find('.icon-left') }, // 如果需要分页器 pagination: { el: $target.find('.swiper-pagination'), clickable: true, }, breakpoints: { // 最小屏幕 1200: { slidesPerView: 4, spaceBetween: 30, }, 992: { slidesPerView: 3, spaceBetween: 20, }, 750: { slidesPerView: 2, spaceBetween: 20, } }, on: { init: function () { // 在不同屏幕下,是否显示点点点 $target.find(".swiper-pagination").hide(); // 默认先隐藏 if (_this.winw > 1200) { if (_this.moduleSlideObj.length > 4) { $target.find(".swiper-pagination").show(); } else if (_this.moduleSlideObj.length == 4) { $target.find(".swiper-pagination").hide(); } else if (_this.moduleSlideObj.length < 4) { $target.find('.swiper-wrapper').css({ "justify-content": "center" }) } } else if (_this.winw > 750) { if (_this.moduleSlideObj.length > 2) { $target.find(".swiper-pagination").show(); } } else { if (_this.moduleSlideObj.length > 1) { $target.find(".swiper-pagination").show(); } } }, resize: function () { var This = this; setTimeout(function () { // 不同屏幕下,轮播个数 if (_this.winw > 1200) { This.params.slidesPerGroup = 3; } else if (_this.winw > 750) { This.params.slidesPerGroup = 2; } else { This.params.slidesPerGroup = 1; } This.emit('init'); This.update(); //窗口变化时,更新Swiper的一些属性,如宽高等 }, 150) }, } }); }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202312121652', function () { // 获取位置 _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; _this.lazyPicLink(); // 视频是否图片 }); }, resizeEvent: function () { // 页面resize事件 var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202312121652', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); // resize初始化 _this.judgmentSwiper(); // 判断需不需要执行swiper _this.scrollEvent(); // 设置滚动事件,文字动画效果 }, 100) } }) } }; module202312121652Obj.init(); } // 初始化 $('.e-module-202312121652').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202312121652Fun($(this)); }) } // 判断此模板有没有在页面上显示 if ($('.e-module-202403211611').length > 0) { function module202403211611Fun($target) { var module202403211611Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.tabObj = this.moduleObj.find('.tablist .tab'); this.caseLObj = this.moduleObj.find('.case-l-item'); this.caseRObj = this.moduleObj.find('.case-item'); this.caseDes = this.moduleObj.find('.case-des'); this.caseLObjH = this.caseLObj.height() // 调用函数 this.resizeInit(); // 需要rezise的变量 this.lazyPicLink(); // 视频是否图片 this.scrollEvent(); // 滚动条事件 this.clickEvent(); // 点击关闭顶部的cookie声明,重新计算banner高度 // this.setHeight(); this.resizeEvent(); }, resizeInit: function () { this.winh = this.win.height(); this.winw = this.win.width(); // 获取位置 this.scrollTop = this.win.scrollTop(); this.moduleTop = this.moduleObj.offset().top; this.oneClick = false; }, lazyPicLink: function () { // 加载图片 if (this.scrollTop + this.winh * 1.5 > this.moduleTop) { // 当滚动条滚动到当前位置时,加载视频 this.addPicLink(); } }, lazyPicLink: function () { var _this = this; // 获取位置 _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; // 加载图片 if (_this.scrollTop + _this.winh * 1.5 > _this.moduleTop) { // 当滚动条滚动到当前位置时,加载图片 _this.moduleImgObj = $target.find("img"); _this.moduleImgObj.each(function () { var This = $(this); This.attr('src', This.attr('data-original')); }); } }, setHeight: function () { if (this.winw > 992) { var rightObj = this.caseRObj.find('.case-item-pro'); // var caseDes = this.caseRObj.find('.case-des'); var proH = this.caseLObj.height() - this.tabObj.outerHeight() - this.caseH - 80; if (this.winw > 1200 && this.winw < 1600) { var proH = this.caseLObj.height() - this.tabObj.outerHeight() - this.caseH - 60; } if (this.winw > 992 && this.winw < 1200) { var proH = this.caseLObj.height() - this.tabObj.outerHeight() - this.caseH - 40; } rightObj.css({ height: proH, }) } else { // this.conList.find('.right').removeAttr("style"); } }, clickEvent: function () { var _this = this; _this.tabObj.on('click', function () { var _index = $(this).index(); $(this).addClass('active').siblings().removeClass('active'); _this.caseLObj.eq(_index).addClass('active').siblings().removeClass('active') _this.caseRObj.eq(_index).addClass('active').siblings().removeClass('active') var caseH = _this.caseRObj.eq(_index).find('.case-des').outerHeight(); if (_this.winw > 992) { var rightObj = _this.caseRObj.eq(_index).find('.case-item-pro'); // console.log(_this.caseLObjH, _this.tabObj.outerHeight(), caseH) var proH = _this.caseLObjH - _this.tabObj.outerHeight() - caseH - 65; if (_this.winw > 1200 && _this.winw < 1600) { var proH = _this.caseLObjH - _this.tabObj.outerHeight() - caseH - 60; } if (_this.winw > 992 && _this.winw < 1200) { var proH = _this.caseLObjH - _this.tabObj.outerHeight() - caseH - 40; } rightObj.css({ height: proH, }) } }); // 移动端点击事件 _this.caseRObj.find('.app-case-btn').off('click').on('click', function () { var This = $(this); This.parents('.case-item').addClass('active').siblings().removeClass('active'); var top = This.parents('.case-item').offset().top - 60; // 加载swiper _this.initSwiper(This.nextAll('.case-item-pro')); if (_this.oneClick) { $("html,body").animate({ scrollTop: top }); } else { _this.oneClick = true } }) // 默认点击一次 if (this.winw > 992) { _this.tabObj.eq(0).trigger('click'); } else { _this.moduleObj.find('.case-item').eq(0).find('.app-case-btn').trigger('click'); } }, scrollEvent: function () { var _this = this; this.win.on('scroll.202403211611', function () { _this.lazyPicLink(); }) }, initSwiper: function (This) { var imgObj = This.find('.e-col-xl-6'); this.mySwiper = ' '; if (imgObj.length > 1) { this.mySwiper = new Swiper(This, { watchOverflow: true, // 一屏不显示左右箭头以及pagination spaceBetween: 20, // 板块与板块之间的间距 slidesPerView: 1, //每屏幕显示的个数 resistanceRatiao: 1, //触底不反弹 pagination: { // 设置点点点 el: This.find('.swiper-pagination') }, on: { init: function () { This.find(".swiper-pagination").show(); }, resize: function () { var _this = this; setTimeout(function () { _this.update(); //窗口变化时,更新Swiper的一些属性,如宽高等 }, 150) }, } }) } }, resizeEvent: function () { // 页面resize事件 var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { // 调用函数 _this.resizeInit(); // 需要rezise的变量 _this.scrollEvent(); // 滚动条事件 _this.clickEvent(); // 点击关闭顶部的cookie声明,重新计算banner高度 }, 200) } }) } } module202403211611Obj.init(); } // 初始化 $('.e-module-202403211611').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202403211611Fun($(this)); }) } // 相关资料 // if ($('.e-module-202312131016').length > 0) { // function module202312131016Fun($target) { // var module202312131016Obj = { // init: function () { // // 获取属性 // this.win = $(window); // this.moduleObj = $target; // this.moduleWrapperObj = this.moduleObj.find(".swiper-wrapper"); // this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); // this.resizeInit(); // resize初始化 // this.judgmentSwiper(); // 判断需不需要执行swiper // 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 = 1; // if (_this.winw > 1200) { // slidesPerGroup = 4; // } else if (_this.winw > 750) { // slidesPerGroup = 2; // } // var mySwiper = new Swiper($target.find(".news-swiper"), { // watchOverflow: true, // 一屏不显示左右箭头以及pagination // spaceBetween: 20, // 板块与板块之间的间距 // slidesPerView: 1, //每屏幕显示的个数 // slidesPerGroup: slidesPerGroup, // 每次轮播的个数 // // 如果需要前进后退按钮 // navigation: { // nextEl: $target.find('.swiper-button-next'), // prevEl: $target.find('.swiper-button-prev'), // }, // // 如果需要分页器 // pagination: { // el: $target.find('.swiper-pagination'), // clickable: true, // }, // breakpoints: { // // 最小屏幕 // 1200: { // slidesPerView: 4, // spaceBetween: 30, // }, // 992: { // slidesPerView: 3, // spaceBetween: 20, // }, // 750: { // slidesPerView: 2, // spaceBetween: 20, // } // }, // on: { // init: function () { // // 在不同屏幕下,是否显示点点点 // $target.find(".swiper-pagination").hide(); // 默认先隐藏 // if (_this.winw > 1200) { // if (_this.moduleSlideObj.length > 4) { // $target.find(".swiper-pagination").show(); // } else if (_this.moduleSlideObj.length == 4) { // $target.find(".swiper-pagination").hide(); // } // } else if (_this.winw > 750) { // if (_this.moduleSlideObj.length > 2) { // $target.find(".swiper-pagination").show(); // } // } else { // if (_this.moduleSlideObj.length > 1) { // $target.find(".swiper-pagination").show(); // } // } // }, // resize: function () { // var This = this; // setTimeout(function () { // // 不同屏幕下,轮播个数 // if (_this.winw > 1200) { // This.params.slidesPerGroup = 3; // } else if (_this.winw > 750) { // This.params.slidesPerGroup = 2; // } else { // This.params.slidesPerGroup = 1; // } // This.emit('init'); // This.update(); //窗口变化时,更新Swiper的一些属性,如宽高等 // }, 150) // }, // } // }); // }, // scrollEvent: function () { // var _this = this; // _this.win.on('scroll.202312131016', function () { // // 获取位置 // _this.scrollTop = _this.win.scrollTop(); // _this.moduleTop = _this.moduleObj.offset().top; // _this.lazyPicLink(); // 视频是否图片 // }); // }, // resizeEvent: function () { // // 页面resize事件 // var _this = this; // var resizeWinw = 0; // var resizeTimer = ''; // this.win.on('resize.202312131016', function () { // var winw = _this.win.width(); // if (winw != resizeWinw) { // currentWinw = winw; // // 删除之前的定时器 // if (resizeTimer) { // clearTimeout(resizeTimer); // } // // 添加新的定时器 // resizeTimer = setTimeout(function () { // _this.resizeInit(); // resize初始化 // _this.judgmentSwiper(); // 判断需不需要执行swiper // _this.scrollEvent(); // 设置滚动事件,文字动画效果 // }, 100) // } // }) // } // }; // module202312131016Obj.init(); // } // // 初始化 // $('.e-module-202312131016').each(function () { // // 防止js文件被执行2次。 // var _this = $(this); // if (_this.data('init')) { // return; // } // _this.data('init', true); // module202312131016Fun($(this)); // }) // } var winW, winH, scrollTop, translateY1Obj = ''; var numLine = [], boxTopAll = [], off = true; $(window).on("scroll.scrollBottomTopAnimeta", function () { if (off) { off = false animateInit(); } scrollBottomTopAnimeta(); }); // 页面滚动动画:初始化 var animateInitsetTimeout = ''; function animateInit() { translateY1Obj = $('.translateY1'); if (winW > 1100) { // 计算所有动画的位置 numLine = []; boxTopAll = []; winH = $(window).height(); // 初始化动画位置 translateY1Obj.each(function () { var _this = $(this); var num = _this.data('line') ? _this.data('line') : 200; numLine.push(num); _this.css("transform", "translateY(" + num + "px)"); }) clearTimeout(animateInitsetTimeout); animateInitsetTimeout = setTimeout(function () { translateY1Obj.each(function () { var _this = $(this); var num = _this.data('line') ? _this.data('line') : 200; boxTopAll.push(_this.parent().offset().top + num); }) scrollBottomTopAnimeta(); }, 400) } else { translateY1Obj.css("transform", "translateY(0px)"); } } // 页面滚动动画:下到上 function scrollBottomTopAnimeta() { if (winW > 992) { scrollTop = $(window).scrollTop(); for (var i = 0; i < boxTopAll.length; i++) { if (boxTopAll[i] < winH + scrollTop) { var topNum = numLine[i] + (boxTopAll[i] - winH - scrollTop); if (topNum < 2) { topNum = 0; } translateY1Obj.eq(i).css({ "transform": "translateY(" + topNum + "px)", "opacity": 1 - topNum / numLine[i] }); } } } } // 初始化函数 function init() { winW = $(window).width(); winH = $(window).height(); }; // 初始化 init(); // 屏幕放大缩小,重新计算 var timer; $(window).on("resize", function () { clearTimeout(timer); timer = setTimeout(function () { var curwinW = $(window).width(); if (curwinW != winW) { init(); winW = curwinW; } }, 100) })