$(function () { var clickWho = "index_pad"; // bg_shadowHeight(); //鍔ㄦ€佽缃儗鏅珮搴 function bgShadowHeight() { var shadow_bg = $(".home_pic .myAnimate").height(); $(".home_pic .home_circle").css({ height: shadow_bg + "px", }); } $(window).resize(bgShadowHeight); $(".onMyAnimate").load(function () { bgShadowHeight(); // sideShow(); $(".home_pic .home_pic_wrap_txt").show(); }); bgShadowHeight(); // var sideShow=function(){ var pointNum = $(".banner_pointer dd").length; var mySwiper = new Swiper(".swiper-container", { initialSlide: 0, direction: "horizontal", speed: 500, // grabCursor: true, loop: true, // 寰幆妯″紡閫夐」 watchOverflow: true, navigation: { // nextEl: '.banner_preNext_btn dd:nth-child(1)', // prevEl: '.banner_preNext_btn dd:nth-child(2)', nextEl: ".banner_preNext_btn dd:nth-child(2)", prevEl: ".banner_preNext_btn dd:nth-child(1)", pagination: { el: ".banner_pointer", }, }, autoplay: { // delay:10000, delay: 5000, disableOnInteraction: false, }, on: { slideChange: function () { var activeIndex = this.activeIndex; var num = activeIndex > pointNum ? 0 : activeIndex - 1; $(".banner_pointer dd").removeClass("banner_point_item active"); $(".banner_pointer dd:eq(" + num + ")").addClass( "banner_point_item active" ); $(".onMyAnimate").css( "animation", "goBackAnimate 5s ease-in-out 1 alternate forwards" ); }, }, }); $(".banner_preNext_btn dd").on("click", function () { var indexNum = $(this).index(); switch (indexNum) { // case 0 :mySwiper.slideNext(); break; // case 1 :mySwiper.slidePrev(); break; case 0: mySwiper.slidePrev(); break; case 1: mySwiper.slideNext(); break; } }); $(".banner_pointer dd").on("click", function () { var indexNum = $(this).index(); $(this).siblings().removeClass("banner_point_item active"); $(this).addClass("banner_point_item active"); mySwiper.slideTo(indexNum + 1); }); // $('.swiper-container').hover(function(){ // $('.banner_preNext_btn').css({ // display:'flex', // }) // },function(){ // $('.banner_preNext_btn').css({ // display:'none', // }) // }); //--------------------------------------浠ヤ笅寮曡嚜index.js----------------------------------------- //纭欢椤甸潰鐐瑰嚮鍔ㄧ敾 // $(".show_item").on("click", function () { // $(this).next().slideToggle("normal", "linear"); // $(".shade_tay").show(); // }); // $(".shade_tay").on("click", function () { // $(".hide_item").hide(600); // $(".hardvideo_wrap").hide(600); // $(this).hide(); // }); // // 纭欢浜у搧椤佃棰戞挱鏀撅紝鍏抽棴 // $(".playVideo").on("click", function () { // $(this).parent().parent().next(".hardvideo_wrap").show(); // }); // $(".closeVideo").on("click", function () { // var current_video = $(this).parent().find("video")[0]; // current_video.pause(); // current_video.currentTime = 0; // $(".hardvideo_wrap").hide(600); // // $('.shade_tay').click(); // }); // //鍥剧墖閬僵灞傚姩鐢 // $(".shadow").hover( // function () { // $(this).parent().find(".will_scale").removeClass("goBackAnimate_img"); // $(this).parent().find(".will_scale").addClass("animate_img"); // $(this).css({ // background: "rgba(0,0,0,.4)", // }); // }, // function () { // $(this).parent().find(".will_scale").removeClass("animate_img"); // $(this).parent().find(".will_scale").addClass("goBackAnimate_img"); // $(this).css({ // background: "rgba(0,0,0,.5)", // }); // } // ); // //琛屼笟鏂规鍔ㄧ敾 // $(".trade").hover( // function () { // // $(this).find('.desc_content').addClass('show'); // $(this).css({ // "background-color": "rgba(0,0,0,0.2)", // cursor: "pointer", // }); // $(this).parent().find(".will_scale").addClass("animate_img"); // $(this).parent().find(".will_scale").removeClass("goBackAnimate_img"); // }, // function () { // $(this).find(".desc_content").removeClass("show"); // $(this).css({ // "background-color": "rgba(0,0,0,0)", // }); // $(this).parent().find(".will_scale").addClass("goBackAnimate_img"); // $(this).parent().find(".will_scale").removeClass("animate_img"); // } // ); // $(".trade").on("click", function () { // var jump = $(this).attr("id"); // if (jump) { // // window.open('../html/project_detail.html?jump='+jump); // location.href = "../html/project_detail.html?jump=" + jump; // } // }); // baidu.qiao // var _hmt = _hmt || []; // (function() { // var hm = document.createElement("script"); // hm.src = "https://hm.baidu.com/hm.js?6312247f1278d5b1f5ead0ab9bceb7ca"; // var s = document.getElementsByTagName("script")[0]; // s.parentNode.insertBefore(hm, s); // })(); //-------------------------------------------------------浠ヤ笂寮曡嚜index.js-------------------------- $(".skip_wrap a").click(function () { $("html, body").animate( { scrollTop: $($.attr(this, "href")).offset().top - 130 + "px", }, 500 ); return false; }); $(".onMyAnimate").css( "animation", "goBackAnimate 5s ease-in-out 1 alternate forwards" ); $(".onMyAnimate").each(function () { $(this)[0].addEventListener("animationend", function () { $(this).css("animation", ""); }); }); //鎹㈢數璇 // function changeTel() { // var time = new Date().valueOf() - new Date("2019-11-21").valueOf(); // var num = parseInt(time / 86400000) % 2; // if (num == 0) { // $("#topTel1").hide(); // $("#topTel2").show(); // $("#tel1").hide(); // $("#tel2").show(); // } else { // $("#topTel1").show(); // $("#topTel2").hide(); // $("#tel1").show(); // $("#tel2").hide(); // } // } }); //UWB瀹氫綅杞欢浜у搧 杞欢浼樺娍tab鍒囨崲--------- $(".software_con_r").addClass("advantage1"); $(".software_con_l li").eq(0).addClass("mainBlock"); $(".software_con_r li").mouseenter(function () { $(".software_con_r li") .eq($(this).index()) .addClass("imgStatic") .siblings() .removeClass("imgStatic"); $(".software_con_l li") .eq($(this).index()) .addClass("mainBlock") .siblings() .removeClass("mainBlock"); if ($(this).index() === 0) { $(".software_con_r").addClass("advantage1"); $(".software_con_r").removeClass("advantage2"); $(".software_con_r").removeClass("advantage3"); } else if ($(this).index() === 1) { $(".software_con_r").removeClass("advantage1"); $(".software_con_r").addClass("advantage2"); $(".software_con_r").removeClass("advantage3"); } else if ($(this).index() === 2) { $(".software_con_r").removeClass("advantage1"); $(".software_con_r").removeClass("advantage2"); $(".software_con_r").addClass("advantage3"); } }); // 棣栭〉瑙嗛杞挱------------------------------------------ // 棣栭〉瑙嗛杞挱 var videoW = $(".system_video").eq(0).width(); var video = $(".video_mask_wrap video"); var videoIndex = 0; var mouse = true; //榧犳爣绉诲叆绉诲嚭 // var slideShow = true; // 鏄惁鑷姩杞挱 var autoPlayBoo = true; //濡傛灉宸﹀彸鐐瑰嚮锛屽垯寤惰繜杞挱鍥炬挱鏀撅紱濡傛灉涓嶅欢杩熶袱涓棰戜細鍏敤涓€涓笁绉掞紝杞挱杩囧揩 // 宸︾偣鍑 $(".btn_l").click(() => { isToggleImg(0); autoPlayBoo = false; setTimeout(() => { autoPlayBoo = true; }, 1500); }); // 鍙崇偣鍑 $(".btn_r").click(() => { isToggleImg(1); autoPlayBoo = false; setTimeout(() => { autoPlayBoo=true }, 1500); }); function isToggleImg(e) { if (e === 1) { videoIndex++; } else if (videoIndex > -1) { videoIndex--; } // 鐐瑰嚮宸﹀彸鎸夐挳涓嶈兘鑷姩鎾斁 slideShow = false; // 宸﹀彸鐐瑰嚮鏃剁Щ鍔 $(".system") .css("transform", "translateX(-" + videoW * videoIndex + "px)") .css("transition-duration", "600ms"); // 鍙宠竟鎸夐挳锛屽綋鍒扮涓夊紶鍥剧墖杞埌绗竴寮 if (videoIndex === 3) { setTimeout(() => { videoIndex = 0; $(".system") .css("transform", "translateX(-" + videoW * videoIndex + "px)") .css("transition-duration", "0ms"); }, 600); } // 宸﹁竟鎸夐挳 if (videoIndex === -1) { $(".system") .css("transform", "translateX(" + videoW + "px)") .css("transition-duration", "600ms"); setTimeout(() => { videoIndex = 2; $(".system") .css("transform", "translateX(-" + videoW * videoIndex + "px)") .css("transition-duration", "0ms"); }, 600); } } // 鑷姩鎾斁 setInterval(() => { if ( autoPlayBoo && mouse) { isToggleImg(1); } }, 3000); // 鐐瑰嚮鎸夐挳 寮€濮嬫挱鏀捐棰 $(".playBtn").on("click", function () { maskPop($(this).parent().index()) }); // // 鐐瑰嚮鍥剧墖 寮€濮嬫挱鏀捐棰 $(".system_video_wrap").on("click", function () { maskPop($(this).parent().parent().index()) }); function maskPop(index){ $('.video_mask_wrap').show() $('.video_mask_wrap video').eq(index-1).show().siblings().hide() $('.video_mask_wrap video').get(index-1).play() $('.b1gtn').show() $('.mask').css('display','block') } // 绉诲叆 $(".system_video_wrap").on("mouseover", function () { mouse=false }); // 绂诲紑 $(".system_video_wrap").on("mouseout", function () { mouse=true }); // 鐐瑰嚮鍥炬爣 $('.b1gtn').on('click',function(){ $('.video_mask_wrap').hide() clearVideo() }) $('.mask').on('click',function(){ $('.video_mask_wrap').hide() clearVideo() }) // 娓呴櫎鎾斁鐨勮棰戣繘搴︽潯 function clearVideo(){ for(var i=0;i