$(function(){
// window.addEventListener(
// 'touchstart',
// e => e.preventDefault(),
// { passive: false }
// );
$('.shareCon .icon-weixin1').click(function(){$('.bshare-weixin')[0].click();});
$('.shareCon .icon-weibo1').click(function(){$('.bshare-sinaminiblog')[0].click();});
$('.shareCon .icon-lianjie').click(function(){$('.bshare-clipboard')[0].click();});
$('.shareCon .icon-youxiang').click(function(){$('.bshare-email')[0].click();});
//瑙e喅鏂规鍜屼骇鍝佹湇鍔$殑鐎戝竷娴佽彍鍗
waterFallProduct();
waterFallSolution();
var items = $('.iMainValue_1 .product .text .num_item');
if(items.length>0){
items.each(function(i){
var nums = items.eq(i).children('.num').text();
jumpNumber(0,nums - 0,10,items.eq(i).children('.num'),i)
});
}
$('[rel="example_group1"]').fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'speedIn' : 600,
'speedOut' : 200,
'overlayShow' : false
});
$('[rel="example_group2"]').fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'speedIn' : 600,
'speedOut' : 200,
'overlayShow' : false
});
//鍏充簬鎴戜滑鐨則abs
$('.honorsTab li').click(function(){
$(this).addClass('curr').siblings().removeClass('curr');
$('.honorsCon .iHonorsList').eq($(this).index()).removeClass('hidden').addClass('curr').siblings().removeClass('curr').addClass('hidden');
$('body').attr('style','')
});
$('.pMain7_1 .cTabs li').mouseover(function(){
console.log($(this).index())
// if(!$('.pMain7_1 .cCons li').eq($(this).index()).children('img').hasClass('hover')){
$('.pMain7_1 .cCons li').eq($(this).index()).addClass('hover')
// }
});
$('.pMain7_1 .cTabs li').mouseout(function(){
$('.pMain7_1 .cCons li').eq($(this).index()).removeClass('hover')
});
$('.pMain_imom .img_solu img').mouseover(function(){
var index = $(this).index();
if(index == 0){
var div_func = $('.pMain_imom .img_module').children('.img_func:lt(2)');
div_func.each(function(i){
var imgs = div_func.eq(i).children('img');
imgs.eq(0).addClass('absolute')
imgs.eq(1).removeClass('absolute')
});
}else{
var imgs = $('.pMain_imom .img_func').eq(2).children('img');
imgs.eq(0).addClass('absolute')
imgs.eq(1).removeClass('absolute')
}
});
$('.pMain_imom .img_solu img').mouseout(function(){
let div_func = $('.pMain_imom .img_func');
div_func.each(function(i){
var imgs = div_func.eq(i).children('img');
console.log(imgs)
imgs.eq(1).addClass('absolute')
imgs.eq(0).removeClass('absolute')
});
});
$('.pMain_imom .img_func').mouseover(function(){
let imgs = $('.pMain_imom .img_func').eq($(this).index()).children('img');
imgs.eq(0).addClass('absolute')
imgs.eq(1).removeClass('absolute')
});
$('.pMain_imom .img_func').mouseout(function(){
let imgs = $('.pMain_imom .img_func').eq($(this).index()).children('img');
imgs.eq(1).addClass('absolute')
imgs.eq(0).removeClass('absolute')
});
if($(window).width()>1024) {
$('.iProductList .swiper-slide').mouseover(function () {
$(this).siblings('.swiper-slide').children('.product').removeClass('hover');
$(this).children('.product').addClass('hover');
});
$('.iProductList .swiper-slide').mouseout(function () {
$(this).siblings('.swiper-slide').children('.product').removeClass('hover');
$(this).children('.product').removeClass('hover');
});
$('.iProductList .swiper-slide-half').mouseover(function () {
$(this).siblings('.swiper-slide-half').children('.product').removeClass('hover');
$(this).children('.product').addClass('hover');
});
$('.iProductList .swiper-slide-half').mouseout(function () {
$(this).siblings('.swiper-slide-half').children('.product').removeClass('hover');
$(this).children('.product').removeClass('hover');
$('.iProductList .swiper-slide-half').eq(0).children('.product').addClass('hover');
});
$('.iProductList .swiper-slide-three').mouseover(function () {
var count = $('.iProductList .swiper-slide-three').length;
var totalWidth = $('.iProductList .swiper-slide-three').parent('.list')[0].getBoundingClientRect().width;
var activeWidth = totalWidth * 2 / (count + 1)
var itemWidth = (totalWidth - activeWidth) / (count - 1);
$(this).siblings('.swiper-slide-three').width(itemWidth).children('.product').removeClass('hover');
$(this).width(activeWidth).children('.product').addClass('hover');
});
$('.iProductList .swiper-slide-three').mouseout(function () {
var count = $('.iProductList .swiper-slide-three').length;
var totalWidth = $('.iProductList .swiper-slide-three').parent('.list')[0].getBoundingClientRect().width;
var activeWidth = totalWidth * 2 / (count + 1)
var itemWidth = (totalWidth - activeWidth) / (count - 1);
$(this).siblings().width(itemWidth).children('.product').removeClass('hover');
$(this).width(itemWidth).children('.product').removeClass('hover');
$('.iProductList .swiper-slide-three').eq(0).width(activeWidth).children('.product').addClass('hover');
});
}else{
$('.iProductList .swiper-slide').mouseover(function () {
$(this).siblings('.swiper-slide').children('.product').removeClass('hover');
$(this).children('.product').addClass('hover');
});
$('.iProductList .swiper-slide').mouseout(function () {
$(this).siblings('.swiper-slide').children('.product').removeClass('hover');
$(this).children('.product').removeClass('hover');
});
}
//鍙戝睍鍘嗙▼
$('.historyTabs li').click(function(){
$(this).addClass('curr').siblings().removeClass('curr');
$('.historyCon .historyList').eq($(this).index()).removeClass('hidden').addClass('curr').siblings().removeClass('curr').addClass('hidden');
$('body').attr('style','')
});
//瑙e喅鏂规
$('.pMain_sol .solNav li').click(function(){
var index = $(this).index();
$(this).addClass('curr').siblings().removeClass('curr');
$('.pMain_sol .solCon li').eq($(this).index()).removeClass('hidden').addClass('curr').siblings().removeClass('curr').addClass('hidden');
});
$('.pMain .pMainUseNav li').click(function(){
$(this).addClass('curr').siblings().removeClass('curr');
$('.pMain .useCon .pMainUse').eq($(this).index()).removeClass('hidden').siblings().removeClass('curr').addClass('hidden');
});
var solConList;
$('.pMain_imotor .solNav li').click(function(){
$(this).addClass('curr').siblings().removeClass('curr');
$('.pMain_imotor .solCon li').eq($(this).index()).removeClass('hidden').addClass('curr').siblings().removeClass('curr').addClass('hidden');
if($('.pMom').length>0){
var index = $(this).index();
console.log(index)
$('.pMom').css('display',"none");
$('.pMom').eq(index).css('display',"block")
}
if (solConList){
console.log("destroy")
solConList.destroy();
}
solConList = new Swiper('.solCon .curr .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:true,
autoplay:true,
grabCursor:true,
slidesPerView:1,
slidesPerGroup:1,
clickable:true,
observer:true, // 淇敼swiper鑷繁鎴栧瓙鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiper
observeParents:true,// 淇敼swiper鐨勭埗鍏冪礌鏃讹紝鑷姩鍒濆鍖杝wiper
pagination: {
el: '.solCon .swiperDots',
clickable: true,
},
});
});
//棣栭〉 浜у搧鍒楄〃鐨勫垏鎹
$('.mProductTab .tab').click(function(){
$(this).addClass('curr').siblings().removeClass('curr');
$('.mProduct .mProductList').eq($(this).index()).removeClass('hidden').addClass('curr').siblings().removeClass('curr').addClass('hidden');
$('body').attr('style','')
});
$('.mProduct .mProductList .main .pd').click(function(){
if($(window).width()>640){
window.open($(this).attr('target'));
}else{
if($(this).parent('.main').hasClass('is_active')){
$(this).parent('.main').removeClass('is_active');
}else{
$(this).parent('.main').addClass('is_active').siblings().removeClass('is_active');
}
}
});
$('.mProduct .mProductList .parent_main .childList .pd').click(function(){
if($(window).width()>640){
window.open($(this).attr('target'));
}else{
if($(this).parent('.child_header').hasClass('is_active')){
$(this).parent('.child_header').removeClass('is_active');
}else{
$(this).parent('.child_header').addClass('is_active').siblings().removeClass('is_active');
}
}
});
$('.mProduct .mProductList .main .pd .button').click(function(){
window.open($(this).attr('target'));
});
$('.mProduct .mProductList .parent_main .pd .button').click(function(){
window.open($(this).attr('target'));
});
$('.jMain1_1 dt').click(function(){
if(!$(this).parents('dl').hasClass('curr')){
$(this).parents('dl').addClass('curr').siblings().removeClass('curr').find('dd').slideUp();
$(this).parents('dl').find('dd').slideDown();
}else{
$(this).parents('dl').removeClass('curr').find('dd').slideUp();
}
});
$('.jMain1_1 dl').eq(0).addClass('curr').find('dd').show();
$('.ipt_list1_c1 input').click(function(){
if($(this).parents('li').hasClass('curr')){
$(this).parents('li').removeClass('curr');
}else{
if($(this).parents('ul').find("li.curr").length>=3){
return false;
}else{
$(this).parents('li').addClass('curr');
}
}
});
$('.ipt_list1_r1 input').click(function(){
$(this).parents('li').addClass('curr').siblings().removeClass('curr');
});
//鍝嶅簲寮忚彍鍗曟寜閽
$('.menu-link').click(function(){
if(!$(this).hasClass('active')){
$(this).addClass('active');
$('.menu').slideDown();
$('.tSearch,.tContact').removeClass('active');
$('.tSearch .box,.tContact .box').fadeOut();
}else{
$(this).removeClass('active');
$('.menu').slideUp();
}
});
//杈撳叆妗嗘敼鍙樺拰杩樺師
$('[placeholder]').focus(function(){
$(this).attr('placeholder','');
})
$('[placeholder]').blur(function(){
$(this).attr('placeholder',$(this).attr('data-placeholder'));
});
$('.iProTab li').mouseenter(function(){
$(this).addClass('curr').siblings().removeClass('curr');
$('.iProCon li').eq($(this).index()).show().siblings().hide();
});
/*瑙嗛*/
$(".play_btn").click(function() {
var dataVideo = $(this).attr("data-video");
var poster = $(this).attr("data-img");
$("body").append(
'
');
$(".video_bg,.video_box").fadeIn();
});
$(document).on('click','.video_box i',function(){
$(".video_bg,.video_box").fadeOut(500, function() { $(".video_bg,.video_box").remove(); });
});
$(document).on('click','.video_bg',function(){
$(".video_bg,.video_box").fadeOut(500, function() { $(".video_bg,.video_box").remove(); });
});
var iBanner = new Swiper('.iBanner .swiper', {
paginationClickable: true,
effect: 'slide',
speed:800,
loop:true,
autoplay: {
delay: 96000,
disableOnInteraction: false,
},
pagination: {
el: '.iBanner .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.iBanner .swiperNext',
prevEl: '.iBanner .swiperPrev',
}
});
var iCasesList = new Swiper('.iCasesList .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:true,
pagination: {
el: '.iCasesList .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.iCasesList .swiperNext',
prevEl: '.iCasesList .swiperPrev',
},
breakpoints: {
1025: {
slidesPerView: 1,
slidesPerGroup : 1
},
961: {
slidesPerView: 1,
slidesPerGroup : 1
},
641: {
slidesPerView: 1,
slidesPerGroup : 1
},
241: {
slidesPerView: 1,
slidesPerGroup : 1
}
}
});
var iNewsList = new Swiper('.iNewsList .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:true,
pagination: {
el: '.iNewsList .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.iNewsList .swiperNext',
prevEl: '.iNewsList .swiperPrev',
},
breakpoints: {
1025: {
slidesPerView: 3,
slidesPerGroup : 1
},
961: {
slidesPerView: 3,
slidesPerGroup : 3
},
641: {
slidesPerView: 2,
slidesPerGroup : 2
},
241: {
slidesPerView: 1,
slidesPerGroup : 1
}
}
});
//瑙e喅鏂规閲岃涓氭渚嬬殑杞挱鍥
var SCasesList = new Swiper('.SCasesList .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:false,
pagination: {
el: '.SCasesList .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.SCasesList .swiperNext',
prevEl: '.SCasesList .swiperPrev',
},
breakpoints: {
1025: {
slidesPerView: 3,
slidesPerGroup : 1
},
961: {
slidesPerView: 3,
slidesPerGroup : 3
},
641: {
slidesPerView: 2,
slidesPerGroup : 2
},
241: {
slidesPerView: 1,
slidesPerGroup : 1
}
}
});
var iSolutionList = new Swiper('.iSolutionList .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:false,
pagination: {
el: '.iSolutionList .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.iSolutionList .swiperNext',
prevEl: '.iSolutionList .swiperPrev',
},
breakpoints: {
1025: {
slidesPerView: 1,
slidesPerGroup : 1
},
961: {
slidesPerView: 1,
slidesPerGroup : 1
},
241: {
slidesPerView: 1,
slidesPerGroup : 1
}
}
});
var iProductList = new Swiper('.iProductList .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:false,
grabCursor:true,
slidesPerView: 'auto',
slidesPerGroup:1,
pagination: {
el: '.iProductList .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.iProductList .swiperNext',
prevEl: '.iProductList .swiperPrev',
},
});
var platformList = new Swiper('.platformList .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:false,
grabCursor:true,
slidesPerView: 'auto',
slidesPerGroup:1,
clickable:true,
pagination: {
el: '.platformList .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.platformList .swiperNext',
prevEl: '.platformList .swiperPrev',
},
breakpoints: {
1025: {
slidesPerView: 4,
slidesPerGroup : 1
},
961: {
slidesPerView: 3,
slidesPerGroup : 3
},
641: {
slidesPerView: 2,
slidesPerGroup : 2
},
241: {
slidesPerView: 1,
slidesPerGroup : 1
}
}
});
var courseList = new Swiper('.courseList .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:false,
pagination: {
el: '.courseList .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.courseList .swiperNext',
prevEl: '.courseList .swiperPrev',
},
breakpoints: {
1025: {
slidesPerView: 5,
slidesPerGroup : 1
},
961: {
slidesPerView: 4,
slidesPerGroup :1
},
641: {
slidesPerView: 2,
slidesPerGroup : 1
},
241: {
slidesPerView: 1,
slidesPerGroup : 1
}
}
});
var jobListB = new Swiper('.jobListB .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:false,
pagination: {
el: '.jobListB .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.jobListB .swiperNext',
prevEl: '.jobListB .swiperPrev',
},
breakpoints: {
1025: {
slidesPerView: 3,
slidesPerGroup : 1
},
961: {
slidesPerView: 3,
slidesPerGroup : 3
},
641: {
slidesPerView: 2,
slidesPerGroup : 2
},
241: {
slidesPerView: 1,
slidesPerGroup : 1
}
}
});
var jobListC = new Swiper('.jobListC .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:true,
pagination: {
el: '.jobListC .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.jobListC .swiperNext',
prevEl: '.jobListC .swiperPrev',
},
breakpoints: {
1025: {
slidesPerView: 3,
slidesPerGroup : 1
},
961: {
slidesPerView: 3,
slidesPerGroup : 3
},
641: {
slidesPerView: 2,
slidesPerGroup : 2
},
241: {
slidesPerView: 1,
slidesPerGroup : 1
}
}
});
var iCase = new Swiper('.iCase .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:true,
pagination: {
el: '.iCase .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.iCase .swiperNext',
prevEl: '.iCase .swiperPrev',
},
breakpoints: {
1025: {
slidesPerView: 3,
slidesPerGroup : 3
},
961: {
slidesPerView: 3,
slidesPerGroup : 3
},
641: {
slidesPerView: 2,
slidesPerGroup : 2
},
241: {
slidesPerView: 1,
slidesPerGroup : 1
}
}
});
var iHonorsListA = new Swiper('.iHonorsListA .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:true,
pagination: {
el: '.iHonorsListA .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.iHonorsListA .swiperNext',
prevEl: '.iHonorsListA .swiperPrev',
},
breakpoints: {
1025: {
slidesPerView: 4,
slidesPerGroup : 4
},
961: {
slidesPerView: 3,
slidesPerGroup : 3
},
641: {
slidesPerView: 2,
slidesPerGroup : 2
},
241: {
slidesPerView: 2,
slidesPerGroup : 2
}
}
});
var iHonorsListB = new Swiper('.iHonorsListB .swiper',{
effect:'slide',
paginationClickable: true,
watchActiveIndex: true,
loop:true,
pagination: {
el: '.iHonorsListB .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.iHonorsListB .swiperNext',
prevEl: '.iHonorsListB .swiperPrev',
},
breakpoints: {
1025: {
slidesPerView: 4,
slidesPerGroup : 4
},
961: {
slidesPerView: 3,
slidesPerGroup : 3
},
641: {
slidesPerView: 2,
slidesPerGroup : 2
},
241: {
slidesPerView: 2,
slidesPerGroup : 2
}
}
});
var iPartnerList = new Swiper('.iPartnerList .swiper',{
// slidesPerView:6,
paginationClickable: true,
watchActiveIndex: true,
loop:false,
autoplay: {
delay: 4800,
disableOnInteraction: false,
},
pagination: {
el: '.iPartnerList .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.iPartnerList .swiperNext',
prevEl: '.iPartnerList .swiperPrev',
},
breakpoints: {
1980: { //灞忓箷瀹藉害澶т簬鍊兼椂
loop:false,
slidesPerView: 6,
slidesPerColumn: 5,
slidesPerGroup : 30,
},
1200: {
loop:false,
slidesPerView: 6, //鍒
slidesPerColumn: 5, //琛
slidesPerGroup : 30,//缁
},
800: {
loop:false,
slidesPerView: 4, //鍒
slidesPerColumn: 3, //琛
slidesPerGroup : 12,//缁
},
241: {
loop:false,
slidesPerView: 2,
slidesPerColumn: 3,
slidesPerGroup : 2,
}
}
});
var iSolutionCon = new Swiper('.iSolutionCon .swiper', {
paginationClickable: true,
effect: 'fade',
speed:800,
loop:false,
pagination: {
el: '.iSolutionCon .swiperDots',
clickable: true,
},
navigation: {
nextEl: '.iSolutionCon .swiperNext',
prevEl: '.iSolutionCon .swiperPrev',
},
on: {
slideChange: function(){
//console.log(this.activeIndex);
$('.iSolutionTab li').eq(this.activeIndex).addClass('curr').siblings().removeClass('curr');
}
}
});
//浜у搧涓庢湇鍔
if($(window).width()>1024) {
var count = $('.iProductList .swiper-slide-three').length;
if (count > 0) {
var count = $('.iProductList .swiper-slide-three').length;
var totalWidth = $('.iProductList .swiper-slide-three').parent('.list')[0].getBoundingClientRect().width;
var activeWidth = totalWidth * 2 / (count + 1)
var itemWidth = (totalWidth - activeWidth) / (count - 1);
$('.iProductList .swiper-slide-three').width(itemWidth);
$('.iProductList .swiper-slide-three').eq(0).width(activeWidth).children('.product').addClass('hover');
}
}
$('.swiperDots').each(function(index, element) {
//console.log($(this).find('span').length)
if($(this).find('span').length <= 1){
$(this).hide();
}
});
var timer22 = 1;
$('.iSolutionTab li').mouseenter(function(){
/*if(timer22 == 1){
clearTimeout(timer22);
timer22 = setTimeout(function () {
var tTop = $('.iSolutionTab').offset().top-$('.iSolutionTab').height()-$('.iMain1 .tit1').height()-80;
$('html,body').animate({scrollTop:tTop},500);
timer22=1;
}, 100);
}*/
$(this).addClass('curr').siblings().removeClass('curr');
$('.iSolutionCon .swiperDots span').eq($(this).index()).click();
});
$('.menu li').mouseover(function(){
// $(this).css("color","red");
// console.log("hover")
// $(this).addClass('active');
});
$('.plex .block').hover(function(){
var index = $(this).index();
console.log(index,"hover")
var lines = $('.plex .line').children();
lines.each(function(i){
if(lines.eq(i).hasClass("line"+index)){
lines.eq(i).addClass("hover");
}
});
$('.plex .component').siblings().removeClass('animation').eq($(this).index()).addClass("animation");
//涓彴
if(index == 0){
$('.plex .models').children('.component').each(function(i){
$('.plex .models').children('.component').eq(i).attr("animation-delay",(0.1*(i+2))+"s").addClass("animation")
});
$('.plex .models').children('.component').eq(0).removeClass("animation").addClass("hover");
}else if(index == 1){
$('.plex .center').children('.component:gt(0)').addClass("animation");
}else if(index ==2){
$('.plex .center').children('.component:gt(0):lt(2)').addClass("animation");
}else{
$('.plex .center').children('.component').addClass("animation");
}
});
$('.plex .block').mouseleave(function(){
$('.plex .component').siblings().removeClass('animation').removeClass("hover");
$('.plex .line').children().each(function(i){
$('.plex .line').children().eq(i).removeClass("hover");
});
console.log("mouseleave")
});
$('.caseNav li').click(function(){
// $(this).css("color","red");
$(this).siblings("li").removeClass("curr");
$(this).addClass("curr");
//鑾峰彇褰撳墠鐨刬d 鏉ユ樉闅愪笅闈㈠垪琛ㄧ殑id
var sid = $(this).attr("id");
$(this).parents(".caseNav").siblings(".caseListC").css("display","none");
console.log($(this).parents(".caseNav").siblings("list"+sid));
$(this).parents(".caseNav").siblings("#list"+sid).css("display","block");
// $(this).addClass('active');
});
$('.menu li .h3 span').click(function(){
if($(this).parents('.h3').next('.box').is(':hidden')){
$(this).addClass('active');
$(this).parents('li').addClass('curr').siblings().removeClass('curr').find('.h3 span').removeClass('active');
$(this).parents('.h3').next(".box").slideDown().parents('li').siblings('li').find('.box').slideUp();
}else{
$(this).removeClass('active');
$(this).parents('.h3').siblings(".box").slideUp();
}
});
/**
* 涓氬姟鍜ㄨ 鍜岀暀瑷€鍜ㄨ
*/
$('.pNav .btn_nav').click(function(){
var t= $(this).attr("title");
$('.zModal .mtitle .intitle').text(t);
$(".zModal").css("display","block");
$(".zfIndex").css("display","block");
// $(".zfIndex").css("op");
});
/**
* 鍦ㄧ嚎鐣欒█
*/
$('.subNav .li0').click(function(){
$('.zModal .mtitle .intitle').text("鍦ㄧ嚎鍜ㄨ");
$.trim($('#content_type').val("鍦ㄧ嚎鍜ㄨ"));
$(".zModal").css("display","block");
$(".zfIndex").css("display","block");
// $(".zfIndex").css("op");
});
/**
* 浜戠洅 鍙傛暟 璇︽儏
*/
$('.pMainUse .pd .btn_params').click(function(){
var t= $(this).attr("title");
var content= $(this).siblings('.btn_content').eq(0).html();
$('.contentModal .mtitle .intitle').text(t);
$('.contentModal .content').html(content);
$(".contentModal").css("display","block");
var height = $(".contentModal .zfIndex").height();
$(".zfIndex").css("display","block");
$(".contentModal .zfIndex").css("margin-top","calc(45vh - "+(height / 2)+"px)");
});
/**
*
*/
$('.pMainUse .btn_nav').click(function(){
var t= $(this).attr("title");
$('.zModal .mtitle .intitle').text(t);
$(".zModal").css("display","block");
$(".zfIndex").css("display","block");
// $(".zfIndex").css("op");
});
/**
* 鏄剧ず瑙嗛
*/
$('.banner__download .banner__download-item').click(function(){
var t= $(this).attr("href");
var type = $(this).attr("type");
var title = $(this).attr("title");
console.log(type)
if(type == 1){
window.open(t);
}else if(type == 10){
$('.videoModal .hr').text(t);
$(".videoModal").css("display","block");
$('.videoModal .mtitle .intitle').text(title);
$(".videoModal video").attr("src",t);
$(".videoModal .zfIndex").css("display","block");
}
});
$('.videoModal .mtitle .close').click(function(){
$(".videoModal").css("display","none");
$(".videoModal .zfIndex").css("display","none");
// $(".zfIndex").css("op");
});
$('.contentModal .close').click(function(){
console.log($(this).attr("title"));
$(".contentModal").css("display","none");
$(".contentModal .zfIndex").css("display","none");
$('.contentModal .content').html("");
// $(".zfIndex").css("op");
});
/**
* 杩涘叆绯荤粺璺宠浆
*/
$('.pNav .ad_system').click(function(){
window.open($(this).attr("target"));
});
$('.zModal .close').click(function(){
console.log($(this).attr("title"));
$(".zModal").css("display","none");
$(".zfIndex").css("display","none");
// $(".zfIndex").css("op");
});
$(".menu dt span").click(function() {
if ($(this).parents('dt').next("dd").is(":hidden")) {
$(this).addClass("active");
$(this).parents('dl').siblings().find('dd').slideUp();
$(this).parents('dt').next("dd").slideDown();
} else {
$(this).removeClass("active");
$(this).parents('dt').next("dd").slideUp();
}
});
$('.show_sq').click(function(event){
event.stopPropagation();
$('.nb-icon-wrap').click();
return false;
});
$('.back_top').click(function(){
$('html,body').animate({scrollTop:0},120);
});
$('.pageNext').click(function(){
$('html,body').animate({scrollTop:$(window).height()},500)
})
function navFix(){
if($('.proInfoTit').length>0){
if($(window).scrollTop()>$('.proInfoTit').offset().top){
$('.proInfoTit').addClass('fix');
}else{
$('.proInfoTit').removeClass('fix');
}
}
}
navFix();
$(window).scroll(function(){
$('.menu-btn,.headBg').removeClass('active');
$('.head').removeClass('headCurr');
bodyFix();
navFix();
});
$(window).resize(function(){
//瑙e喅鏂规鍜屼骇鍝佹湇鍔$殑鐎戝竷娴佽彍鍗
waterFallProduct();
waterFallSolution();
});
$('body').addClass('body_ready');
function bodyFix(){
if($(window).width()>1024){
if($(window).scrollTop()>10){
$('body').addClass('body_fix')
}else{
$('body').removeClass('body_fix')
}
}else{
$('body').removeClass('body_fix')
}
};
bodyFix();
/*if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){
new WOW().init();
};*/
if($(window).width()>1024){
// var shicha = skrollr.init({
// constants: {
// //fill the box for a "duration" of 150% of the viewport (pause for 150%)
// //adjust for shorter/longer pause
// box: '100p'
// }
// });
}
if($('[data-josh-anim-name]').length>0){
var josh = new Josh({
initClass: "[data-josh-anim-name]",
animateInMobile: true,
offset: 0.3,
onDOMChange: true
});
}
});
function toPage(e){
var tTop= $('#toPage'+e).offset().top-$('.proInfoTit').height();
$('html,body').animate({scrollTop:tTop},500);
}
function backTop(){
$('html,body').animate({scrollTop:0},120);
}
function waterFallProduct(){
//1棣栧厛瑕佺‘瀹氬浘鐗囩殑瀹藉害鍜屾粴鍔ㄦ潯鐨勫搴
var pageWidth = $(".menu .pbox")[1].getBoundingClientRect().width *0.7 - 8;
var columns = 3; //杩欓噷鍙互璁剧疆涓哄嚑鍒
var itemWidth = parseInt(pageWidth/columns)-20; //寰楀埌item鐨勫搴
//鎵嬫満绔垯涓嶉噰鐢ㄧ€戝竷娴
if($(window).width()<1024){
$(" .menu .pbox .pd .item").each(function(i){
$(this).css({top:0,
left:0,});
});
return false;
}
$(".menu .pbox .pd .item").width(itemWidth); //璁剧疆鍒癷tem鐨勫搴
var arr =[];
var heights =[];
$(" .menu .pbox .pd .item").each(function(i){
var height = $(this).height();
if(iarr[j]){
minHeight =arr[j];
index=j;
}
}
//4璁剧疆涓嬩竴琛岀殑绗竴涓洅瀛愪綅缃
// top鍊煎氨鏄渶灏忓垪鐨勯珮搴
$(this).css({
top:arr[index]+50, //璁剧疆30鐨勮窛绂
left:$(".menu .pbox .pd .item").eq(index).css("left")
});
//5淇敼鏈€灏忓垪鐨勯珮搴
//鏈€灏忓垪鐨勯珮搴 = 褰撳墠鑷繁鐨勯珮搴 + 鎷兼帴杩囨潵鐨 楂樺害
arr[index]=arr[index]+height+50; //璁剧疆30鐨勮窛绂
}
});
var pdHeight = Math.max.apply(null, arr)+80;
$('.menu .pbox .pd').height(pdHeight>350?pdHeight:350)
}
function waterFallSolution(){
//1棣栧厛瑕佺‘瀹氬浘鐗囩殑瀹藉害鍜屾粴鍔ㄦ潯鐨勫搴 鍑忓幓涓棿绠ご鐨勫搴
var pageWidth = $(".menu .pbox")[0].getBoundingClientRect().width *0.7 - 62 - 8;
var columns = 2; //杩欓噷鍙互璁剧疆涓哄嚑鍒
var itemWidth = parseInt((pageWidth - 30)/columns) - 30 ; //寰楀埌item鐨勫搴
//鎵嬫満绔垯涓嶉噰鐢ㄧ€戝竷娴
if($(window).width()<1024){
$(".menu .pbox .pd_list .solution_t").each(function(i){
console.log($(this))
$(this).css({top:0,left:20});
});
return false;
}
console.log("item width ",pageWidth/2);
$(".menu .pbox .pd_list .solution_t").width(itemWidth); //璁剧疆鍒癷tem鐨勫搴
var arr =[];
var heights =[];
$(" .menu .pbox .pd_list .solution_t").each(function(i){
var height = $(this).height();
// console.log(height);
if(iarr[j]){
minHeight =arr[j];
index=j;
}
}
//4璁剧疆涓嬩竴琛岀殑绗竴涓洅瀛愪綅缃
// top鍊煎氨鏄渶灏忓垪鐨勯珮搴
$(this).css({
top:arr[index]+95, //璁剧疆30鐨勮窛绂
left:$(".menu .pbox .pd_list .solution_t").eq(index).css("left")
});
//5淇敼鏈€灏忓垪鐨勯珮搴
//鏈€灏忓垪鐨勯珮搴 = 褰撳墠鑷繁鐨勯珮搴 + 鎷兼帴杩囨潵鐨 楂樺害
arr[index]=arr[index]+height+50; //璁剧疆30鐨勮窛绂
}
});
var pdHeight = Math.max.apply(null, arr)+80;
var leftHeight = $('.menu .pbox').eq(0).children('.pd_left').height();
var targetHeight = pdHeight>leftHeight?pdHeight:leftHeight;
console.log(targetHeight,"solHeight");
$('.menu .pbox .pd_list').height(targetHeight)
$('.menu .pbox .pd_center').height(targetHeight)
}
var curSolNav = 0;
var initNav = true;
function slideNav(){
if($('.pMain_imotor .solNav li').length>0){
if(initNav){
$('.pMain_imotor .solNav li').eq(0).click();
initNav = false;
}
}
var lis = $('.pMain_sol .solNav li');
if (lis.length>0){
return setInterval(function () {
console.log(curSolNav,"curSolNav")
$('.pMain_sol .solNav li').eq(curSolNav).click();
curSolNav++;
if(curSolNav>lis.length) curSolNav = 0;
}, 3000);
}
}
/**
* start:璧峰鏁版嵁
* end:鏈€缁堟暟鎹
* time:鍔ㄧ敾鏃堕棿
* */
var numTimer = [];
function jumpNumber(start, end, time,dom,index) {
console.log(dom)
this.num = start
let endNum = end
let lastNum = '' //灏忔暟
let digit = 0 //灏忔暟浣嶆暟
let step = 0 //绱姞姝ラ暱
const len = parseInt(end).toString().length
dom.text(this.num);
//鍒ゆ柇鏄皬鏁
if(parseInt(end) !== end) {
endNum = parseInt(end)
lastNum = end.toString().split('.')[1]
digit = lastNum.length
}
let timer = setInterval(() => {
var num = dom.text() - 0;
if(num < (endNum - step)) {
step++
//灏忔暟
let point = this.getRandomNum(digit)
//鏁版嵁杩囧ぇ锛屽悗闈㈠嚑浣嶆暟闅忔満璺冲姩
if(len >= 6) {
let bigNumber = this.getRandomNum(len - 3)
const leng = parseInt(start).toString().length
const length = leng - bigNumber.length
//鎴彇宀侀殢鏈烘暟鍓嶉潰鐨勬暟
const cur = length <= 0 ? parseInt(start) : parseInt(start.toString().slice(0, length))
start = cur + step + bigNumber + '.' + point
} else {
start = parseInt(start) + step + '.' + point
}
dom.text(parseFloat(start));
} else {
clearInterval(this.numTimer[index])
dom.text(parseFloat(endNum));
// this.numTimer = this.numTimer.slice(index,1);
// num = end
}
}, time)
this.numTimer[index] = timer;
};
function getRandomNum(len) {
let point = ''
for(let i = 1; i <= len; i++) {
point = point + parseInt(Math.random() * 10)
}
return point;
}