// IE10以下浏览器提示 function hiUpgrade() { window.AESKey = ''; // 判断浏览器是否支持placeholder属性 function isSupportPlaceholder() { var input = document.createElement('input'); return 'placeholder' in input; }; //判断是否是IE浏览器,包括Edge浏览器 function IEVersion() { //取得浏览器的userAgent字符串 var userAgent = navigator.userAgent; //判断是否IE浏览器 var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; if (isIE) { // ie10及以下 var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); reIE.test(userAgent); var fIEVersion = parseFloat(RegExp["$1"]); if (fIEVersion < 10 || !isSupportPlaceholder()) { return true; } } else { return false; } } var tpl = '

无法正常浏览本网站!

继续浏览

1、您的浏览器版本过低,请升级您的浏览器。

2、如果您的浏览器是最新版本,请切换到极速模式访问。

3、您使用的是IE10以下的浏览器,建议您使用主流浏览器访问。

主流浏览器下载

'; if (IEVersion()) { document.write(tpl); } } $(".basealt .bag,.basealt .close1").click(function(){ $(this).parents(".basealt").fadeOut(); }); hiUpgrade(); if($(window).width()<768){ $(".proflight-sec4 .cont .fzjut .gt .proflight4_cont .img").each(function(){ if($(this).find("img").length==0){ // $(this).find("video").show(); } }); } setTimeout(function(){ $(".proflight-sec4 .cont .fzjut .gt .active").each(function(){ $(this).find(".swiper-slide-active video").trigger("play"); console.log($(this).find(".swiper-slide-active video").length); }); },100); // 关闭底部(显示了才需要监听点击事件) const isShowFooterBflex = window.localStorage.getItem('IS_SHOW_FOOTER_BFLEX'); if(window.localStorage.getItem('IS_SHOW_FOOTER_BFLEX')==null){ $('.fotadalt').show(); } $('.close-footer-bflex').on('click',function () { $('.fotadalt').hide(); window.localStorage.setItem('IS_SHOW_FOOTER_BFLEX', '0'); }) // 导航 function headNav() { var oBody = $("body"); var oHead = $("#c-header,.proinfo_nav"); var oNav = $("#c-header .c-nav"); var oBtn = $("#c-header .c-switch"); var oL = $("#c-header .c-nav>li"); var oTitle = $("#c-header .c-nav2 li .c-title-box"); var num = 0; var i = 0; var oP = $("#c-placeholder"); var b = true; var t = null; // 窗口重置隐藏手机端导航 $(window).resize(function() { console.log(11) if ($(window).width()>991) { oBody.removeClass('c-open'); } }); // 手机端导航栏目下拉 oTitle.click(function() { $(this).next().stop().slideToggle(); }); // 鼠标移入导航样式 oHead.hover(function() { $(this).addClass("c-style2"); }, function() { if ($(window).scrollTop() <= oHead.outerHeight() && oP.length == 0 && !oBody.hasClass("c-open")) { oHead.removeClass("c-style2"); } else if ($(window).scrollTop() > oHead.outerHeight()) { oHead.addClass("c-style2"); } else if ($(window).scrollTop() <= oHead.outerHeight() && oP.length != 0) { oHead.addClass("c-style2"); } }); // 手机端导航显示 oBtn.click(function() { if (b) { b = false; // t = $(window).scrollTop(); oBody.addClass('c-open'); // oBody.css("top", -t); } else { b = true; oBody.removeClass('c-open'); // oBody.css("top", "0"); // $(window).scrollTop(t); } }); // 导航显示及样式 function fn1() { if ($(window).scrollTop() - i > 0 && $(window).scrollTop() > oHead.outerHeight() && !oBody.hasClass("c-open")) { i = $(window).scrollTop(); if($(".proinfo_nav").length){ oHead.addClass("c-head-move"); } oHead.addClass("c-style2"); } else if ($(window).scrollTop() - i <= 0) { i = $(window).scrollTop(); if($(".proinfo_nav").length){ oHead.removeClass("c-head-move"); } if ($(window).scrollTop() <= oHead.outerHeight() && oP.length == 0 && !oBody.hasClass("c-open")) { oHead.removeClass("c-style2"); } else if ($(window).scrollTop() > oHead.outerHeight()) { oHead.addClass("c-style2"); } else if ($(window).scrollTop() <= oHead.outerHeight() && oP.length != 0) { oHead.addClass("c-style2"); } } } fn1(); $(window).scroll(function() { fn1(); }); // pc导航动画 oL.each(function() { if ($(this).hasClass("on")) { num = $(this).index(); } $(this).hover(function() { oL.eq(num).removeClass("on"); $(this).children("ul").stop().slideDown(); $(this).children(".c-list-box").stop().slideDown(); $(this).children(".c-list-box0").stop().slideDown(); }, function() { oL.eq(num).addClass("on"); $(this).children("ul").stop().slideUp(); $(this).children(".c-list-box").stop().slideUp(); $(this).children(".c-list-box0").stop().slideUp(); }); }); } headNav(); // 顶部搜索 function headSearch() { var obj = $("#c-header form"); var oBox = obj.find(".c-box"); obj.click(function(event) { event.stopPropagation(); oBox.stop().fadeToggle(); // $("#c-header .c-gn .c-phone .c-box").stop().fadeOut(); if($(window).width()>991){ $(".telAlt").fadeIn(); event.preventDefault(); } }); oBox.click(function(event) { event.stopPropagation(); }); obj.submit(function(){ if(!$(this).find("input").val()){ layer.msg('请输入搜索的关键词!', { icon: 7 }); return false; } }); $(document).on("click",function(event) { oBox.stop().fadeOut(); }); } headSearch(); // 顶部拨打手机二维码 function headPhoneCode() { var obj = $("#c-header .c-gn .c-phone"); var oBox = obj.find(".c-box"); obj.click(function(event) { event.stopPropagation(); oBox.stop().fadeToggle(); // $("#c-header .c-gn form .c-box").stop().fadeOut(); if($(window).width()>991){ $(".telAlt").fadeIn(); event.preventDefault(); } }); oBox.click(function(event) { event.stopPropagation(); }); $(document).on("click",function(event) { oBox.stop().fadeOut(); }); } headPhoneCode(); // 首页轮播 function homeBanner() { var swiper = new Swiper(".c-home-banner", { // effect : 'fade', loop: true, speed: 1000, autoplay: { delay: 3000, disableOnInteraction: false, }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, pagination: { el: '.swiper-pagination', clickable: true, }, // breakpoints: { // 767: { // slidesPerView: 3, // spaceBetween: 20, // } // } }); // 设置全屏 HiSetClientHeight($(".c-home-banner .swiper-slide img")); } homeBanner(); // 可视化数据滚动 function visualData(obj) { $(window).load(function() { obj.each(function() { var h = Number($(this).html()); var t = ""; var n = Math.ceil(h / 20); var a = true; var This = $(this); if ($(this).length != 0) { t = $(this).offset().top; } This.html(0); fn1(); $(window).scroll(function() { fn1(); }); function fn1() { var wT = $(window).scrollTop(); if (wT > t - $(window).height() + 50 && wT < t - 50 && a == true) { a = false; var y = 0; var timer2 = setInterval(function() { if (y >= h) { y = h; clearInterval(timer2); } This.html(y); y += n; }, 100); } } }); }); } visualData($(".c-num-move")); $(document).ready(function() { $('.countup-num,.fzshuzi').countUp({ delay: 10, time: 1000 }); }); // 侧边栏回到顶部 function goTop() { var obj = $("#c-right-pop"); var oBtn = $("#c-right-pop li:last-child"); function fn1() { if ($(window).scrollTop() > $("#c-header").outerHeight()) { obj.fadeIn(); } else { obj.fadeOut(); } } fn1(); $(window).scroll(function() { fn1(); }); oBtn.click(function() { $("html,body").animate({ scrollTop: 0 }, 500); }); if($(window).width()>991){ $("#c-right-pop li").each(function(){ if($(this).index()<$("#c-right-pop li").length -1){ $(this).click(function(){ // $(this).find(".c-box").stop().fadeToggle(); // $(this).siblings().find(".c-box").stop().fadeOut(); if($(this).index()==0){ var imgsrc = $(this).data("imgsrc"); if(imgsrc){ $(".wxAlt .cont .f_gt img").attr("src",imgsrc); } setTimeout(function(){ $(".wxAlt").fadeIn(); },200); } if($(this).index()==1){ $(".telAlt").fadeIn(); } }); // var _this = $(this); // $(this).find(".c-close").click(function(){ // _this.find(".c-box").stop().fadeOut(); // }); $(this).find("a").click(function(e){ e.preventDefault(); }); } }); } } goTop(); function showWxalt(){ $(".wxAlt").fadeIn(); } $(".daasbox-sec1 .but .proflight_but,.evaluate_cont .but,.daasbox-sec4 .but .proflight_but").click(function(e){ var imgsrc = $(this).data("imgsrc"); if(imgsrc){ $(".wxAlt .cont .f_gt img").attr("src",imgsrc); } // if($(window).width()>991){ setTimeout(function(){ showWxalt(); },200); e.preventDefault(); // } }); $("#c-header .c-gn>.public-btn,.c-pre-book .c-left .public-btn2,#c-footer .c-center-box .container .public-btn,.proinfo_nav .cont .gt .but").click(function(e){ // if($(window).width()>991){ var imgsrc = $(this).data("imgsrc"); if(imgsrc){ $(".demoAlt .cont .font .f_er img").attr("src",imgsrc); } if($(window).width()>991){ setTimeout(function(){ $(".demoAlt").fadeIn(); },200); e.preventDefault(); } // } }); if($(window).width()<767){ $(".abtbanenr .video1,.fixation-sec2 .cont .fixation2_cont .img video,.platformbox-sec3 .cont .item .img video").remove(); } // 底部导航 function footerNav() { var aList = $("#c-footer .c-list-box"); aList.each(function() { var This = $(this); $(this).find(".c-title-box").click(function() { if ($(window).width() < 768) { This.toggleClass("on"); This.find(".c-list").stop().slideToggle(); } }); }); } footerNav(); function showZxPop(event){ // $("#c-zx-pop").fadeIn(); if($(window).width()>991){ $(".demoAlt").fadeIn(); event.preventDefault(); } } $("#c-zx-pop").click(function(){ $("#c-zx-pop").fadeOut(); }); // 二维码弹窗 function codePop() { var b = $("#c-footer .c-code-btn"); var w = $("#c-code-pop"); var c = w.find(".c-close"); var d = w.find(".c-img-box"); var oImg = w.find(".c-img-box>img"); b.click(function() { oImg.attr("src",$(this).data("img-src")); w.stop().fadeToggle(); }); d.click(function() { return false; }); w.click(function() { w.stop().fadeToggle(); }); c.click(function() { w.stop().fadeToggle(); }); } codePop(); // 首页点击下一屏 $(".c-home-banner .c-sb").click(function(){ $("html,body").animate({ scrollTop: $(".c-home-data").offset().top }, 500); }); // 首页数据 function homeDataBanner() { var swiper = new Swiper(".c-home-data-banner", { slidesPerView :4, slidesPerColumn : 2, spaceBetween : 40, speed: 1000, autoplay: { delay: 3000, disableOnInteraction: false, }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, pagination: { el: '.swiper-pagination', clickable: true, }, breakpoints: { 500: { slidesPerView:1, spaceBetween: 20, }, 991: { slidesPerView:2, spaceBetween: 30, }, 1260: { slidesPerView:3, spaceBetween: 30, }, 1580: { spaceBetween: 30, } } }); HiVideoPop(".c-home-data .c-center .c-wrap .public-img"); } homeDataBanner(); // 首页动画 function homeAnimation(){ if($(".c-home-technology").length>0){ // 技术全屏 // HiAddClass($(".c-home-technology"),$(".c-home-technology"),1.2,'on',false); // 无人机扫描点闪烁 HiAddClass($(".public-box .c-list > li:nth-child(1)"),$(".public-box .c-list > li:nth-child(1)"),0.5,'on',false); HiAddClass($(".public-box .c-list > li:nth-child(2)"),$(".public-box .c-list > li:nth-child(2)"),0.5,'on',false); HiAddClass($(".public-box .c-list > li:nth-child(3)"),$(".public-box .c-list > li:nth-child(3)"),0.5,'on',false); // 无人机飞行状态显示 HiAddClass($(".c-home-animation"),$(".c-home-uav .container .c-img-box"),2,'on',false); if($(window).width()>991){ // 无人机扫描显示 HiAddClass($(".c-home-animation .c-last"),$(".c-home-uav .container .c-img-box .c-ks"),3,'on',false); // 无人机3段文字显示 HiAddClass($(".c-home-animation .c-last"),$(".c-home-uav .container .c-img-box .c-ks"),3,'on2',false); // 无人机系统显示 HiAddClass($(".c-home-animation .c-last"),$(".c-home-uav .container .c-text-box"),3,'on',false); }else{ // 无人机扫描显示 HiAddClass($(".c-home-animation .c-last"),$(".c-home-uav .container .c-img-box .c-ks"),2,'on',false); // 无人机3段文字显示 HiAddClass($(".c-home-animation .c-last"),$(".c-home-uav .container .c-img-box .c-ks"),2,'on2',false); // 无人机系统显示 HiAddClass($(".c-home-animation .c-last"),$(".c-home-uav .container .c-text-box"),2,'on',false); } //创建控制器 var controller = new ScrollMagic.Controller(); // if($(window).width()>767){ // 无人机缩放 var move001 = TweenMax.to($(".c-home-uav .container .c-img-box .c-box>img:nth-child(3)"),.3, { left:'-20%', ease: Power0.easeIn }); var Scene001 = new ScrollMagic.Scene({ offset: $(".c-home-animation").offset().top, duration: $(window).height(), }) .setTween(move001) .addTo(controller); var move002 = TweenMax.to($(".c-home-uav .container .c-img-box .c-box>img:nth-child(4)"),.3, { left:'20%', ease: Power0.easeIn }); var Scene002 = new ScrollMagic.Scene({ offset: $(".c-home-animation").offset().top, duration: $(window).height(), }) .setTween(move002) .addTo(controller); var move1 = TweenMax.to($(".c-home-uav .container .c-img-box .c-box"),.3, { scale:0.2, ease: Power0.easeIn }); var Scene1 = new ScrollMagic.Scene({ offset: $(".c-home-animation").offset().top+$(window).height(), duration: $(window).height(), }) .setTween(move1) .addTo(controller); var move111 = TweenMax.to($(".c-home-uav .container .c-img-box .c-box"),.3, { top:'-100vh', ease: Power0.easeIn }); var Scene111 = new ScrollMagic.Scene({ offset: $(".c-home-animation").offset().top+$(window).height()*2, duration: $(window).height(), }) .setTween(move111) .addTo(controller); var move112 = TweenMax.to($(".c-home-uav .container .c-img-box .c-img2"),.3, { scale:1, ease: Power0.easeIn }); var Scene112 = new ScrollMagic.Scene({ offset: $(".c-home-animation").offset().top+$(window).height(), duration: $(window).height(), }) .setTween(move112) .addTo(controller); var move113 = TweenMax.fromTo($(".c-home-uav .container .c-img-box .c-box"),.3,{ top:$(window).height(), ease: Power0.easeIn },{ top:0, ease: Power0.easeIn }); var Scene113 = new ScrollMagic.Scene({ offset: $(".c-home-animation .c-last").offset().top-$(window).height(), duration: $(window).height(), }) .setTween(move113) .addTo(controller); var move114 = TweenMax.to($(".c-home-uav .container .c-img-box .c-box"),.3, { scale:1, ease: Power0.easeIn }); var Scene114 = new ScrollMagic.Scene({ offset: $(".c-home-animation .c-last").offset().top, duration: $(window).height(), }) .setTween(move114) .addTo(controller); var move115 = TweenMax.to($(".c-home-uav .container .c-img-box .c-img2"),.3, { scale:0.3, ease: Power0.easeIn }); var Scene115 = new ScrollMagic.Scene({ offset: $(".c-home-animation .c-last").offset().top, duration: $(window).height(), }) .setTween(move115) .addTo(controller); $(".c-home-uav .container .c-img-box .c-box").css("top",0); $(window).scroll(function(){ }); // 无人机标题移动 var move2 = TweenMax.to($(".c-home-uav .container .c-main-title"),.3, { y: -$(window).height(), ease: Power0.easeIn }); var Scene2 = new ScrollMagic.Scene({ offset: $(".c-home-animation").offset().top+$(window).height(), duration: $(window).height(), }) .setTween(move2) .addTo(controller); // 技术全屏 var technologyMove = TweenMax.to($(".c-home-technology .c-bottom"),.3, { borderWidth: 0, ease: Power0.easeIn }); var technologyScene = new ScrollMagic.Scene({ offset: $(".c-home-technology").offset().top, duration: $(window).height()/2, }) .setTween(technologyMove) .addTo(controller); if($(window).width()>991){ // 无人机移动 var move4 = TweenMax.to($(".c-home-uav .container .c-img-box"),.3, { left:"25%", ease: Power0.easeIn }); var Scene4 = new ScrollMagic.Scene({ offset: $(".c-home-animation .c-last").offset().top+$(window).height(), duration: $(window).height(), }) .setTween(move4) .addTo(controller); }else if($(window).width()>767&&$(window).width()<992){ // 无人机移动 var move4 = TweenMax.to($(".c-home-uav .container .c-img-box"),.3, { top:"35%", ease: Power0.easeIn }); var Scene4 = new ScrollMagic.Scene({ offset: $(".c-home-animation .c-last").offset().top-$(window).height()/2, duration: $(window).height()/2, }) .setTween(move4) .addTo(controller); }else{ // 无人机移动 var move4 = TweenMax.to($(".c-home-uav .container .c-img-box"),.3, { scale:.7, top:"35%", ease: Power0.easeIn }); var Scene4 = new ScrollMagic.Scene({ offset: $(".c-home-animation .c-last").offset().top-$(window).height()/2, duration: $(window).height()/2, }) .setTween(move4) .addTo(controller); } $(".public-box .c-list > li").each(function(){ // console.log($(this).children("img").height(),$(this).height()) var move5 = TweenMax.to($(this).children(".f_img"),.3, { top:"30%", ease: Power0.easeIn }); var Scene5 = new ScrollMagic.Scene({ offset: $(this).offset().top-$(window).height(), duration: $(window).height()*2, }) .setTween(move5) .addTo(controller); }); LottieInteractivity.create({ mode:"scroll", player:'#lottie-player', actions: [{ visibility: [0, .6], type: "play", forceFlag: false },{ visibility: [.6, 2], type: "loop", frames: [70, 100], forceFlag: false }] }); } } homeAnimation(); // 底部飞机动画 HiAddClass($(".c-pre-book"),$(".c-pre-book .c-right .c-bg"),.4,'on',false); // 首页飞行系统 HiAddClass($(".c-hone-system"),$(".c-hone-system"),.5,'on',true); var platformbox2cont = new Swiper('.platformbox2_cont',{ watchOverflow: true,//因为仅有1个slide,swiper无效 observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 slidesPerView: "auto", }); $('.counter').countUp(); var abt4nav = new Swiper('.abt4_nav',{ watchOverflow: true,//因为仅有1个slide,swiper无效 observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 slidesPerView: "auto", }); var ofsetAfter = 0; if($(window).width()>568){ ofsetAfter = $(".abt4_cont").width()/3; if($(window).width()>992){ ofsetAfter = $(".abt4_cont").width()/3*2; } } var abt4cont = new Swiper('.abt4_cont',{ watchOverflow: true,//因为仅有1个slide,swiper无效 observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 slidesPerView: 3, slidesOffsetAfter : ofsetAfter, navigation: { nextEl: '.abt4_next', prevEl: '.abt4_prev', }, breakpoints: { 991: { slidesPerView: 2, }, 567: { slidesPerView: 1, } }, on: { slideChangeTransitionStart: function(){ // alert(this.activeIndex); abt4nav.slideTo(this.activeIndex); $(".abt4_nav .swiper-slide").eq(this.activeIndex).addClass("on").siblings().removeClass("on"); }, }, }); $(".abt4_nav .swiper-slide").click(function(){ abt4cont.slideTo($(this).index()); }); function abtRong(){ // var abHe = $(".abt-sec5 .cont .zhong .item").outerHeight()*2 - ($(".abt-sec5 .cont").outerHeight() - $(".abt-sec5 .cont .zhong").height())/10; // $(".abt-sec5 .cont").height(abHe); $(".abt-sec5 .fzbut").click(function(){ $(".abt-sec5 .cont .item").css("display","block"); $(this).hide(); }); } // abtRong(); /* 关于我们图片视差 */ function zhihui(){ var controller = new ScrollMagic.Controller(); var move1 = TweenMax.to($(".abt-sec3 .bag img"),.3, { y:"0%", ease: Power0.easeIn }); var Scene1 = new ScrollMagic.Scene({ offset: $(".abt-sec3 .bag img").offset().top - $(window).height(), duration: $(window).height()*2, }) .setTween(move1) .addTo(controller); } if($(".abt-sec3 .bag img").length!=0){ zhihui(); } /* 新闻资讯 */ var newsbox1cont = new Swiper('.newsbox1_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: false, }, pagination: { el: '.newsbox1_page', clickable :true, renderBullet: function (index, className) { return '' + (index + 1) + ''; }, }, }); /* 加入我们 */ if($(window).width()>767){ var time1; $(".joinbox-sec4 .jut .item.on .font .text").show(); $(".joinbox-sec4 .jut .item").hover(function(){ var _this = $(this); var imsr = _this.find(".img img").attr("src"); $(this).parents(".cont").find(".bag img").attr("src",imsr); $(this).addClass("on").siblings().removeClass("on"); _this.siblings().find(".font .text").hide(); if(time1){ clearTimeout(time1); } time1=setTimeout(function(){ _this.find(".font .text").stop().slideDown(); },300); }); } var joinbox6cont = new Swiper('.joinbox6_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 loop: true, speed:800, spaceBetween: 40, pagination: { el: '.joinbox6_cont', clickable :true, }, breakpoints: { 1440: { spaceBetween: 26 }, 1199: { spaceBetween: 18, }, 567: { spaceBetween: 10, } } }); /* 产品详情 */ $(".proinfo_nav .cont .gt .basemenubut").click(function(){ $(this).toggleClass("basemenubut2"); $(this).parent().find(".nav1").stop().slideToggle(); }); $(".proflight-sec3 .cont").each(function(){ var _this = $(this); var proSwiperContainer = _this.find(".proflight3_cont"); var proNavChildren = _this.find(".fnav1 li"); var proflight3cont = new Swiper(proSwiperContainer,{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, autoHeight: true, //高度随内容变化 on: { slideChangeTransitionStart: function(){ // alert(this.activeIndex); proNavChildren.eq(this.activeIndex).addClass("on").siblings().removeClass("on"); }, }, }); proNavChildren.click(function(){ proflight3cont.slideTo($(this).index()); }); }); $(".profei .cont").each(function(){ var _this = $(this); _this.find(".fzjut .lt .item.active .font").show(); _this.find(".fzjut .lt .item").each(function(){ var _itTash = $(this); var proflight4cont = new Swiper(_this.find(".gt .proflight4_cont").eq(_itTash.index()),{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, autoHeight: true, //高度随内容变化 on: { init:function(){ // var _video = _this.find(".gt .proflight4_cont").eq(_itTash.index()).find(".swiper-slide").eq(this.activeIndex).find("video"); // _video.get(0).currentTime = 0; // _video.trigger("play"); }, slideChangeTransitionStart: function(){ // alert(this.activeIndex); _itTash.find(".list .li").eq(this.activeIndex).addClass("on").siblings().removeClass("on"); var _videoSiblings = _this.find(".gt .proflight4_cont").eq(_itTash.index()).find(".swiper-slide").siblings(); var _video = _this.find(".gt .proflight4_cont").eq(_itTash.index()).find(".swiper-slide").eq(this.activeIndex).find("video"); _video.get(0).currentTime = 0; _videoSiblings.find("video").trigger("pause"); _video.trigger("play"); }, }, }); _itTash.find(".list .li").hover(function(){ proflight4cont.slideTo($(this).index()); }); }); }); $(".profei .cont .fzjut .lt .fznei .item .fztitle").click(function(){ $(this).parent().toggleClass("active"); $(this).next(".font").stop().slideToggle(); $(this).parent().siblings().removeClass("active"); $(this).parent().siblings().find(".font").stop().slideUp(); $(this).parents(".cont").find(".gt .proflight4_cont").eq($(this).parent().index()).addClass("active").siblings().removeClass("active"); // $(this).parents(".cont").find(".gt .proflight4_cont video").trigger("pause"); // var _video = $(this).parents(".cont").find(".gt .proflight4_cont").eq($(this).parent().index()).find(".swiper-slide").eq(0).find("video"); // _video.get(0).currentTime = 0; // _video.trigger("play"); }); var proflight8cont = new Swiper('.proflight8_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 // loop: true, speed:800, effect : 'fade', // fadeEffect: { // crossFade: true, // } autoplay: false, }); if($(window).width()>1199){ $(".proflight-sec8 .cont .jut .item").hover(function(){ proflight8cont.slideTo($(this).index()); }); } var proflight9cont = new Swiper('.proflight9_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 loop: true, speed:800, slidesPerView: "auto", navigation: { nextEl: '.proflight9_next', prevEl: '.proflight9_prev', }, }); $(".proflight9_cont .item").matchHeight(); var proflightlogo = new Swiper('.proflight_logo',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 loop: true, speed:9000, allowTouchMove: false, slidesPerColumn: 2, slidesPerView: 6, autoplay: { delay: 0, disableOnInteraction: false, }, breakpoints: { 1199: { slidesPerView: 5 }, 991: { slidesPerView: 4, }, 567: { slidesPerView: 3, } } }); /* 超低延迟,实时视频更流畅 */ function timeOutFil(){ //创建控制器 var controller = new ScrollMagic.Controller(); if($(window).width()>767){ // 无人机缩放 var move1 = TweenMax.to($(".fixation-sec3 .fznei"),.3, { y:"0%", ease: Power0.easeIn }); var Scene1 = new ScrollMagic.Scene({ offset: $(".fixation-sec3").offset().top - $(window).height()/1.1, duration: $(window).height(), }) .setTween(move1) .addTo(controller); } }; if($(".fixation-sec3").length!=0){ timeOutFil(); } var brainbox12cont = new Swiper('.brainbox12_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, slidesPerView: "auto", pagination: { el: '.brainbox12_page', clickable :true, }, }); var brainbox13cont = new Swiper('.brainbox13_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, slidesPerView: "auto", pagination: { el: '.brainbox13_page', clickable :true, }, }); var brainbox11cont = new Swiper('.brainbox11_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, slidesPerView: "auto", navigation: { nextEl: '.brainbox11_next', prevEl: '.brainbox11_prev', }, pagination: { el: '.brainbox11_page', clickable :true, }, }); var brainbox1cont = new Swiper('.brainbox1_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, centerInsufficientSlides: true, slidesPerView: "auto", }); /* 实时计算 智能捕捉目标 */ function brain9Fi(){ //创建控制器 var controller = new ScrollMagic.Controller(); // 飞行向下 var move1 = TweenMax.to($(".brainbox-sec9 .cont .fznei"),.3, { y:"0%", ease: Power0.easeIn }); var Scene1 = new ScrollMagic.Scene({ offset: $(".brainbox-sec9 .cont .fznei").offset().top - $(window).height()/0.8, duration: $(window).height(), }) .setTween(move1) .addTo(controller); var move2 = TweenMax.to($(".brainbox-sec7 .bag img"),.3, { marginTop:"0%", ease: Power0.easeIn }); var Scene1 = new ScrollMagic.Scene({ offset: $(".brainbox-sec7").offset().top - $(window).height()/0.8, duration: $(window).height()*2, }) .setTween(move2) .addTo(controller); function jiguang() { var s = $(window).scrollTop(); var _he = $(".brainbox-sec9 .cont .fznei .jijuang1 img").height(); if(s>$(".brainbox-sec9 .cont .fznei").offset().top + $(window).height() - $(window).height()/0.8){ $(".brainbox-sec9 .cont .fznei .jijuang1").height(_he); } } jiguang() $(window).scroll(function(){ jiguang(); }); }; if($(".brainbox-sec9").length!=0){ brain9Fi(); } // 360度展示 function rotate360() { var obj = $(".brainbox-sec1 .bag"); var aImg = $(".brainbox-sec1 .c-img-box img"); var num = 0; var x = 0; var oSwitch = false; if (obj.length != 0) { aImg.eq(0).addClass("on"); obj.mousedown(function(event) { x = event.pageX; oSwitch = true; obj.addClass("on"); $(this).mousemove(function(event) { if (oSwitch == true) { if (event.pageX - x >= 20) { x = event.pageX; num++; if (num > 35) { num = 0; } } else if (event.pageX - x <= -20) { x = event.pageX; num--; if (num < 0) { num = 35; } } aImg.eq(num).addClass("on").siblings().removeClass("on"); } }); $(this).mouseup(function() { oSwitch = false; obj.removeClass("on"); }); }); obj.get(0).addEventListener('touchstart', function(event) { x = event.targetTouches[0].pageX; oSwitch = true; }); obj.get(0).addEventListener('touchmove', function(event) { if (oSwitch == true) { if (event.targetTouches[0].pageX - x >= 20) { x = event.targetTouches[0].pageX; num++; if (num > 35) { num = 0; } } else if (event.targetTouches[0].pageX - x <= -20) { x = event.targetTouches[0].pageX; num--; if (num < 0) { num = 35; } } aImg.eq(num).addClass("on").siblings().removeClass("on"); } }); obj.get(0).addEventListener('touchend', function(event) { oSwitch = false; }); } } rotate360(); $(".airportbox-sec5 .fzjut .item.active .font").show(); $(".airportbox-sec5 .fzjut").each(function(){ var _this = $(this); _this.find(".item").each(function(){ var _itTash = $(this); var proflight4cont = new Swiper(_this.find(".gt .proflight4_cont").eq(_itTash.index()),{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, watchOverflow: true,//因为仅有1个slide,swiper无效 autoHeight: true, //高度随内容变化 on: { slideChangeTransitionStart: function(){ // alert(this.activeIndex); _itTash.find(".list .li").eq(this.activeIndex).addClass("on").siblings().removeClass("on"); var _videoSiblings = _this.find(".gt .proflight4_cont").eq(_itTash.index()).find(".swiper-slide").siblings(); var _video = _this.find(".gt .proflight4_cont").eq(_itTash.index()).find(".swiper-slide").eq(this.activeIndex).find("video"); _video.get(0).currentTime = 0; _videoSiblings.find("video").trigger("pause"); _video.trigger("play"); }, }, }); }); }); $(".airportbox-sec5 .cont .fzjut .lt .fznei .item .fztitle").click(function(){ $(this).parent().toggleClass("active"); $(this).next(".font").stop().slideToggle(); $(this).parent().siblings().removeClass("active"); $(this).parent().siblings().find(".font").stop().slideUp(); $(this).parents(".fzjut").find(".gt .proflight4_cont").eq($(this).parent().index()).addClass("active").siblings().removeClass("active"); $(this).parents(".fzjut").find(".gt .proflight4_cont video").trigger("pause"); var _video = $(this).parents(".fzjut").find(".gt .proflight4_cont").eq($(this).parent().index()).find(".swiper-slide").eq(0).find("video"); _video.get(0).currentTime = 0; _video.trigger("play"); }); var autoflibox2cont = new Swiper('.autoflibox2_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, slidesPerView: "auto", navigation: { nextEl: '.autoflibox2_next', prevEl: '.autoflibox2_prev', }, on: { slideChangeTransitionStart: function(){ // alert(this.activeIndex); $(".autoflibox2_nav .swiper-slide").eq(this.activeIndex).addClass("on").siblings().removeClass("on"); }, }, }); var autoflibox2nav = new Swiper('.autoflibox2_nav',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, slidesPerView: "auto", }); $(".autoflibox2_nav .swiper-slide").click(function(){ autoflibox2cont.slideTo($(this).index()); }); $(".autoflibox-sec4 .fzjut .item.active .font").show(); $(".autoflibox-sec4 .cont").each(function(){ var _this = $(this); _this.find(".item").each(function(){ var _itTash = $(this); var proflight4cont = new Swiper(_this.find(".gt .proflight4_cont").eq(_itTash.index()),{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, watchOverflow: true,//因为仅有1个slide,swiper无效 autoHeight: true, //高度随内容变化 on: { slideChangeTransitionStart: function(){ // alert(this.activeIndex); _itTash.find(".list .li").eq(this.activeIndex).addClass("on").siblings().removeClass("on"); var _videoSiblings = _this.find(".gt .proflight4_cont").eq(_itTash.index()).find(".swiper-slide").siblings(); var _video = _this.find(".gt .proflight4_cont").eq(_itTash.index()).find(".swiper-slide").eq(this.activeIndex).find("video"); _video.get(0).currentTime = 0; _videoSiblings.find("video").trigger("pause"); _video.trigger("play"); }, }, }); }); }); $(".autoflibox-sec4 .cont .fzjut .lt .fznei .item .fztitle").click(function(){ $(this).parent().toggleClass("active"); $(this).next(".font").stop().slideToggle(); $(this).parent().siblings().removeClass("active"); $(this).parent().siblings().find(".font").stop().slideUp(); $(this).parents(".fzjut").find(".gt .proflight4_cont").eq($(this).parent().index()).addClass("active").siblings().removeClass("active"); $(this).parents(".fzjut").find(".gt .proflight4_cont video").trigger("pause"); var _video = $(this).parents(".fzjut").find(".gt .proflight4_cont").eq($(this).parent().index()).find(".swiper-slide").eq(0).find("video"); _video.get(0).currentTime = 0; _video.trigger("play"); }); $(".platformbox-sec6 .cont .item").hover(function(){ $(this).addClass("on").siblings().removeClass("on"); }); var analysebox3children = new Swiper('.analysebox3_children',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, watchOverflow: true,//因为仅有1个slide,swiper无效 slidesPerView: "auto", navigation: { nextEl: '.analysebox3_next', prevEl: '.analysebox3_prev', }, pagination: { el: '.analysebox3_page', clickable :true, }, }); var analysebox3cont = new Swiper('.analysebox3_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:800, slidesPerView: "auto", on: { slideChangeTransitionStart: function(){ // alert(this.activeIndex); $(".analysebox3_nav .swiper-slide").eq(this.activeIndex).addClass("on").siblings().removeClass("on"); }, }, }); var analysebox3nav = new Swiper('.analysebox3_nav',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:800, slidesPerView: "auto", }); $(".analysebox3_nav .swiper-slide").click(function(){ analysebox3cont.slideTo($(this).index()); }); function zizhufei1(){ var controller = new ScrollMagic.Controller(); var move1 = TweenMax.to($(".unmbox-sec2 .gt"),.3, { y:"0%", ease: Power0.easeIn }); var Scene1 = new ScrollMagic.Scene({ offset: $(".unmbox-sec2").offset().top - $(window).height(), duration: $(window).height(), }) .setTween(move1) .addTo(controller); } if($(".unmbox-sec2").length!=0){ zizhufei1(); } function unbi(){ if($(".container2").length>0){ var cone = $(".container2").offset().left; $(".unmbox-sec3 .cont .item:first-child .tit,.unmbox-sec3 .cont .item:first-child .text").css( "padding-left", cone+"px" ) } } if($(window).width()>767){ unbi(); window.onresize=function(){ unbi(); } } function canshu(){ if($(".unmbox-sec5 .cont .zhong table tr").length>11){ var _he = 0; var zonghe = $(".unmbox-sec5 .cont .zhong").height(); for(var i=0;i<11;i++){ _he += $(".unmbox-sec5 .cont .zhong table tr").eq(i).outerHeight(); } $(".unmbox-sec5 .cont").height(_he); $(".unmbox-sec5 .but .fzbut").click(function(){ $(this).toggleClass("on"); if($(this).hasClass("on")){ $(".unmbox-sec5 .cont").height(zonghe); }else{ $(".unmbox-sec5 .cont").height(_he); } }); }else{ $(".unmbox-sec5 .but").hide(); } } canshu(); $(".daasbox-sec3 .container2 .cont .item .list .jut .li").hover(function(){ var _index = $(this).index(); $(this).parents(".list").find(".fzimg .li").eq(_index).addClass("on").siblings().removeClass("on"); }); $(document).on("click",".fzqbox-sec1 .cont .gt .fzjut .fznei .item .tit",function(){ $(this).parents(".item").toggleClass("on").siblings().removeClass("on").find(".font").stop().slideUp(); $(this).next(".font").stop().slideToggle(); }); var shuzi = 0; var abt1cont = new Swiper('.abt1_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:800, slidesPerView: "auto", }); var cle3 = new Swiper('.videobox1_cont', { loop: true, slidesPerView: 'auto', centeredSlides : true, watchSlidesProgress : true, autoplay: { delay: 5000, disableOnInteraction: false, }, navigation: { nextEl: '.videobox1_next', prevEl: '.videobox1_prev', }, on: { progress: function(progress) { if($(window).width()>767){ for (i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i); var slideProgress = this.slides[i].progress; if (Math.abs(slideProgress) > 1) { var modify = (Math.abs(slideProgress) - 1) * 0.4 + 2.5; } translate = slideProgress * modify * 40 + 'px'; scale = 1 - Math.abs(slideProgress) / 5; zIndex = 999 - Math.abs(Math.round(10 * slideProgress)); slide.transform('translateX(' + translate + ') scale(' + scale + ')'); slide.css('zIndex', zIndex); slide.css('opacity', 1); // $(".videobox1_cont").find(".img").eq(i).find("img").css("opacity",(1-Math.abs(progress)/5)); // if (Math.abs(slideProgress) > 3) { // slide.css('opacity', 0); // } } } }, setTransition: function(transition) { for (var i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i) slide.transition(transition); } } } }); $(".videoinfobox1_cont .fz_video .fzicon").click(function(){ $(this).parent().addClass("on"); $(this).parent().find("video").trigger("play"); }); var solutionbox2nav = new Swiper('.solutionbox2_nav',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:800, slidesPerView: "auto", }); if($(".platformbox-sec2").length!=0){ var fi1 = $(window).scrollTop(); function avtNav(){ if($(window).scrollTop()>=$(".platformbox-sec2").offset().top - $("#c-header").height()){ $(".platformbox-sec2").addClass("active"); var hdboxhei = $("#c-header").height(); if($(window).scrollTop()>fi1 && $(window).scrollTop()>50){ fi1 = $(this).scrollTop(); $(".platformbox-sec2 .cont").css("top","0px"); }else{ fi1 = $(this).scrollTop(); $(".platformbox-sec2 .cont").css("top",hdboxhei+"px"); } }else{ mosh=null; nei=false; $(".platformbox-sec2 .cont").css("top","0px"); $(".platformbox-sec2").removeClass("active"); } } avtNav(); $(window).scroll(function(){ avtNav(); }); if($(".pthwei>li").length!=0){ $(".platformbox2_cont .swiper-slide").each(function(){ var _this = $(this); var _in = _this.index(); if($(".pthwei>li").eq(_in).length!=0){ var shuzhi = 30; var _top = $(".pthwei>li").eq(_in).offset().top - $("#c-header").height() - shuzhi; $(window).scroll(function(){ _top = $(".pthwei>li").eq(_in).offset().top - $("#c-header").height() - shuzhi; if($(window).scrollTop()>=_top){ _this.addClass("on").siblings().removeClass("on"); platformbox2cont.slideTo(_in); } }); _this.click(function(){ if($(".coursebox-sec1").length!=0){ $(".coursebox-sec1 .cont").eq($(this).index()).addClass("on"); var _he = $(".coursebox-sec1 .cont").eq($(this).index()).find(".zhong .fzheight").height(); $(".coursebox-sec1 .cont").eq($(this).index()).find(".zhong").height(_he); } _top = $(".pthwei>li").eq(_in).offset().top - $("#c-header").height() - shuzhi; $('html,body').animate({ 'scrollTop': _top+1 }, 1000); }); } }); // $(".pthwei_list").css("top","-"+($("#c-header").height() - $(".platformbox2_cont").height())+"px"); } } if($(".solutinfi-sec1").length!=0){ var fi1 = $(window).scrollTop(); function avtNav(){ var _in = $(".solutinfi-sec1 .cont .container2 .abt1_cont .swiper-slide.on").index(); if($(window).scrollTop()>=$(".solutinfi-sec1").offset().top - $("#c-header").height()){ $(".solutinfi-sec1").addClass("active"); var hdboxhei = $("#c-header").height(); if($(window).scrollTop()>fi1 && $(window).scrollTop()>50){ fi1 = $(this).scrollTop(); $(".solutinfi-sec1 .cont").css("top","0px"); if(_in>4){ abt1cont.slideTo(_in); } }else{ fi1 = $(this).scrollTop(); $(".solutinfi-sec1 .cont").css("top",hdboxhei+"px"); if(_in<4){ abt1cont.slideTo(_in); } } }else{ mosh=null; nei=false; $(".solutinfi-sec1 .cont").css("top","0px"); $(".solutinfi-sec1").removeClass("active"); } } avtNav(); $(window).scroll(function(){ avtNav(); }); if($(".pthwei").length!=0){ $(".abt1_cont .swiper-slide").each(function(){ var _this = $(this); var _in = _this.index(); if($(".pthwei").eq(_in).length!=0){ var shuzhi = 30; var _top = $(".pthwei").eq(_in).offset().top - $("#c-header").height() - shuzhi; $(window).scroll(function(){ _top = $(".pthwei").eq(_in).offset().top - $("#c-header").height() - shuzhi; if($(window).scrollTop()>=_top){ _this.addClass("on").siblings().removeClass("on"); // console.log(_in); // if(_in>5){ // abt1cont.slideTo(_in); // } } }); _this.click(function(){ _top = $(".pthwei").eq(_in).offset().top - $("#c-header").height() - shuzhi; $('html,body').animate({ 'scrollTop': _top+1 }, 1000); }); } }); } } $(".solutinfi-sec6 .cont .item .list .font .text").matchHeight(); var solutinfi7nav = new Swiper('.solutinfi7_nav',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:800, slidesPerView: "auto", }); $(".solutinfi7_list_cont").each(function(){ var _this = $(this); var _nav1 = _this.next(".solutinfi7_list_nav"); var solutinfi7_list_nav = new Swiper(_nav1,{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:800, slidesPerView: "auto", }); var solutinfi7listcont = new Swiper(_this,{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:800, slidesPerView: "auto", on: { slideChangeTransitionStart: function(){ // alert(this.activeIndex); solutinfi7_list_nav.slideTo(this.activeIndex); _nav1.find(".swiper-slide").eq(this.activeIndex).addClass("on").siblings().removeClass("on"); }, }, }); _nav1.find(".swiper-slide").click(function(){ solutinfi7listcont.slideTo($(this).index()); }); }); $(".solutinfi7_nav .swiper-slide").click(function(){ var _in = $(this).index(); $(this).addClass("on").siblings().removeClass("on"); $(".solutinfi-sec7 .cont .zhong").eq(_in).addClass("active").siblings().removeClass("active"); }); var casebox2cont = new Swiper('.casebox2_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:800, slidesPerView: "auto", navigation: { nextEl: '.casebox2_next', prevEl: '.casebox2_prev', }, pagination: { el: '.casebox2_page', clickable :true, }, }); $(".casevideo_cont .fzicon").click(function(){ $(this).parent().addClass("on"); $(this).parent().find("video").trigger("play"); }); var caseimggt = new Swiper('.case_img_gt',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:800, direction: 'vertical', slidesPerView: "auto", breakpoints: { 767: { //当屏幕宽度小于等于768 direction: 'horizontal', // slidesPerView: 3, spaceBetween : 6, }, } }); var caseimglt = new Swiper('.case_img_lt',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:800, on: { slideChangeTransitionStart: function(){ console.log(this.activeIndex); caseimggt.slideTo(this.activeIndex); $(".case_img_gt .swiper-slide").eq(this.activeIndex).addClass("on").siblings().removeClass("on"); }, }, }); $(".case_img_gt .swiper-slide").click(function(){ caseimglt.slideTo($(this).index()); }); // history.pushState({page: 1}, "Title 1", "about.html?page=1"); var brandbox6_cont = new Swiper('.brandbox6_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:9000, loop: true, loopAdditionalSlides: 30, allowTouchMove: false, slidesPerView: 4.93, spaceBetween : 20, autoplay: { delay: 0, stopOnLastSlide: false, disableOnInteraction: false, }, breakpoints: { 1580: { spaceBetween : 16, slidesPerView: 4.2, }, 1199: { spaceBetween : 12, slidesPerView: 4, }, 991: { spaceBetween : 10, }, 767: { spaceBetween : 8, slidesPerView: 2.4, }, } }); var brandbox5_cont = new Swiper('.brandbox5_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:800, slidesPerView: "auto", autoplay: { delay: 4000, stopOnLastSlide: false, disableOnInteraction: false, }, navigation: { nextEl: '.brandbox5_next', prevEl: '.brandbox5_prev', }, }); var brandbox4_cont = new Swiper('.brandbox4_cont',{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 watchOverflow: true,//因为仅有1个slide,swiper无效 speed:800, loop: true, slidesPerView: "auto", centeredSlides : true, watchSlidesProgress : true, navigation: { nextEl: '.brandbox4_next', prevEl: '.brandbox4_prev', }, pagination: { el: '.brandbox4_page', clickable :true, }, on: { progress: function(progress) { for (i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i); var slideProgress = this.slides[i].progress; if (Math.abs(slideProgress) > 1) { var modify = (Math.abs(slideProgress) - 1) * 0.4 + 2.5; } translate = slideProgress * modify * 100 + 'px'; translatex = this.width * slideProgress + 'px'; translatey = slideProgress * modify * 11 + 'px'; // translate = 0; scale = 1 - Math.abs(slideProgress) / 8; console.log(translatex); zIndex = 999 - Math.abs(Math.round(1 * slideProgress)); // slide.transform('translateX(' + translate + ') scale(' + scale + ')'); slide.transform('translateX(' + translatex + ') translateY('+translatey+') scale(' + scale + ')'); slide.css('zIndex', zIndex); slide.css('opacity', 1); slide.css("opacity",(1-Math.abs(progress)/5)); if (Math.abs(slideProgress) > 3) { slide.css('opacity', 0); } } }, setTransition: function(transition) { for (var i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i) slide.transition(transition); } } } }); $(".fixation-sec2").each(function(){ var that = $(this); var navSwiper = that.find(".fixation2_nav"); var contSwiper = that.find(".fixation2_cont"); var prev1 = that.find(".fixation2_prev"); var next1 = that.find(".fixation2_next"); var fixation2nav = new Swiper(navSwiper,{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, slidesPerView: "auto", }); var fixcont = new Swiper(contSwiper,{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, effect : 'fade', fadeEffect: { crossFade: true, }, navigation: { nextEl: next1, prevEl: prev1, }, on: { slideChangeTransitionStart: function(){ // alert(this.activeIndex); navSwiper.find(".swiper-slide").eq(this.activeIndex).addClass("on").siblings().removeClass("on"); that.find(".fztext .li").eq(this.activeIndex).addClass("on").siblings().removeClass("on"); }, }, }); navSwiper.find(".swiper-slide").click(function(){ var _index = $(this).index(); fixcont.slideTo(_index); }); }); $(".proflight_but").hover(function(){ // $(this).find("i").stop().slideDown(); },function(){ // $(this).find("i").stop().slideUp(); }); // $(".resouinfobox-sec1 .cont .lt .fz_zhong .fzjut .but").click(function(){ // $("#c-zx-pop2").fadeIn(); // }); $("#c-zx-pop2 .c-close").click(function(){ $("#c-zx-pop2").fadeOut(); }); if($(".proflight-sec7 .cont .img video").attr("src")==""){ $(".proflight-sec7 .cont .img video").hide(); } var brainbox1_nav = new Swiper(".brainbox1_nav",{ observer: true, //开启动态检查器,监测swiper和slide observeParents: true, //监测Swiper 的祖/父元素 speed:800, slidesPerView: "auto", }); $(".brainbox-sec1 .fznav .brainbox1_nav .swiper-slide").click(function(){ var _src = $(this).find(".item").data("src"); $(this).addClass("on").siblings().removeClass("on"); $(".fzwenmoxin").parent().removeClass("on"); $(".fzwenmoxin").attr("src",_src); moxinJd(); }); if($(".fzwenmoxin").length){ moxinJd(); } function moxinJd(){ $(".brainbox-sec1 .cont .img .jindu span").width("0%"); $(".fzwenmoxin").get(0).onprogress=function(event){ // console.log(event); var e = e || event; var _total = Math.floor(e.detail.totalProgress*100); $(".brainbox-sec1 .cont .img .jindu span").css("width",_total+"%"); } $(".fzwenmoxin").load(function(){ $(".fzwenmoxin").parent().addClass("on"); }); } document.addEventListener('contextmenu', function(event) { event.preventDefault(); }); HiVideoPop('.autoflibanner .fzjut .container2 .item .list'); HiVideoPop(".videobox1_cont .swiper-slide .item .fzimg"); HiVideoPop(".casebox-sec2 .cont .casebox2_cont .swiper-slide .item .list"); HiVideoPop(".newsbox-sec1 .cont .lt .newsbox1_cont .item .videocli"); HiVideoPop(".newsbox-sec1 .cont .gt .item .list .f_img .videocli"); // HiVideoPop($(".abtbanenr .videocli")); HiVideoPop('.videobox-sec2 .item .fzimg,.videobox-sec1 .item .fzimg'); // 参数为点击的对象,必须带有data-video-src属性 HiVideoPop('.abtbanenr .videocli');