var windowWith,windowHeight; var contanierW; var morenC; var isFirst = true; var _windowurl = window.location.href; console.log(_windowurl) if(_windowurl == "https://en.dcits.com/index.html"){ window.location='https://en.dcits.com/'; } if(_windowurl == "http://en.dcits.com/index.html"){ window.location='http://en.dcits.com/'; } ;(function($){ $(function(){ // document.oncontextmenu=new Function("event.returnValue=false"); // document.onselectstart=new Function("event.returnValue=false"); getWindowSize(); //头部search效果 /*$(".searchDiv").on('click',function(){ $(".searchDiv input").animate({'width':'140px'},300); $(".topnav .searchDiv i").addClass('glyphicon-red'); });*/ //返回顶部 var _windowHeight=$(window).height()/2; //console.log($(window).height()) $(window).scroll(function(){ //console.log($(window).scrollTop()) if ($(window).scrollTop()>_windowHeight){ $(".return-top").fadeIn(500); }else{ $(".return-top").fadeOut(500); } }); $(".return-top").click(function(){ $('body,html').animate({scrollTop:0},100); return false; }); if(windowWith > 992){ if($(".jrkj-container .item-block .cont").length > 0){ $(".jrkj-container .item-block .cont").mCustomScrollbar(); } } var imgSwiper = new Swiper('.img-focus .swiper-container', { autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: true, }, loop: true, pagination: { el: '.img-focus .swiper-pagination', clickable: true, }, }); $(".Business-products-nav .index-menu .index-menu-item").mouseover(function(){ var _dataMenu = $(this).attr("data-menu"); $(this).addClass('current'); if(_dataMenu !== "menu6"){ $(".Business-products-nav .index-menu-content").show(); } var _menu = $(this).attr("data-menu"); $(".Business-products-nav .index-menu-content .sub-menu").each(function(){ var _this = $(this); if(_this.attr("data-menu") == _menu){ _this.siblings().hide(); _this.show(); } }) }) $(".Business-products-nav .index-menu .index-menu-item").each(function() { var _this = $(this).attr("data-menu"); //console.log(_this) if(_this == "menu6"){ $(this).find("a").attr("href","/lzzt/jsjs.html"); $(this).find("a").attr("title","点击进入"); } }); $(".Business-products-nav .index-menu .index-menu-item").mouseout(function(){ $(this).removeClass('current'); $(".Business-products-nav .index-menu-content").hide(); }) $(".Business-products-nav .index-menu-content").mouseover(function(){ $(".Business-products-nav .index-menu-content").show(); }) $(".Business-products-nav .index-menu-content").mouseout(function(){ $(".Business-products-nav .index-menu-content").hide(); }) $(".Business-products-nav .index-menu-content .sub-menu").mouseover(function(){ var _menu = $(this).attr("data-menu"); $(".Business-products-nav .index-menu .index-menu-item").each(function(){ var _this = $(this); if(_this.attr("data-menu") == _menu){ _this.addClass('current'); } }) }) $(".Business-products-nav .index-menu-content .sub-menu").mouseleave(function(){ $(".Business-products-nav .index-menu .index-menu-item").removeClass('current'); }) //pc在线咨询悬浮 $(".indexfloat-contact").mouseover(function(){ $(".contact-panel-box").show(); }) $(".indexfloat-contact").mouseout(function(){ $(".contact-panel-box").hide(); }) //pc内页金融科技tab切换 $(".jrkj-com .jrkj-tab span").mouseover(function(){ $(this).addClass("active").siblings().removeClass("active"); $(".jrkj-com .jrkj-box .jrkj-cont").eq($(".jrkj-com .jrkj-tab span").index(this)).show().siblings(".jrkj-com .jrkj-box .jrkj-cont").hide(); return false; }); $(".jrkj-com").eq($(this).index()).find(".jrkj-tab span").eq(0).addClass('active'); $(".jrkj-com").eq($(this).index()).find(".jrkj-box .jrkj-cont").eq(0).addClass('active'); //mo内页金融科技tab切换 $(".jrkj-com .jrkj-tab span").click(function(){ $(this).addClass("active").siblings().removeClass("active"); $(".jrkj-com .jrkj-box .jrkj-cont").eq($(".jrkj-com .jrkj-tab span").index(this)).show().siblings(".jrkj-com .jrkj-box .jrkj-cont").hide(); return false; }); // mo首页分类导航 $(".mobi-products-menu").find(".mobi-menu-com:eq(1) li:eq(1) a").attr("href","/lzzt/jsjs.html"); $(".mobi-products-menu").find(".mobi-menu-com:eq(1) li:eq(1)").addClass('noClass'); $('.mobi-menu-com ul li a.mobi-menu-item-title').click(function(){ if(!$(this).parents("li").hasClass("noClass")){ $(this).parent().toggleClass('on'); $(this).siblings('.mobi-menu-detail').slideToggle(); $(this).parent().siblings('.mobi-menu-com ul li').removeClass('on'); $(this).parent().siblings('.mobi-menu-com ul li').find('.mobi-menu-detail').slideUp(); } }) //mobi微信二维码 $(".weixincode").on('click',function(){ $(".mobi-codeerwei").fadeIn(300); }); $(".mobi-codeerwei .mask").on('click',function(){ $(".mobi-codeerwei").fadeOut(300); }); //mobi百家号二维码 $(".baijiahao").on('click',function(){ $(".mobi-codeerbai").fadeIn(300); }); $(".mobi-codeerbai .mask").on('click',function(){ $(".mobi-codeerbai").fadeOut(300); }); //mobi抖音二维码 $(".douyin").on('click',function(){ $(".mobi-codeerdouyin").fadeIn(300); }); $(".mobi-codeerdouyin .mask").on('click',function(){ $(".mobi-codeerdouyin").fadeOut(300); }); //mobi视频号二维码 $(".shipinhao").on('click',function(){ $(".mobi-codeershipinhao").fadeIn(300); }); $(".mobi-codeershipinhao .mask").on('click',function(){ $(".mobi-codeershipinhao").fadeOut(300); }); //2017/08/08 $(".anlitab li").mouseenter(function(){ $(this).addClass("addcurrent").siblings().removeClass("addcurrent"); $(".anlicon li").eq($(this).index()).addClass("addcurrent").siblings().removeClass("addcurrent"); }) //手机端点击搜索按钮 $(".mobi_nav_default .searchBtn").on('click',function(){ if($(this).hasClass('current')){ $(this).removeClass('current'); $(".mobi_search_con").fadeOut(300); }else{ $(this).addClass('current'); $(".mobi_search_con").fadeIn(300); } }); //点击手机导航效果 $(".mobi_navBar").on('click',function(){ if(!$(this).hasClass('current')){ $(this).addClass('current'); $(".navfixmask").fadeIn(400); $(".bodyMain").animate({'left':'-210px'},400); $(".mobi_navfixed").show().animate({'right':'0'},400); } }); $(".navfixmask").on('click',function(){ $('.mobi_navBar').removeClass('current'); $(".navfixmask").fadeOut(400); $(".bodyMain").animate({'left':'0'},400); $(".mobi_navfixed").animate({'right':'-210px'},400,function(){ $(".mobi_navfixed").hide(); }); }); $(".iglys").on('click',function(){ if($(this).find(".glysamei").hasClass('current')){ $(this).find(".glysamei").removeClass('current'); $(this).find(".glysamei").closest('.same').siblings('div').fadeOut(400); }else{ $(this).find(".glysamei").addClass('current'); $(this).find(".glysamei").closest('.same').siblings('div').fadeIn(400); } }); //PC端金融,政府,农业等五块效果 morenC = getfivemodule(170,385); TweenMax.to(".five-info-con ul li",0,{width:'14.66666666%'}); TweenMax.to(".five-info-con ul li .opcityandPic",0.,{marginTop:morenC[1],height:morenC[0]}); TweenMax.to(".five-info-con ul li.current",0,{width:'26.33333333%'}); TweenMax.to(".five-info-con ul li.current .opcityandPic",0,{marginTop:morenC[3],height:morenC[2]}); $(".five-info-con ul li").hover(function(){ $(".five-info-con ul li").removeClass('current'); $(this).addClass('current'); TweenMax.to(".five-info-con ul li",0.3,{width:'14.6666666%'}); TweenMax.to(".five-info-con ul li .opcityandPic",0.3,{marginTop:morenC[1],height:morenC[0]}); TweenMax.to(".five-info-con ul li.current",0.3,{width:'26.33333333%'}); TweenMax.to(".five-info-con ul li.current .opcityandPic",0.3,{marginTop:morenC[3],height:morenC[2]}); },function(){ }); //底部友情链接 $(".otherLink").on('click',function(){ if($(this).hasClass('current')){ $(this).removeClass('current'); $(".otherlinkCon").fadeOut(300); }else{ $(this).addClass('current'); $(".otherlinkCon").fadeIn(300); } }); $(".otherLink").hover(function(){ $(".otherlinkCon").fadeIn(300); },function(){ $(".otherlinkCon").fadeOut(300); }); //mobi底部二维码 $(".mobi-code").on('click',function(){ $(".erweimaPop").fadeIn(300); }); $(".erweimaPop .mask").on('click',function(){ $(".erweimaPop").fadeOut(300); }); //mobi投资者 定期报告 $(".reports_re .re_d").on('click',function(){ $(this).find('.inneropcity').fadeIn(200); }); //tabs($(".container_tab_company .tab_title_company ul li a"), $('.tab_con_company .con_con')); //tabs($(".container_tabjl .tab_title_jl ul li a"), $('.tab_con_jl .tzzjl')); //公司简介tab切换 tabs($(".about-intro-con .title ul li"), $('.aobutTabcon .conSame')); //农业云图片点击放大弹框 /*$(".btnBigpic").on('click',function(){ $('.bigImgPop').fadeIn(300); var indsrc = $(this).attr('data-src'); $('.bigImgPop .img img').attr('src',indsrc); $('.bigImgPop .img innerPic').attr('href',indsrc); });*/ $(".bigImgPop .opacity").on('click',function(){ $('.bigImgPop').fadeOut(300); }); $(window).resize(function(){ getWindowSize(); morenC = getfivemodule(170,385); //当改变窗口大于768,取消小屏原有操作 if(windowWith>768){ $(".bodyMain").css({'left':0}); $(".mobi_navfixed").fadeOut(0,function(){ $(".mobi_navfixed").css({'right':'-210px'}); $(".navfixmask").fadeOut(0); }); $(".mobi_nav_default a").removeClass('current'); } }); //开放职业页面tab选项卡 $(".recruit_center .recruitHr_form_tit").eq(0).find(".recruitHr_form_tit2").addClass("active"); $(".recruit_center .recruitHr_form_center").eq(0).removeClass("hide"); $(".recruitHr_form_tit").on('click',function(){ if($(this).find(".recruitHr_form_tit2").hasClass("active")){ $(this).find(".recruitHr_form_tit2").removeClass("active"); $(this).next(".recruitHr_form_center").addClass("hide"); }else{ $(this).find(".recruitHr_form_tit2").addClass("active"); $(this).next(".recruitHr_form_center").removeClass("hide"); } }); //选项卡划过改变 $('.cio_chanpin_word').mouseover(function(){ $('.cio_chanpin_word').attr('src','/statics/images/dcits/cio/cio_chanpin_wordhover.png'); }); $('.cio_chanpin_word').mouseout(function(){ $('.cio_chanpin_word').attr('src','/statics/images/dcits/cio/cio_chanpin_word.png'); }); $('.cio_chanpin_question').mouseover(function(){ $('.cio_chanpin_question').attr('src','/statics/images/dcits/cio/cio_chanpin_questionhover.png'); }); $('.cio_chanpin_question').mouseout(function(){ $('.cio_chanpin_question').attr('src','/statics/images/dcits/cio/cio_chanpin_question.png'); }); /*$('.cio_chanpin_tel').mouseover(function(){ $('.cio_chanpin_tel').attr('src','/statics/images/dcits/cio/cio_chanpin_telhover.png'); }); $('.cio_chanpin_tel').mouseout(function(){ $('.cio_chanpin_tel').attr('src','/statics/images/dcits/cio/cio_chanpin_tel.png'); });*/ $('.cio_chanpin_tel').mouseover(function(){ $('.cio_chanpin_tel').attr('src','/statics/images/dcits/cio/cio_chanpin_videohover.png'); }); $('.cio_chanpin_tel').mouseout(function(){ $('.cio_chanpin_tel').attr('src','/statics/images/dcits/cio/cio_chanpin_video.png'); }); //时间轴 var ProductYearWidth =$('.Product_years_logo') * $('.Product_years_all').find('li').length; $('.Product_years_all').css('width',ProductYearWidth+'px'); $(".xzsyTabBox .tab li:last-child").addClass("noline"); $(".tishiBoxLayer .close").on('click',function(){ $('.tishiBoxLayer .tsContent .cont span').html(''); $('.tishiBoxLayer').fadeOut(300); }); if($(".consult_inner .row-link-same:eq(0)").text()==0){ //console.log($(this)); $(".consult_inner .row-link-same:eq(0)").remove(); $(".consult_inner").addClass("consult_innerTwo"); } /*$(".Animate .row .col-xs-6").mouseenter(function(){ $(this).find(".pic").addClass("animatedtw flipInY"); }) $(".Animate .row .col-xs-6").mouseleave(function(){ $(this).find(".pic").removeClass("animatedtw flipInY"); })*/ //员工剪影 $(".dcyListCont_inner .tab_nav li").eq(0).addClass("current"); var _focusHtml = $(".dcyListCont_inner .right_conent_box .box").eq(0).find(".hidden-focus").html(); $(".dcyListCont_inner .right_conent_box .box").eq(0).find(".focus").html(_focusHtml); $(".dcyListCont_inner .right_conent_box .box").eq(0).show(); var ygjySwiper = new Swiper('.dcyListCont_inner .right_conent_box .focus .swiper-container', { loop:true, //speed:1000, roundLengths : true, autoplay: { delay: 6000, disableOnInteraction: false }, navigation: { nextEl: '.dcyListCont_inner .right_conent_box .focus .swiper-button-next', prevEl: '.dcyListCont_inner .right_conent_box .focus .swiper-button-prev', } }); $(".dcyListCont_inner .tab_nav li").click(function(){ var _index = $(this).index(); $(".dcyListCont_inner .tab_nav li").removeClass("current"); $(".dcyListCont_inner .right_conent_box .box").hide(); $(this).addClass("current"); _focusHtml = $(".dcyListCont_inner .right_conent_box .box").eq(_index).find(".hidden-focus").html(); $(".dcyListCont_inner .right_conent_box .box").eq(_index).find(".focus").html(_focusHtml); $(".dcyListCont_inner .right_conent_box .box").eq(_index).show(); ygjySwiper = new Swiper('.dcyListCont_inner .right_conent_box .focus .swiper-container', { loop:true, //speed:1000, roundLengths : true, autoplay: { delay: 6000, disableOnInteraction: false }, navigation: { nextEl: '.dcyListCont_inner .right_conent_box .focus .swiper-button-next', prevEl: '.dcyListCont_inner .right_conent_box .focus .swiper-button-prev', } }); }) $(".maintenance-container .tab li").eq(0).addClass("current"); $(".maintenance-container .txt-content .box").eq(0).show(); $(".maintenance-container .tab li").click(function(){ $(this).addClass("current").siblings().removeClass("current"); $(".maintenance-container .txt-content .box").eq($(".maintenance-container .tab li").index(this)).show().siblings(".maintenance-container .txt-content .box").hide(); return false; }); //内页 $(".neiye-container .neiye-menu .m-item").click(function(event) { if (!$(this).hasClass('active')) { $(this).addClass('active').siblings('.active').removeClass('active'); var str = $(this).attr('data-str'); //$(window).scrollTop($("#"+str).offset().top - 100); $("html,body").animate({scrollTop: $("#"+str).offset().top - 80},800); } }); if($(".neiye-container .neiye-menu").length > 0){ var mtop; setTimeout(function(){ mtop = $(".neiye-container .neiye-menu").offset().top; },100); $(window).scroll(function(event) { var wtop = $(window).scrollTop(); if ($(window).scrollTop() > mtop) { $(".neiye-container .neiye-menu").addClass('active'); $(".neiye-container .neiye-menu-height").show(); }else{ $(".neiye-container .neiye-menu").removeClass('active'); $(".neiye-container .neiye-menu-height").hide(); } for (var i = 0; i < $(".neiye-box").length; i++) { var t = $(".neiye-box").eq(i).offset().top - 80; var h = $(".neiye-box").eq(i).height(); if(wtop> t && wtop < t + h){ var str = $(".neiye-box").eq(i).attr("id"); $(".neiye-container .neiye-menu .m-item.active").removeClass('active'); $(".neiye-container .neiye-menu .m-item[data-str="+str+"]").addClass('active'); break; } } }); } if(windowWith > 992){ if($(".neiye-inner .neiye-right-box").length > 0){ var winHeight,detialRightBox_top,detialLeftBox_top; setTimeout(function(){ winHeight = $(window).height(); detialRightBox_top = $(".neiye-inner .neiye-right-box").offset().top - 60; detialLeftBox_top = $(".neiye-inner .neiye-left-box").offset().top; },100); //滚动处理div $(window).scroll(function() { var this_scrollTop = $(this).scrollTop(); var detialLeftBox_height = $(".neiye-inner .neiye-left-box").height(); var _containerWidth = $(".neiye-inner .container").width(); var _neiyeRightBoxNum = (windowWith - _containerWidth) / 2; //console.log("this_scrollTop: "+this_scrollTop) //div1 if (this_scrollTop > detialRightBox_top) { //console.log(0) $(".neiye-inner .neiye-right-box").css({ "position": "fixed", "top": "60px", "bottom": "auto", "right": _neiyeRightBoxNum }); }else{ //console.log(2) $(".neiye-inner .neiye-right-box").css({ "position": "initial" }); } //console.log(windowHeight) if(windowHeight < 900){ if(this_scrollTop >= detialLeftBox_top+detialLeftBox_height-winHeight){ //console.log(1) $(".neiye-inner .neiye-right-box").css({ "position": "absolute", "top": "auto", "bottom": "20px" }); } } }); } } $(".jrkjyfsl-yfzx-inner .tabs li").eq(0).addClass("active"); $(".jrkjyfsl-yfzx-inner .tabs-content-box .box").eq(0).show(); $("body").on("click",".jrkjyfsl-yfzx-inner .tabs li .block-box",function(){ var _index = $(this).parents("li").index(); $(this).parents("li").addClass("active").siblings().removeClass("active"); $(".jrkjyfsl-yfzx-inner .tabs-content-box .box").eq(_index).show().siblings(".jrkjyfsl-yfzx-inner .tabs-content-box .box").hide(); return false; }) }) })(jQuery); function getWindowSize(){ windowWith = $(window).width(); windowHeight = $(window).height(); contanierW =$(".container").width(); } //首页金融,农业等动画函数 function getfivemodule(picW,picH){ var height = picH*contanierW*0.16666666/picW; var cur_height = picH*contanierW*0.3333333333/picW; var marginTop = -height/2; var marginTop_cur = -cur_height/2; return [height,marginTop,cur_height,marginTop_cur]; } var tabs = function(tab, con){ tab.click(function(){ var indx = tab.index(this); tab.removeClass('current'); $(this).addClass('current'); con.hide(); con.eq(indx).show(); }) } //典型客户切换 /* * changebox 大框 * marginRight li对应的margin-right * wid 每个li的宽度与margin-right的宽度和 * */ var dxchangetab = function(changebox,marginRight){ var $changeboxLi = changebox.find('li'); var $changechild = changebox.children('.changebox-custom'); var $changeUl = changebox.find('ul'); var $next = changebox.find('next'); var $pre = changebox.find('prev'); var liwidth = $changeboxLi.width()+marginRight; var num = 0; var staute = true; $changeUl.width($changeboxLi.width()*$changeUl.find('li').length+$changeUl.find('li').length*marginRight) $(changebox).on('click','.next',function(){ if(staute){ staute = false; if($changechild.width()/liwidth >= $changeboxLi.length-num){num = num;} else{ num++; $changeUl.animate({'left':-(liwidth*num)+'px'},200,function(){ staute =true; }); } } }); $(changebox).on('click','.prev',function(){ if(staute){ staute = false; if(num <= 0){num = 0;} else{ num--; $changeUl.animate({'left':-(liwidth*num)+'px'},200,function(){ staute =true; }); } } }); } ;(function($){ $(function(){ var $newsYears = $(".news_years").find('li'); var news_select = $(".news_years_select"); var newsYearsUlw1 = $('.news_years ul li').width()+6; var num = 0; var w = document.body.offsetWidth; var bodyHeight = $(window).height(); var mainHeight = $(".bodyMain").height(); var otherHeight = $('.topwarpnav').height()+$('#footer').height(); if(bodyHeight>=mainHeight){ console.log(bodyHeight,otherHeight) $(".mainwrap").css('min-height',(bodyHeight-otherHeight)+'px'); } function innerTime(){ $('.solution_txt11').height($('.solution_txt21').height()); $('.solution_txt12').height($('.solution_txt22').height()); $('.solution_txt13').height($('.solution_txt23').height()); $('.solution_txt24').height($('.solution_txt14').height()); $('.solution_txt25').height($('.solution_txt15').height()); } innerTime = setInterval(innerTime,10); $('.news_years ul').width($('.news_years ul li').width()*$('.news_years').find('li').length+$('.news_years').find('li').length*6) $newsYears.on('click',function(){ $(this).addClass("news_years_select").siblings().removeClass("news_years_select"); }); $('.news_years_right').on('click',function(){ if($('.news_years').width()/116 >= $newsYears.length-num){num = num;} else{ num++; $('.news_years ul').css('left',-(newsYearsUlw1*num)+'px'); } }); $('.news_years_left').on('click',function(){ if(num <= 0){num = 0;} else{ num--; $('.news_years ul').css('left',-(newsYearsUlw1*num)+'px'); } }); //时间轴 var $ProductYears = $(".Product_years_all").find('li'); var ProductsNum = 0; var ProductsYearsUlw1 = $('.Product_years_all li').width(); var productsSize = $ProductYears.size(); function windowWidth(){ if($(window).width()<1000){ $('.Product_years').width($(window).width()-80); $('.Product_years_line').width($('.Product_years').width()-108); }else{ $('.Product_years').width(864); $('.Product_years_line').width(756); } var soffset = $('.Product_years_select').offset(); if(soffset){ if(soffset.left > $('.Product_years').width()+$('.Product_years').offset().left){ ProductsNum = $('.Product_years_all li').index($('.Product_years_select')); $('.Product_years ul').css('left',-(ProductsYearsUlw1*ProductsNum)+'px'); $('.Product_years_arrow').css('left','38px') } } }; //setInterval(windowWidth,10) window.onresize = windowWidth; windowWidth(); $('.Product_years_all').width($('.Product_years_all li').width()*$('.Product_years_all').find('li').length) $ProductYears.on('click',function(){ $(this).addClass("Product_years_select").siblings().removeClass("Product_years_select"); var c = $('.Product_years_all li').index($('.Product_years_select')); $('.Product_years_tab_txt').css('display','none'); $('.Product_years_tab'+(c+1)).css('display','inline-table'); change(); ProductsNum = c; }); $('.Product_years_right').on('click',function(){ if( ProductsNum === productsSize -1){ return; } ProductsNum++; var soffset = $('.Product_years_select').offset(); if(soffset.left + 150 > $('.Product_years').width()+$('.Product_years').offset().left){ var _left = parseInt($('.Product_years ul').css('left')); if(isNaN(_left)){ _left = 0; } $('.Product_years ul').css('left', (_left-108)+'px'); } var currentProduct = $(".Product_years_all .Product_years_select"); $(currentProduct).removeClass('Product_years_select'); $(currentProduct).next().addClass("Product_years_select"); change(); var c = $('.Product_years_all li').index($('.Product_years_select')); $('.Product_years_tab_txt').css('display','none'); $('.Product_years_tab'+(c+1)).css('display','inline-table'); }); $('.Product_years_left').on('click',function(){ if(ProductsNum === 0){ return; } ProductsNum--; if($('.Product_years_select').offset().left -100 < $('.Product_years').offset().left){ var _left = parseInt($('.Product_years ul').css('left')); if(isNaN(_left)){ _left = 0; } $('.Product_years ul').css('left', (_left+108)+'px'); } //$('.Product_years ul').css('left',-(ProductsYearsUlw1*ProductsNum)+'px'); var currentProduct = $(".Product_years_all .Product_years_select"); $(currentProduct).removeClass('Product_years_select'); $(currentProduct).prev().addClass("Product_years_select"); change(); var c = $('.Product_years_all li').index($('.Product_years_select')); $('.Product_years_tab_txt').css('display','none'); $('.Product_years_tab'+(c+1)).css('display','inline-table'); }); function change(){ $('.Product_years_img').attr('src','/statics/images/dcits/cio/cio_logo1.png'); $('.Product_years_select').find('.Product_years_img').attr('src','/statics/images/dcits/cio/cio_logo2.png'); change2(); } function change2(){ var a = $('.Product_years_select'); var soffset = $('.Product_years_select').offset(); var coffset = $('.Product_years_center').offset(); /*var right = offset.left + a.width(); right = parseInt(right / 108)-5; if($(window).width()<1900){ right = right; } if(right<0){right=0;} if(right>7){right=7;} $('.Product_years_arrow').css('left',(38+108*right)+'px');*/ $('.Product_years_arrow').css('left',(soffset.left - coffset.left + 38) +'px') } //change(); $('.return_top').on('click',function(){ $('body,html').animate({scrollTop:0},1000); }); $('#big_txt').on('click',function(){ $(".myPrintArea").find('p').css('font-size','16px'); $('.news_txt').find('span').css('font-size','14px'); $('#big_txt').css('font-size','16px'); }); $('#mid_txt').on('click',function(){ $(".myPrintArea").find('p').css('font-size','14px'); $('.news_txt').find('span').css('font-size','14px'); $('#mid_txt').css('font-size','16px'); }); $('#small_txt').on('click',function(){ $(".myPrintArea").find('p').css('font-size','12px'); $('.news_txt').find('span').css('font-size','14px'); $('#small_txt').css('font-size','16px'); }); $("#news_push").on('click',function(){ bdhtml=window.document.body.innerHTML; sprnstr=""; eprnstr=""; prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+17); prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); window.document.body.innerHTML=prnhtml; window.print(); }) // 首页改版 var homeBannerNewSwiper = new Swiper('.home-banner-new .swiper-container', { autoplay: { delay: 10000, }, loop: true, pagination: { el: '.home-banner-new .swiper-pagination', clickable: true, }, navigation: { nextEl: '.home-banner-new .arrow-right', prevEl: '.home-banner-new .arrow-left', }, }); $(".home-jrkj-inner .tab li").eq(0).addClass("active"); $(".home-jrkj-inner .content-box .box").eq(0).addClass("active"); /* $(".home-jrkj-inner .content-box .box .s-tab li").eq(0).addClass("active"); $(".home-jrkj-inner .content-box .box .s-content-box .s-box").eq(0).addClass("active"); */ $(".home-jrkj-inner .content-box .box .s-content-box .ss-tab li").eq(0).addClass("active"); $(".home-jrkj-inner .content-box .box .ss-content-box .ss-box").eq(0).addClass("active"); if($(".home-jrkj-inner .content-box .box .ss-content-box .ss-box").length > 0){ //$(".home-jrkj-inner .content-box .box .ss-content-box .ss-box").eq(0).mCustomScrollbar(); } $(".home-jrkj-inner .content-box .box").eq(1).addClass("xjjyfw"); $(".home-jrkj-inner .tab li").click(function(){ var _index = $(this).index(); $(this).addClass("active").siblings().removeClass("active"); $(".home-jrkj-inner .content-box .box").eq(_index).addClass("active").siblings().removeClass("active"); $(".home-jrkj-inner .content-box .box").eq(_index).find(".s-tab li").removeClass("active"); $(".home-jrkj-inner .content-box .box").eq(_index).find(".s-content-box .s-box").removeClass("active"); $(".home-jrkj-inner .content-box .box").eq(_index).find(".s-tab li").eq(0).addClass("active"); $(".home-jrkj-inner .content-box .box").eq(_index).find(".s-content-box .s-box").eq(0).addClass("active"); $(".home-jrkj-inner .content-box .box").eq(_index).find(".s-content-box .s-box").eq(0).find(".ss-tab li").removeClass("active"); $(".home-jrkj-inner .content-box .box").eq(_index).find(".s-content-box .s-box").eq(0).find(".ss-content-box .ss-box").removeClass("active"); $(".home-jrkj-inner .content-box .box").eq(_index).find(".s-content-box .s-box").eq(0).find(".ss-tab li").eq(0).addClass("active"); $(".home-jrkj-inner .content-box .box").eq(_index).find(".s-content-box .s-box").eq(0).find(".ss-content-box .ss-box").eq(0).addClass("active")//.mCustomScrollbar(); //$(".home-jrkj-inner .content-box .box").eq(_index).find(".s-content-box .s-box").eq(0).find(".ss-content-box .ss-box").eq(0); }) /* $(".home-jrkj-inner .content-box .s-tab li").click(function(){ var _index = $(this).index(); $(this).addClass("active").siblings().removeClass("active"); $(".home-jrkj-inner .content-box .s-content-box .s-box").removeClass("active"); $(".home-jrkj-inner .content-box .s-content-box").show(); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).addClass("active"); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).find(".ss-tab li").removeClass("active"); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).find(".ss-content-box .ss-box").removeClass("active"); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).find(".ss-tab li").eq(0).addClass("active"); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).find(".ss-content-box .ss-box").eq(0).addClass("active")//.mCustomScrollbar(); }) */ $(".home-jrkj-inner .content-box .s-content-box .ss-tab li").click(function(){ var _index = $(this).index(); $(this).addClass("active").siblings().removeClass("active"); $(".home-jrkj-inner .content-box .ss-content-box .ss-box").removeClass("active"); $(this).parents(".s-box").find(".ss-content-box .ss-box").eq(_index).addClass("active")//.mCustomScrollbar(); }) $(".fintech-inner .tab li").eq(0).addClass("active"); $(".fintech-inner .content-box .box").eq(0).show(); $(".fintech-inner .tab li").click(function(){ $(this).addClass("active").siblings().removeClass("active"); $(".fintech-inner .content-box .box").eq($(".fintech-inner .tab li").index(this)).show().siblings(".fintech-inner .content-box .box").hide(); return false; }); if($(this).find(".timer").length > 0){ //console.log(1) if(isFirst){ $('.timer').each(count); isFirst = false; } } $(".erky-container .tab li").eq(0).addClass("active"); $(".erky-container .content-box .box").eq(0).show(); $(".erky-container .tab li").click(function(){ $(this).addClass("active").siblings().removeClass("active"); $(".erky-container .content-box .box").eq($(".erky-container .tab li").index(this)).show().siblings(".erky-container .content-box .box").hide(); return false; }); Videoplay(); $(".new-erky-container .one-tabs li").eq(0).addClass("active"); $(".one-content-box .one-box").eq(0).show(); $(".one-content-box .one-box").eq(0).find(".two-tabs li").eq(0).addClass("active"); $(".one-content-box .one-box").eq(0).find(".two-content-box .two-box").eq(0).show(); $("body").on("click",".new-erky-container .one-tabs li",function(){ var _index = $(this).index(); $(this).addClass("active").siblings().removeClass("active"); $(".one-content-box .one-box").eq(_index).show().siblings(".one-content-box .one-box").hide(); $(".one-content-box .one-box").eq(_index).find(".two-tabs li").eq(0).addClass("active").siblings().removeClass("active"); $(".one-content-box .one-box").eq(_index).find(".two-content-box .two-box").eq(0).show().siblings(".two-content-box .two-box").hide(); return false; }); $("body").on("click",".one-content-box .two-tabs li",function(){ var _index = $(this).index(); console.log(_index) $(this).addClass("active").siblings().removeClass("active"); $(this).parents(".one-box").find(".two-content-box .two-box").eq(_index).show().siblings(".two-content-box .two-box").hide(); //$(".two-content-box .two-box").eq(_index).show().siblings(".two-content-box .two-box").hide(); return false; }); if(windowWith>768){ var swiper = new Swiper('.cgal-focus-pc .swiper-container', { loop : true, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: true, }, speed:1000, slidesPerView: 4, slidesPerGroup : 4, spaceBetween: 20, pagination: { el: '.cgal-focus-pc .swiper-pagination', clickable :true }, navigation: { nextEl: '.cgal-focus-pc .btn-next', prevEl: '.cgal-focus-pc .btn-prev' } }); //首页banner var swiper = new Swiper('.newHomeslide .swiper-container', { autoplay: { delay: 10000, }, pagination: { el: '.newHomeslide .swiper-pagination', clickable: true, }, }); //首页金融科技爆款产品 var swiper = new Swiper('.financial-products-right .swiper-container', { slidesPerView: 3, slidesPerGroup : 3, slidesPerColumn: 2, autoplay: { delay: 60000, }, //loop : true, pagination: { el: '.financial-products-right .swiper-pagination', clickable: true, }, }); // 首页新闻轮播pc var swiper = new Swiper('.Hotnews-swiper', { slidesPerView: 4, spaceBetween: 20, slidesPerGroup: 4, loop: true, loopFillGroupWithBlank: true, pagination: { el: '.Hotnews-swiper .swiper-pagination', clickable: true, }, navigation: { nextEl: '.Hotnews-swiper .swiper-button-next', prevEl: '.Hotnews-swiper .swiper-button-prev', }, }); var homeJrkjzbcpFocusSwiper = new Swiper('.home-jrkjzbcp-focus .swiper-container', { autoplay: { delay: 5000, }, slidesPerView: 5, slidesPerColumn: 2, slidesPerGroup : 5, //slidesPerColumnFill: 'row', //spaceBetween: 20, pagination: { el: '.home-jrkjzbcp-focus .swiper-pagination', clickable: true, }, navigation: { nextEl: '.home-jrkjzbcp-focus .swiper-arrow-next', prevEl: '.home-jrkjzbcp-focus .swiper-arrow-prev', }, }); var homeNewsFocusSwiper = new Swiper('.home-news-focus .swiper-container', { autoplay: { delay: 5000, }, slidesPerView: 3, slidesPerGroup : 3, spaceBetween: 30, /* pagination: { el: '.home-news-focus .swiper-pagination', clickable: true, }, */ navigation: { nextEl: '.home-news-focus .swiper-arrow-next', prevEl: '.home-news-focus .swiper-arrow-prev', }, }); var homeNewsFocusRightSwiper = new Swiper(".home-news-focus-right .swiper-container", { autoplay: { delay: 5000, }, direction: "vertical", slidesPerView: 3, spaceBetween: 10, /* scrollbar: { el: ".home-news-focus-right .swiper-scrollbar", hide: true, }, */ mousewheel: { thresholdDelta:110, }, pagination: { el: ".home-news-focus-right .swiper-pagination", type: "progressbar", }, }); $(".home-jrkj-inner .content-box .s-tab li").hover(function(){ var _index = $(this).index(); $(this).addClass("active").siblings().removeClass("active"); $(".home-jrkj-inner .content-box .s-content-box .s-box").removeClass("active"); $(".home-jrkj-inner .content-box .s-content-box").stop().slideDown(); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).addClass("active"); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).find(".ss-tab li").removeClass("active"); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).find(".ss-content-box .ss-box").removeClass("active"); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).find(".ss-tab li").eq(0).addClass("active"); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).find(".ss-content-box .ss-box").eq(0).addClass("active")//.mCustomScrollbar(); },function(){ $(".home-jrkj-inner .content-box .s-content-box").stop().slideUp(); $(".home-jrkj-inner .content-box .s-tab li").removeClass("active"); }) $(".home-jrkj-inner .content-box .s-content-box .s-box").hover(function(){ $(".home-jrkj-inner .content-box .s-content-box").stop().slideDown(); var _index = $(this).index(); console.log(_index) $(".home-jrkj-inner .content-box .s-tab li").eq(_index).addClass("active"); },function(){ $(".home-jrkj-inner .content-box .s-content-box").stop().slideUp(); $(".home-jrkj-inner .content-box .s-tab li").removeClass("active"); }) }else{ var swiper = new Swiper('.cgal-focus .swiper-container', { loop : true, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: true, }, speed:1000, slidesPerView: 2, slidesPerGroup : 2, spaceBetween: 20, pagination: { el: '.cgal-focus .swiper-pagination', clickable :true }, navigation: { nextEl: '.cgal-focus .btn-next', prevEl: '.cgal-focus .btn-prev' } }); // 首页新闻轮播mo var swiper = new Swiper('.Hotnews-swiper', { loop: true, slidesPerView: 'auto', spaceBetween: 10, pagination: { el: '.Hotnews-swiper .swiper-pagination', clickable: true, }, // navigation: { // nextEl: '.Hotnews-swiper .swiper-button-next', // prevEl: '.Hotnews-swiper .swiper-button-prev', // }, }); //首页金融科技爆款产品mo var swiper = new Swiper('.financial-products-right .swiper-container', { slidesPerView: 2, slidesPerGroup : 2, autoplay: { delay: 60000, }, //loop : true, pagination: { el: '.financial-products-right .swiper-pagination', clickable: true, }, }); // moFinTech $('.Hotnews-fourbox .col-xs-12 .fourbox-title').click(function(){ $(this).parent().toggleClass('on'); $(this).siblings('.Hotnews-fourbox .fourbox-detail').slideToggle(); $(this).parent().siblings('.Hotnews-fourbox .col-xs-12').removeClass('on'); $(this).parent().siblings('.Hotnews-fourbox .col-xs-12').find('.Hotnews-fourbox .fourbox-detail').slideUp(); }) var homeJrkjzbcpFocusSwiper = new Swiper('.home-jrkjzbcp-focus .swiper-container', { autoplay: { delay: 5000, }, slidesPerView: "auto", centeredSlides: true, loop: true, //spaceBetween: 20, pagination: { el: '.home-jrkjzbcp-focus .swiper-pagination', clickable: true, }, }); var homeNewsFocusSwiper = new Swiper('.home-news-focus .swiper-container', { autoplay: { delay: 5000, }, slidesPerView: "auto", centeredSlides: true, loop: true, spaceBetween: 20, pagination: { el: '.home-news-focus .swiper-pagination', clickable: true, }, }); var homeNewsFocusRightSwiper = new Swiper(".home-news-focus-right .swiper-container", { autoplay: { delay: 5000, }, slidesPerView: "auto", centeredSlides: true, loop: true, spaceBetween: 20, pagination: { el: ".home-news-focus-right .swiper-pagination", type: "progressbar", }, }); /* var homeNewsFocusRightSwiper = new Swiper(".home-news-focus-right .swiper-container", { direction: "vertical", slidesPerView: 3, spaceBetween: 10, mousewheel: { thresholdDelta:110, }, pagination: { el: ".home-news-focus-right .swiper-pagination", type: "progressbar", }, }); */ $(".home-jrkj-inner .content-box .s-tab li").eq(0).addClass("active"); $(".home-jrkj-inner .content-box .s-content-box").show(); $(".home-jrkj-inner .content-box .s-content-box .s-box").eq(0).addClass("active"); $(".home-jrkj-inner .content-box .s-tab li").click(function(){ var _index = $(this).index(); $(this).addClass("active").siblings().removeClass("active"); $(".home-jrkj-inner .content-box .s-content-box .s-box").removeClass("active"); $(".home-jrkj-inner .content-box .s-content-box").show(); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).addClass("active"); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).find(".ss-tab li").removeClass("active"); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).find(".ss-content-box .ss-box").removeClass("active"); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).find(".ss-tab li").eq(0).addClass("active"); $(this).parents(".box").find(".s-content-box .s-box").eq(_index).find(".ss-content-box .ss-box").eq(0).addClass("active")//.mCustomScrollbar(); }) } var recommand_id=$(".neiye-right-box .list-box").attr("data-value"); if(recommand_id){ $.ajax({ type: 'GET', url: '/index.php?m=content&c=index&a=get_recommendlist&catid='+recommand_id, dataType: 'json', success:function(data){ var len = data.datalist.length; var result_li = ''; for(var i=0; i'+data.datalist[i].title+''+ '

'+data.datalist[i].description+'

'+ '' } $(".neiye-right-box .list-box ul").append(result_li); } }); } }) })(jQuery); /*视频弹框*/ function Videoplay(){ $(".video-play").click(function(){ var _title = $(this).find(".title").html(); var mp4_src=$(this).attr("data-url"); $("body").append('
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ _title +'
'+ '
'+ '
'+ '
'); $(".video-layer").fadeIn(300); }); $(".base-video-play").click(function(){ var mp4_src=$(this).attr("data-url"); $("body").append('
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'); $(".video-layer").fadeIn(300); }); $("body").on("click",".video-layer .layer-close,.video-layer .opacity",function(){ $(".video-layer").fadeOut(300,function(){ $(".video-layer").remove(); }); }) } //写cookies,永久有效 function setCookieY(_cookie, _cookieValue) { document.cookie = _cookie + "=" + escape(_cookieValue) + ";path=/"; } //读取cookies function getCookieY(_cookie) { var arr, reg = new RegExp("(^| )" + _cookie + "=([^;]*)(;|$)"); if (arr = document.cookie.match(reg)){ return unescape(arr[2]); }else{ return null; } }