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() == 'return -'){ $(this).find('em').text('learn more +'); $(this).parent().find('li:gt(2)').hide(); }else{ $(this).find('em').text('return -'); $(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() == 'return -'){ $(this).find('em').text('learn more +'); $(this).parent().find('li:gt(2)').hide(); }else{ $(this).find('em').text('return -'); $(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() == 'return -'){ $(this).find('em').text('learn more +'); $(this).parent().siblings('.qua-list').find('li:gt(3)').hide(); }else{ $(this).find('em').text('return -'); $(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 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: 'hebi', 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: 'harbin', value: [126.562883,45.80822]}, {name: 'changchun', value: [125.337505,43.895017]}, {name: 'liaoning', value: [123.428695,41.830072]}, {name: 'fujian', value: [119.324293,26.073373]}, {name: 'liuzhou', value: [109.412578,24.326956]}, {name: 'the north of chongqing', value: [108.511425,31.140561]}, {name: 'chongqing', value: [106.556784,29.619062]}, {name: 'shanghai', value: [121.514029,31.265072]}, {name: 'wuhu', value: [118.43771,31.351136]}, {name: 'hunan', value: [113.030998,28.222207]}, {name: 'anhui', 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} // ] // }); }) }