jQuery(document).ready(function(){ var qcloud={}; $('body').on('mouseenter mouseleave','.header-box li',function(event){ if (event.type === 'mouseenter') { var _nav = $(this).attr('_t_nav'); clearTimeout( qcloud[ _nav + '_timer' ] ); qcloud[ _nav + '_timer' ] = setTimeout(function(){ $('[_t_nav]').each(function(){ $(this)[ _nav == $(this).attr('_t_nav') ? 'addClass':'removeClass' ]('cur'); }); $('#'+_nav).stop(true,true).slideDown(200); }, 150); }else{ var _nav = $(this).attr('_t_nav'); clearTimeout( qcloud[ _nav + '_timer' ] ); qcloud[ _nav + '_timer' ] = setTimeout(function(){ $('[_t_nav]').removeClass('cur'); $('#'+_nav).stop(true,true).slideUp(200); }, 150); } }) // function(){ // var _nav = $(this).attr('_t_nav'); // clearTimeout( qcloud[ _nav + '_timer' ] ); // qcloud[ _nav + '_timer' ] = setTimeout(function(){ // $('[_t_nav]').removeClass('cur'); // $('#'+_nav).stop(true,true).slideUp(200); // }, 150); // }); }); $(function(){ var honorSwiper = new Swiper('.ai-hswiper .swiper', { slidesPerView: 3, spaceBetween:22, // slidesPerGroup: 2, // loop: true, speed: 1000, slidesPerColumn : 2, slidesPerColumnFill : 'row', navigation: { nextEl: ".ah-right .h-next", prevEl: ".ah-right .h-prev", }, breakpoints: { 1466: { //当屏幕宽度大于等于320 slidesPerView: 2, }, } }); try { $('#viewer').viewer() } catch (error) { } //banner var bannerswiper = new Swiper('.banner .swiper', { slidesPerView: 1, spaceBetween: 0, loop: true, speed:1000, autoplay:{ delay: 6000,//1秒切换一次 }, // lazy: { // loadPrevNext: true, // }, pagination: { el: '.banner .swiper-pagination', clickable:true }, on:{ init:function(swiper){ slide=this.slides.eq(1); slide.addClass('ani-slide'); this.emit("transitionEnd") // var videoBor = $(".banner .swiper-slide"); // videoBor.on("click", function () { // bannerswiper.autoplay.stop(); // var $video = $(this).find("video")[0]; // if ($video.paused) { // $video.play(); // } else { // $video.pause(); // } // }); }, transitionStart: function(){ for(i=0;i { $('.f-nav h3').height(maxN); }, 500); } }); $(window).resize(); // 返回顶部按钮 if ($(this).scrollTop() == 0) { $(".w-right-box").fadeOut(500); } $(window).scroll(function(event) { /* Act on the event */ if ($(this).scrollTop() == 0) { $(".w-right-box").fadeOut(500); $('.header').removeClass('scur'); } if ($(this).scrollTop() != 0) { $(".w-right-box").fadeIn(500); $('.header').addClass('scur'); } }); $(window).scroll(); $("#toTop").click(function(event) { /* Act on the event */ $("html,body").animate({ scrollTop: "0px" }, 666) }); var indexSoluSwiper = new Swiper('.solu-swiper .swiper', { slidesPerView: 1, // spaceBetween:60, // slidesPerGroup: 2, // loop: true, speed:500, effect : 'fade', }); $('.ind-solulist li').hover(function(){ $(this).addClass('cur').siblings().removeClass('cur'); var liindex = $(this).index(); indexSoluSwiper.slideTo(liindex, 1000, false);//切换到第一个slide,速度为1秒 }) var indexParnterlist = new Swiper('.parnter-swiper .swiper', { slidesPerView: 7, spaceBetween:40, // slidesPerGroup: 2, // loop: true, speed: 1000, slidesPerColumn : 3, slidesPerColumnFill : 'row', pagination: { el: '.parnter-swiper .swiper-pagination', clickable: true }, breakpoints: { 1000: { //当屏幕宽度大于等于320 slidesPerView: 3, spaceBetween:10, slidesPerColumn : 3, }, } }); //数字递增 $(".count").each(function(){ var _this = $(this); num = _this.html(); id = _this.attr("id"); var demo = new countUp.CountUp(id, num,{ separator: '', }); var numsc = _this.waypoint({ handler: function(direction) { console.log(direction); if(direction =='up'){ demo.reset(); }else{ if (!demo.error) {   demo.start(); } else {   console.error(demo.error); } } }, offset: '88%' }) }) $('.dev-list').each(function(){ $(this).find('li:gt(2)').hide(); }); $('.dev-list .d-btn').click(function(){ if($(this).find('em').text() == '收起'){ $(this).find('em').text('加载更多'); $(this).parent().find('li:gt(2)').hide(); }else{ $(this).find('em').text('收起'); $(this).parent().find('li:gt(2)').show(); } }); $('.dev-left li').click(function(){ $(this).addClass('cur').siblings().removeClass('cur'); var index = $(this).index(); $('.dev-right .dev-list').eq(index).show().siblings().hide(); }); $('.h-block').each(function(){ $(this).find('.h-list').find('li:gt(5)').hide(); $(this).find('.h-list2').find('li:gt(7)').hide(); }); $('.h-block .h-btn').click(function(){ if($(this).find('em').text() == '收起'){ $(this).find('em').text('加载更多'); $(this).parent().find('li:gt(2)').hide(); }else{ $(this).find('em').text('收起'); $(this).parent().find('li:gt(2)').show(); } }); try { layui.use(['form', 'laydate'], function(){ var form = layui.form ,layer = layui.layer ,laydate = layui.laydate; //日期范围 laydate.render({ elem: '#test-startDate-1' }); laydate.render({ elem: '#test-endDate-1' //设置开始日期、日期日期的 input 选择器 }); }) } catch (error) { console.log(error); } var convertData = function (data) { var res = []; for (var i = 0; i < data.length; i++) { var geoCoord = geoCoordMap[data[i].name]; if (geoCoord) { res.push({ name: data[i].name, value: geoCoord.concat(data[i].value) }); } } return res; }; $('.about-fade').waypoint({ handler: function(direction) { console.log(direction); var that = $(this); if(direction =='down'){ $('.about-fade').addClass('haspass'); // $('.about-fade .about-logo').slideUp(1000); // $('.about-fade .about-table').slideDown(1000); }else{ // $('.about-fade .about-logo').slideDown(1000); // $('.about-fade .about-table').slideUp(1000); $('.about-fade').removeClass('haspass'); } }, offset: '30%' }) var SoluNYSwiper = new Swiper('.solu-sysswiper .swiper', { slidesPerView: 1, // spaceBetween:60, // slidesPerGroup: 2, // loop: true, speed:500, effect : 'fade', }); $('.solu-syslist li').hover(function(){ $(this).addClass('cur').siblings().removeClass('cur'); var solundex=$(this).index(); SoluNYSwiper.slideTo(solundex, 1000, false);//切换到第一个slide,速度为1秒 }); // $('.solulink-list li:gt(3)').hide(); // $('.solulink-list .link-more .see-more').click(function(){ // if($(this).find('em').text() == '收起'){ // $(this).find('em').text('展开更多') // $('.solulink-list li:gt(3)').hide(); // }else{ // $(this).find('em').text('收起') // $('.solulink-list li:gt(3)').show(); // } // }); //swiper画廊基础 var galleryThumbs = new Swiper('.gallery-thumbs', { spaceBetween:8, slidesPerView: 4, freeMode: true, watchSlidesVisibility: true, watchSlidesProgress: true, navigation: { nextEl: ".prodis-swiper .swiper-button-next", prevEl: ".prodis-swiper .swiper-button-prev", }, }); var galleryTop = new Swiper('.gallery-top', { spaceBetween: 0, thumbs: { swiper: galleryThumbs } }); //renli qiye var comlist = new Swiper('.renli-comlist .swiper-container', { spaceBetween:22, slidesPerView: 'auto', centeredSlides: true, slideToClickedSlide: true, loop:true, centeredSlidesBounds: true, navigation: { nextEl: ".renli-comlist .swiper-button-next", prevEl: ".renli-comlist .swiper-button-prev", }, breakpoints: { 1000: { //当屏幕宽度大于等于320 slidesPerView: 1, }, } }); $('.content-reni-join').on('click','.join-list .j-top',function(){ if($(this).parents('li').hasClass('act')){ $(this).parents('li').removeClass('act'); $(this).siblings('.text').slideUp(); }else{ $(this).parents('li').addClass('act'); $(this).siblings('.text').slideDown(); } if($(this).parents('li').hasClass('cur')){ $(this).parents('li').removeClass('cur'); $(this).parents('li').removeClass('act'); } }); $('.ai-wordclod span').each(function(){ var num = $(this).data('num'); $(this).css({'font-size':15*num/10+'rem'}) }); //mech var comlist = new Swiper('.mech-swiper .swiper-container', { spaceBetween:30, slidesPerView: 'auto', centeredSlides: true, loop:true, on:{ slideChangeTransitionStart: function(){ $('.mech-swiper .swiper-container .swiper-slide').eq(this.activeIndex-1).find('video')[0].pause() }, }, breakpoints: { 1000: { //当屏幕宽度大于等于320 slidesPerView:1, }, } }); $('.mech-swiper .swiper-container .swiper-slide .icon').click(function(){ $(this).parent().addClass('fadehide'); $(this).parent().find('video')[0].play(); }); $('.qua-list').find('li:gt(3)').hide(); $('.xx-btn .see-more').click(function(){ if($(this).find('em').text() == '收起'){ $(this).find('em').text('加载更多'); $(this).parent().siblings('.qua-list').find('li:gt(3)').hide(); }else{ $(this).find('em').text('收起'); $(this).parent().siblings('.qua-list').find('li:gt(3)').show(); } }); $('.map-dotbox .dot-item').each(function(e,i){ var lefts = $(this).data('left'); var rights = $(this).data('right'); var tops = $(this).data('top'); var bottoms = $(this).data('bottom'); if(lefts){ $(this).css({'left':lefts}) } if(rights){ $(this).css({'right':rights}) } if(tops){ $(this).css({'top':tops}) } if(bottoms){ $(this).css({'bottom':bottoms}) } }) var SoluCSSwiper = new Swiper('.chuanshu-swiper .swiper', { slidesPerView: 1, // spaceBetween:60, // slidesPerGroup: 2, // loop: true, speed:500, effect : 'fade', }); $('.botinfo-list li').hover(function(){ $(this).addClass('cur').siblings().removeClass('cur'); var solundex=$(this).index(); $(this).parents('.botinfo-list').siblings('.text').find('.text-p').eq(solundex).show().siblings().hide(); SoluCSSwiper.slideTo(solundex, 1000, false);//切换到第一个slide,速度为1秒 }); try { // $.ajax({ // type:"GET", // url:"/footer.html", // context: document.body, // success:function(msg){ // $(".footer").html($(msg)); // } // }) // $.ajax({ // type:"GET", // url:"/header.html", // context: document.body, // success:function(msg){ // $(".header").html($(msg)); // } // }) } catch (error) { } $('.about-table .cell').each(function(){ var textd = $(this).data('title') if(textd){ var htmls = ''; htmls+= '
' htmls+= '

'+textd+'

' htmls+= '
' $(this).append(htmls) } }) $('body').on('click','.h-ss',function(){ $('#isear').addClass('cur') }); $('body').on('click','.i-close',function(){ console.log('22222'); $('#isear').removeClass('cur') }); function sameHeight(tar) { var ar1 = [] var maxN = 0; tar.each(function() { var hh = $(this).height(); ar1.push(hh); maxN = Math.max(...ar1) }); setTimeout(() => { tar.height(maxN); }, 300); } // sameHeight($('.chuanshu-botinfo .text .text-p p')) }) function initEchartMap(Lata){ $.getJSON('/js/china.json', function(data) { console.log(data) echarts.registerMap('china', data); var myChart = echarts.init(document.getElementById('mapcenter')); var options= { visualMap: { show:true, left: 26, bottom: 40, showLabel:true, }, geo: { map: "china", scaleLimit: { min: 1, max: 2 }, zoom: 1.2, top:110, layoutSize: "100%", //保持地图宽高比 label: { normal: { show:false, fontSize: "14", color: "rgba(0,0,0,0.7)" }, emphasis: { show: false, textStyle: { color: "#F3F3F3" } } }, itemStyle: { normal: { //shadowBlur: 50, // shadowColor: 'rgba(0, 0, 0, 0.2)', borderColor: "#999", areaColor: '#fff', }, emphasis: { areaColor: "rgba(255, 255, 255, 1)", // shadowOffsetX: 0, // shadowOffsetY: 0, // borderWidth: 0 } } }, series: [ { type: 'effectScatter', coordinateSystem: 'geo', symbolSize: 4, label: { normal: { show: true, position: 'bottom', formatter:'{b}', color:'#D51257' } }, data: [ {name: '鹤壁', value: [114.284619,35.748375]}, ], itemStyle: { normal: { color: 'rgba(213, 18, 87, 0.5)', } }, rippleEffect: { // 波纹的绘制方式,可选'stroke'和'fill' brushType: 'fill', period:6, //动画的时间。 scale: 12.5 //动画中波纹的最大缩放比例。 }, }, // 区域散点图 { type: 'scatter', coordinateSystem: 'geo', label: { normal: { show: true, position: 'bottom', formatter:'{b}', } }, data: [ {name: '哈尔滨', value: [126.562883,45.80822]}, {name: '长春', value: [125.337505,43.895017]}, {name: '辽宁', value: [123.428695,41.830072]}, {name: '福建', value: [119.324293,26.073373]}, {name: '柳州', value: [109.412578,24.326956]}, {name: '重庆北', value: [108.511425,31.140561]}, {name: '重庆', value: [106.556784,29.619062]}, {name: '上海', value: [121.514029,31.265072]}, {name: '芜湖', value: [118.43771,31.351136]}, {name: '湖南', value: [113.030998,28.222207]}, {name: '安徽', value: [116.799317,33.676348]}, ], itemStyle: { //坐标点颜色 normal: { show: true, color: '#006CFF', }, emphasis: { areaColor: '#f00' } }, },{ name: "", type: "lines", zlevel: 6, lineStyle: { type: 'solid', width: 1, opacity: 1, curveness: 0, orient: 'horizontal', color: "#D51257", }, show: true, data: Lata, }, ] } myChart.clear(); myChart.setOption(options); // myChart.setOption({ // series:[ // {}, // {}, // {data: Lata} // ] // }); }) }