1var windowWidth,windowHeight; 2var ismobistaute = false; 3var isFirst = true; 4 5/* (function (doc, win) { 6 var docEl = doc.documentElement, 7 resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize', 8 recalc = function () { 9 var clientWidth = docEl.clientWidth; 10 if (!clientWidth) return; 11 if (clientWidth >= 750) { 12 docEl.style.fontSize = '100px'; 13 } else { 14 docEl.style.fontSize = 100 * (clientWidth / 750) + 'px'; 15 } 16 }; 17 if (!doc.addEventListener) return; 18 win.addEventListener(resizeEvt, recalc, false); 19 doc.addEventListener('DOMContentLoaded', recalc, false); 20})(document, window); */ 21 22 23function htmlSize() { 24 var htnl_o = document.getElementsByTagName("html")[0]; 25 var fts = 100; 26 const htmlWidth = document.body && document.body.offsetWidth; 27 28 var htmlsize = 1920; 29 if (navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/Symbian/i) || navigator.userAgent.match(/Windows Phone/i)) { 30 htmlsize = 750; 31 } 32 33 let fs = Math.ceil(htmlWidth ? (htmlWidth / htmlsize * fts) : fts); 34 35 htnl_o.style.fontSize = fs + "px"; 36 37} 38 39$(function(){ 40 41 htmlSize(); 42 window.onresize = function () { 43 htmlSize(); 44 } 45 46 getWindowSize(); 47 48 //è§é¢å¼¹æ¡ 49 Videoplay(); 50 51 $(window).on('resize', function() { 52 getWindowSize(); 53 54 }); 55 56 $(".side-suspension li.consulting").click(function(){ 57 if($(this).hasClass("active")){ 58 $(this).removeClass("active"); 59 $(this).find(".hidden-box").fadeOut(300); 60 }else{ 61 $(this).addClass("active"); 62 $(this).find(".hidden-box").fadeIn(300); 63 } 64 }) 65 66 if($(".banner-label .timer").length > 0){ 67 //console.log(1) 68 if(isFirst){ 69 $('.banner-label .timer').each(count); 70 isFirst = false; 71 } 72 } 73 74 $(".js-m").bind("inview", function (event, visible, topOrBottomOrBoth) { 75 if (visible == true) { // å ç´ å¨çªå£ä¸å¯è§ 76 $(this).addClass("animate"); 77 if($(this).find(".timer").length > 0){ 78 //console.log(1) 79 //if(isFirst){ 80 $('.timer').each(count); 81 //isFirst = false; 82 //} 83 } 84 }else{ 85 //$(this).removeClass("animate"); 86 } 87 88 }); 89 90 var _headerHeight = $(".header-main").height(); 91 if ($(window).scrollTop() > _headerHeight) { 92 $(".header-main").addClass('header-main-active'); 93 } else { 94 $(".header-main").removeClass('header-main-active'); 95 } 96 $(window).bind('scroll', function () { 97 var _headerHeight = $(".header-main").height(); 98 if ($(window).scrollTop() > _headerHeight) { 99 $(".header-main").addClass('header-main-active'); 100 } else { 101 $(".header-main").removeClass('header-main-active'); 102 } 103 }) 104 105 $(".header-main .icon-menu").click(function(){ 106 if($(this).hasClass("active")){ 107 $(this).removeClass("active"); 108 $("body").removeClass("body-hidden"); 109 $(".header-main").removeClass("active"); 110 $(".menu-layer").fadeOut(300); 111 }else{ 112 $(this).addClass("active"); 113 $("body").addClass("body-hidden"); 114 $(".header-main").addClass("active"); 115 $(".menu-layer").fadeIn(300); 116 } 117 }) 118 119 $(".menu-layer .menu-nav li.hover").click(function(){ 120 $(this).siblings("li").removeClass("active"); 121 $(this).addClass("active"); 122 var _hoverMenu = $(this).attr("data-menu"); 123 //console.log(_hoverMenu) 124 $(".menu-nav-side").each(function(){ 125 var _this = $(this); 126 console.log(_hoverMenu) 127 if(_this.attr("data-menu") == _hoverMenu){ 128 _this.siblings(".menu-nav-side").hide(); 129 _this.show(); 130 _this.siblings(".menu-nav-side").find(".side-item .side-title.title-hover").removeClass("active"); 131 _this.siblings(".menu-nav-side").find(".side-item .side-cont").hide(); 132 } 133 }) 134 }) 135 136 $(".menu-nav-side .side-item .side-title.title-hover").click(function(){ 137 if($(this).hasClass("active")){ 138 $(this).removeClass("active"); 139 $(this).parents(".side-item").find(".side-cont").hide(); 140 }else{ 141 $(this).parents(".side-item").siblings().find(".title-hover").removeClass("active"); 142 $(this).addClass("active"); 143 $(this).parents(".side-item").siblings().find(".side-cont").hide(); 144 $(this).parents(".side-item").find(".side-cont").show(); 145 } 146 $(".menu-layer .menu-subnav-right").animate({scrollTop:0},100); 147 }) 148 149 var _currentPageMenu = $(".menu-layer .menu-nav li.hover.active").attr("data-menu"); 150 $(".menu-nav-side").each(function(){ 151 var _this = $(this); 152 //console.log(_currentPageMenu) 153 if(_this.attr("data-menu") == _currentPageMenu){ 154 _this.siblings(".menu-nav-side").hide(); 155 _this.show(); 156 } 157 }) 158 159 160 161 $(".header-main .nav li.hover").mouseenter(function(){ 162 var _hoverMenu = $(this).attr("data-menu"); 163 $(".header-nav-hidden-box").show(); 164 165 $(".one-nav-side").each(function(){ 166 var _this = $(this); 167 //console.log(_hoverMenu) 168 if(_this.attr("data-menu") == _hoverMenu){ 169 _this.siblings(".one-nav-side").hide(); 170 _this.show(); 171 _this.find(".subnav-left-box li").removeClass("active"); 172 _this.find(".subnav-right-box .two-nav-side-box").hide(); 173 _this.find(".subnav-left-box li").eq(0).addClass("active"); 174 _this.find(".subnav-right-box .two-nav-side-box").eq(0).show(); 175 } 176 }) 177 }) 178 179 $(".header-nav-hidden-box").hover(function(){ 180 $(this).show(); 181 },function(){ 182 $(this).hide(); 183 }) 184 $(".header-main .nav li.hover").mouseleave(function(){ 185 $(".header-nav-hidden-box").hide(); 186 }) 187 188 $(".header-nav-hidden-box .subnav-left-box li").mouseenter(function(){ 189 var _index = $(this).index(); 190 $(this).addClass("active").siblings().removeClass("active"); 191 $(this).parents(".one-nav-side").find(".subnav-right-box .two-nav-side-box").eq(_index).show().siblings().hide(); 192 }) 193 194 $(".header-nav-hidden-box .one-nav-side").mouseenter(function(){ 195 var _hoverMenu = $(this).attr("data-menu"); 196 $(".header-main .nav li").each(function(){ 197 var _this = $(this); 198 //console.log(_hoverMenu) 199 if(_this.attr("data-menu") == _hoverMenu){ 200 _this.addClass("temporary-active") 201 } 202 }) 203 }) 204 $(".header-nav-hidden-box .one-nav-side").mouseleave(function(){ 205 var _hoverMenu = $(this).attr("data-menu"); 206 $(".header-main .nav li").each(function(){ 207 var _this = $(this); 208 //console.log(_hoverMenu) 209 if(_this.attr("data-menu") == _hoverMenu){ 210 _this.removeClass("temporary-active") 211 } 212 }) 213 }) 214 215 $(".header-nav-hidden-box .one-nav-side .subnav-right-box .two-nav-side li .three-nav-side-ul .ul-title span").click(function(){ 216 if($(this).hasClass("active")){ 217 $(this).removeClass("active"); 218 $(this).parents(".three-nav-side-ul").find("dl").hide(); 219 }else{ 220 $(this).addClass("active"); 221 $(this).parents(".three-nav-side-ul").find("dl").show(); 222 } 223 }) 224 225 226 var _homeBannerTotal = $(".home-banner .swiper-slide").length; 227 if(_homeBannerTotal > 1){ 228 var homeBannerSwiper = new Swiper(".home-banner .swiper-container", { 229 autoplay: { 230 delay: 5000, 231 disableOnInteraction: false, 232 }, 233 loop: true, 234 pagination: { 235 el: ".home-banner .swiper-pagination", 236 clickable: true, 237 }, 238 on:{ 239 init: function(){ 240 swiperAnimateCache(this); //éèå¨ç»å ç´ 241 swiperAnimate(this); //åå§å宿å¼å§å¨ç» 242 }, 243 slideChangeTransitionEnd: function(){ 244 swiperAnimate(this); //æ¯ä¸ªslideåæ¢ç»ææ¶ä¹è¿è¡å½åslideå¨ç» 245 //this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); å¨ç»åªå±ç°ä¸æ¬¡ï¼å»é¤aniç±»å 246 } 247 } 248 }); 249 250 homeBannerSwiper.el.onmouseover = function(){ 251 homeBannerSwiper.autoplay.stop(); 252 } 253 homeBannerSwiper.el.onmouseout = function(){ 254 homeBannerSwiper.autoplay.start(); 255 } 256 } 257 258 259 260 261 262 263 264 var kuntaiSwiper = new Swiper('.kuntai-swiper .swiper-container', { 265 autoplay: { 266 delay: 2000, 267 disableOnInteraction: false, 268 }, 269 loop: true, 270 /* loopedSlides: 8, 271 loopAdditionalSlides: 3, */ 272 //direction: 'rtl', // 设置为ä»å³åå·¦ 273 //initialSlide: 3, 274 slidesPerView: "auto", 275 //speed:1000, 276 centeredSlides: true, 277 roundLengths : true, 278 updateOnWindowResize: true, 279 //noSwiping: true, 280 navigation: { 281 nextEl: ".kuntai-swiper-container .swiper-arrow-next", 282 prevEl: ".kuntai-swiper-container .swiper-arrow-prev", 283 }, 284 pagination: { 285 el: ".kuntai-swiper-container .swiper-pagination", 286 type: 'fraction', 287 }, 288 on:{ 289 init: function(swiper){ 290 $(".kuntai-swiper-cont .box").hide(); 291 $(".kuntai-swiper-cont .box").eq(0).show(); 292 }, 293 slideChange: function(){ 294 $(".kuntai-swiper-cont .box").hide(); 295 $(".kuntai-swiper-cont .box").eq(this.realIndex).show(); 296 }, 297 }, 298 }) 299 300 $(".kuntai-swiper-container").hover(function(){ 301 kuntaiSwiper.autoplay.stop(); 302 },function(){ 303 kuntaiSwiper.autoplay.start(); 304 }) 305 306 307 if($(".sub-tabs-container-kuntai").length > 0){ 308 var _subTabsContainerTop = $(".sub-tabs-container-kuntai").offset().top - $(".sub-tabs-container-kuntai").height() / 3; 309 var _subTabsContainerHeight = $(".sub-tabs-container-kuntai").height(); 310 $(window).scroll(function() { 311 var windowScrollTop = $(window).scrollTop(); 312 var headerHeight = $(".header-main").height(); 313 if(windowScrollTop >= _subTabsContainerTop - headerHeight){ 314 //console.log(0) 315 $(".sub-tabs-container-kuntai").addClass("fixed"); 316 $(".sub-tabs-container-height").show(); 317 }else{ 318 //console.log(1) 319 $(".sub-tabs-container-kuntai").removeClass("fixed"); 320 $(".sub-tabs-container-height").hide(); 321 } 322 323 // è·åææçclick-scrollå ç´ ï¼å¹¶æç §tabliåé¢çæ°åæåº 324 var scrollElements = $(".click-scroll").filter(function() { 325 var dataScroll = $(this).attr("data-scroll"); 326 return dataScroll && dataScroll.match(/^tabli\d+$/); 327 }).sort(function(a, b) { 328 var numA = parseInt($(a).attr("data-scroll").replace("tabli", "")); 329 var numB = parseInt($(b).attr("data-scroll").replace("tabli", "")); 330 return numA - numB; 331 }); 332 333 // 妿æscrollå ç´ ï¼å¤çæ»å¨é»è¾ 334 if (scrollElements.length > 0) { 335 // æ¸ é¤ææactiveç¶æ 336 $(".sub-tabs-container-kuntai li .block-box").removeClass("active"); 337 338 // æ¾å°å½ååºè¯¥æ¿æ´»çtab 339 var activeIndex = -1; 340 var lastPosition = -Infinity; 341 342 scrollElements.each(function(index) { 343 var element = $(this); 344 var position = element.offset().top - _subTabsContainerHeight - 10; 345 346 if (windowScrollTop >= position && position > lastPosition) { 347 activeIndex = index; 348 lastPosition = position; 349 } 350 }); 351 352 // 妿æ¾å°äºå¯¹åºçå ç´ ï¼è®¾ç½®activeç¶æ 353 if (activeIndex !== -1) { 354 $(".sub-tabs-container-kuntai li").eq(activeIndex).find(".block-box").addClass("active"); 355 } 356 } 357 358 }) 359 360 $(".sub-tabs-container-kuntai li .block-box").click(function(){ 361 var _click = $(this).attr("data-click"); 362 $(".click-scroll").each(function(){ 363 var _this = $(this); 364 if(_this.attr("data-scroll") == _click){ 365 var _clickScrollTop = _this.offset().top; 366 $('body,html').animate({scrollTop:_clickScrollTop - _subTabsContainerHeight},100); 367 } 368 }) 369 }) 370 } 371 372 if($(".sub-tabs-container-ai").length > 0){ 373 var _subTabsContainerTop = $(".sub-tabs-container-ai").offset().top - $(".sub-tabs-container-ai").height() / 3; 374 var _subTabsContainerHeight = $(".sub-tabs-container-ai").height(); 375 $(window).scroll(function() { 376 var windowScrollTop = $(window).scrollTop(); 377 var headerHeight = $(".header-main").height(); 378 if(windowScrollTop >= _subTabsContainerTop - headerHeight){ 379 //console.log(0) 380 $(".sub-tabs-container-ai").addClass("fixed"); 381 $(".sub-tabs-container-height").show(); 382 }else{ 383 //console.log(1) 384 $(".sub-tabs-container-ai").removeClass("fixed"); 385 $(".sub-tabs-container-height").hide(); 386 } 387 388 // è·åææçclick-scrollå ç´ ï¼å¹¶æç §tabliåé¢çæ°åæåº 389 var scrollElements = $(".click-scroll").filter(function() { 390 var dataScroll = $(this).attr("data-scroll"); 391 return dataScroll && dataScroll.match(/^tabli\d+$/); 392 }).sort(function(a, b) { 393 var numA = parseInt($(a).attr("data-scroll").replace("tabli", "")); 394 var numB = parseInt($(b).attr("data-scroll").replace("tabli", "")); 395 return numA - numB; 396 }); 397 398 // 妿æscrollå ç´ ï¼å¤çæ»å¨é»è¾ 399 if (scrollElements.length > 0) { 400 // æ¸ é¤ææactiveç¶æ 401 $(".sub-tabs-container-ai li .block-box").removeClass("active"); 402 403 // æ¾å°å½ååºè¯¥æ¿æ´»çtab 404 var activeIndex = -1; 405 var lastPosition = -Infinity; 406 407 scrollElements.each(function(index) { 408 var element = $(this); 409 var position = element.offset().top - _subTabsContainerHeight - 10; 410 411 if (windowScrollTop >= position && position > lastPosition) { 412 activeIndex = index; 413 lastPosition = position; 414 } 415 }); 416 417 // 妿æ¾å°äºå¯¹åºçå ç´ ï¼è®¾ç½®activeç¶æ 418 if (activeIndex !== -1) { 419 $(".sub-tabs-container-ai li").eq(activeIndex).find(".block-box").addClass("active"); 420 } 421 } 422 423 }) 424 425 $(".sub-tabs-container-ai li .block-box").click(function(){ 426 var _click = $(this).attr("data-click"); 427 $(".click-scroll").each(function(){ 428 var _this = $(this); 429 if(_this.attr("data-scroll") == _click){ 430 var _clickScrollTop = _this.offset().top; 431 $('body,html').animate({scrollTop:_clickScrollTop - _subTabsContainerHeight},100); 432 } 433 }) 434 }) 435 } 436 437 /* if($(".kuntai-product-mainimg-container").length > 0){ 438 var _kuntaiProductMainimgTop = $(".kuntai-product-mainimg-container").offset().top; 439 var _kuntaiProductMainimgHeight = $(".kuntai-product-mainimg-container").height(); 440 $(window).scroll(function() { 441 _kuntaiProductMainimgTop = $(".kuntai-product-mainimg-container").offset().top; 442 _kuntaiProductMainimgHeight = $(".kuntai-product-mainimg-container").height(); 443 var windowScrollTop = $(window).scrollTop(); 444 var scaleValue; 445 446 // 计ç®ys1çscaleå¼ 447 // å设æä»¬å¸æå¨æ»å¨æ¡å°è¾¾div1é¡¶é¨å200pxå°div1åºé¨å200pxçèå´å è°æ´scale 448 if (windowScrollTop > _kuntaiProductMainimgTop - _kuntaiProductMainimgHeight - windowHeight && windowScrollTop < _kuntaiProductMainimgTop + _kuntaiProductMainimgHeight + windowHeight) { 449 // 计ç®scaleå¼ä»1å°0.4çæ¸å 450 var progress = (windowScrollTop - (_kuntaiProductMainimgTop - windowHeight)) / (_kuntaiProductMainimgHeight); // 400æ¯è·ç¦»èå´ï¼200pxä¸ + 200pxä¸ï¼ 451 scaleValue = 1 - progress * 0.5; // ä»1éåå°0.4 452 scaleValue = Math.max(scaleValue, 0.5); // ç¡®ä¿scaleå¼ä¸ä¼å°äº0.4 453 } else { 454 //scaleValue = 1; // 妿ä¸å¨æå®èå´å ï¼åscaleå¼ä¸º1 455 } 456 457 $('.kuntai-product-mainimg-container .title').css('transform', 'scale(' + scaleValue + ')'); 458 }); 459 } 460 461 if($(".ai-product-mainimg-container1").length > 0){ 462 var _aiProductMainimgTop1 = $(".ai-product-mainimg-container1").offset().top; 463 var _aiProductMainimgHeight1 = $(".ai-product-mainimg-container1").height(); 464 $(window).scroll(function() { 465 _aiProductMainimgTop1 = $(".ai-product-mainimg-container1").offset().top; 466 _aiProductMainimgHeight1 = $(".ai-product-mainimg-container1").height(); 467 var windowScrollTop = $(window).scrollTop(); 468 var scaleValue; 469 470 // 计ç®ys1çscaleå¼ 471 // å设æä»¬å¸æå¨æ»å¨æ¡å°è¾¾div1é¡¶é¨å200pxå°div1åºé¨å200pxçèå´å è°æ´scale 472 if (windowScrollTop > _aiProductMainimgTop1 - _aiProductMainimgHeight1 - windowHeight && windowScrollTop < _aiProductMainimgTop1 + _aiProductMainimgHeight1 + windowH
472eight) { 473 // 计ç®scaleå¼ä»1å°0.4çæ¸å 474 var progress = (windowScrollTop - (_aiProductMainimgTop1 - windowHeight)) / (_aiProductMainimgHeight1); // 400æ¯è·ç¦»èå´ï¼200pxä¸ + 200pxä¸ï¼ 475 scaleValue = 1 - progress * 0.5; // ä»1éåå°0.4 476 scaleValue = Math.max(scaleValue, 0.5); // ç¡®ä¿scaleå¼ä¸ä¼å°äº0.4 477 } else { 478 //scaleValue = 1; // 妿ä¸å¨æå®èå´å ï¼åscaleå¼ä¸º1 479 } 480 481 $('.ai-product-mainimg-container1 .title').css('transform', 'scale(' + scaleValue + ')'); 482 }); 483 } 484 485 if($(".ai-product-mainimg-container2").length > 0){ 486 var _aiProductMainimgTop2 = $(".ai-product-mainimg-container2").offset().top; 487 var _aiProductMainimgHeight2 = $(".ai-product-mainimg-container2").height(); 488 $(window).scroll(function() { 489 _aiProductMainimgTop2 = $(".ai-product-mainimg-container2").offset().top; 490 _aiProductMainimgHeight2 = $(".ai-product-mainimg-container2").height(); 491 var windowScrollTop = $(window).scrollTop(); 492 var scaleValue; 493 494 // 计ç®ys1çscaleå¼ 495 // å设æä»¬å¸æå¨æ»å¨æ¡å°è¾¾div1é¡¶é¨å200pxå°div1åºé¨å200pxçèå´å è°æ´scale 496 if (windowScrollTop > _aiProductMainimgTop2 - _aiProductMainimgHeight2 - windowHeight && windowScrollTop < _aiProductMainimgTop2 + _aiProductMainimgHeight2 + windowHeight) { 497 // 计ç®scaleå¼ä»1å°0.4çæ¸å 498 var progress = (windowScrollTop - (_aiProductMainimgTop2 - windowHeight)) / (_aiProductMainimgHeight2); // 400æ¯è·ç¦»èå´ï¼200pxä¸ + 200pxä¸ï¼ 499 scaleValue = 1 - progress * 0.5; // ä»1éåå°0.4 500 scaleValue = Math.max(scaleValue, 0.5); // ç¡®ä¿scaleå¼ä¸ä¼å°äº0.4 501 } else { 502 //scaleValue = 1; // 妿ä¸å¨æå®èå´å ï¼åscaleå¼ä¸º1 503 } 504 505 $('.ai-product-mainimg-container2 .title').css('transform', 'scale(' + scaleValue + ')'); 506 }); 507 } 508 509 if($(".ai-product-mainimg-container3").length > 0){ 510 var _aiProductMainimgTop3 = $(".ai-product-mainimg-container3").offset().top; 511 var _aiProductMainimgHeight3 = $(".ai-product-mainimg-container3").height(); 512 $(window).scroll(function() { 513 _aiProductMainimgTop3 = $(".ai-product-mainimg-container3").offset().top; 514 _aiProductMainimgHeight3 = $(".ai-product-mainimg-container3").height(); 515 var windowScrollTop = $(window).scrollTop(); 516 var scaleValue; 517 518 // 计ç®ys1çscaleå¼ 519 // å设æä»¬å¸æå¨æ»å¨æ¡å°è¾¾div1é¡¶é¨å200pxå°div1åºé¨å200pxçèå´å è°æ´scale 520 if (windowScrollTop > _aiProductMainimgTop3 - _aiProductMainimgHeight3 - windowHeight && windowScrollTop < _aiProductMainimgTop3 + _aiProductMainimgHeight3 + windowHeight) { 521 // 计ç®scaleå¼ä»1å°0.4çæ¸å 522 var progress = (windowScrollTop - (_aiProductMainimgTop3 - windowHeight)) / (_aiProductMainimgHeight3); // 400æ¯è·ç¦»èå´ï¼200pxä¸ + 200pxä¸ï¼ 523 scaleValue = 1 - progress * 0.5; // ä»1éåå°0.4 524 scaleValue = Math.max(scaleValue, 0.5); // ç¡®ä¿scaleå¼ä¸ä¼å°äº0.4 525 } else { 526 //scaleValue = 1; // 妿ä¸å¨æå®èå´å ï¼åscaleå¼ä¸º1 527 } 528 529 $('.ai-product-mainimg-container3 .title').css('transform', 'scale(' + scaleValue + ')'); 530 }); 531 } */ 532 533 if($(".product-advantages-section").length > 0){ 534 var _productAdvantagesSectionTop = $(".product-advantages-section").offset().top; 535 var _productAdvantagesSectionHeight = $(".product-advantages-section").height() / 5; 536 var _pageTotal = $(".product-advantages-sticky .cont-inner .box").length; 537 //console.log(_pageTotal) 538 $(".product-advantages-page .total").text(_pageTotal); 539 540 productAdvantages(); 541 542 $(window).scroll(function() { 543 productAdvantages(); 544 }); 545 546 } 547 548 if($(".applicable-scenarios-section1 .applicable-scenarios-tabs").length > 0){ 549 var applicableScenariosTabsSwiper1 = new Swiper(".applicable-scenarios-section1 .applicable-scenarios-tabs .swiper-container", { 550 //loop: true, 551 //spaceBetween: 10, 552 slidesPerView: 4, 553 freeMode: true, 554 watchSlidesProgress: true, 555 navigation: { 556 nextEl: ".applicable-scenarios-section1 .applicable-scenarios-tabs .swiper-arrow-next", 557 prevEl: ".applicable-scenarios-section1 .applicable-scenarios-tabs .swiper-arrow-prev", 558 }, 559 }); 560 561 var applicableScenariosSwiper1 = new Swiper('.applicable-scenarios-section1 .applicable-scenarios-swiper .swiper-container', { 562 autoplay: { 563 delay: 2000, 564 disableOnInteraction: false, 565 }, 566 loop: true, 567 slidesPerView: "auto", 568 //speed:1000, 569 centeredSlides: true, 570 speed: 600,
571 //roundLengths : true, 572 //updateOnWindowResize: true, 573 navigation: { 574 nextEl: ".applicable-scenarios-section1 .applicable-scenarios-swiper-container .swiper-arrow-next", 575 prevEl: ".applicable-scenarios-section1 .applicable-scenarios-swiper-container .swiper-arrow-prev", 576 }, 577 pagination: { 578 el: ".applicable-scenarios-section1 .applicable-scenarios-swiper-container .swiper-pagination", 579 type: 'fraction', 580 }, 581 on:{ 582 init: function(swiper){ 583 $(".applicable-scenarios-section1 .applicable-scenarios-swiper-cont .box").hide(); 584 $(".applicable-scenarios-section1 .applicable-scenarios-swiper-cont .box").eq(0).show(); 585 $(".applicable-scenarios-section1 .applicable-scenarios-tabs li").removeClass("active"); 586 $(".applicable-scenarios-section1 .applicable-scenarios-tabs li").eq(0).addClass("active"); 587 588 }, 589 slideChange: function(){ 590 $(".applicable-scenarios-section1 .applicable-scenarios-swiper-cont .box").hide(); 591 $(".applicable-scenarios-section1 .applicable-scenarios-swiper-cont .box").eq(this.realIndex).show(); 592 $(".applicable-scenarios-section1 .applicable-scenarios-tabs li").removeClass("active"); 593 $(".applicable-scenarios-section1 .applicable-scenarios-tabs li").eq(this.realIndex).addClass("active"); 594 595 }, 596 }, 597 thumbs: { 598 swiper: applicableScenariosTabsSwiper1, 599 }, 600 }) 601 }else{ 602 var applicableScenariosSwiper1 = new Swiper('.applicable-scenarios-section1 .applicable-scenarios-swiper .swiper-container', { 603 autoplay: { 604 delay: 2000, 605 disableOnInteraction: false, 606 }, 607 loop: true, 608 slidesPerView: "auto", 609 //speed:1000, 610 centeredSlides: true, 611 speed: 600, 612 //roundLengths : true, 613 //updateOnWindowResize: true, 614 navigation: { 615 nextEl: ".applicable-scenarios-section1 .applicable-scenarios-swiper-container .swiper-arrow-next", 616 prevEl: ".applicable-scenarios-section1 .applicable-scenarios-swiper-container .swiper-arrow-prev", 617 }, 618 pagination: { 619 el: ".applicable-scenarios-section1 .applicable-scenarios-swiper-container .swiper-pagination", 620 type: 'fraction', 621 }, 622 on:{ 623 init: function(swiper){ 624 $(".applicable-scenarios-section1 .applicable-scenarios-swiper-cont .box").hide(); 625 $(".applicable-scenarios-section1 .applicable-scenarios-swiper-cont .box").eq(0).show(); 626 $(".applicable-scenarios-section1 .applicable-scenarios-tabs li").removeClass("active"); 627 $(".applicable-scenarios-section1 .applicable-scenarios-tabs li").eq(0).addClass("active"); 628 629 }, 630 slideChange: function(){ 631 $(".applicable-scenarios-section1 .applicable-scenarios-swiper-cont .box").hide(); 632 $(".applicable-scenarios-section1 .applicable-scenarios-swiper-cont .box").eq(this.realIndex).show(); 633 $(".applicable-scenarios-section1 .applicable-scenarios-tabs li").removeClass("active"); 634 $(".applicable-scenarios-section1 .applicable-scenarios-tabs li").eq(this.realIndex).addClass("active"); 635 636 }, 637 }, 638 }) 639 } 640 641 642 643 if($(".applicable-scenarios-section1 .applicable-scenarios-swiper").length > 0){ 644 $(".applicable-scenarios-section1 .applicable-scenarios-inner").hover(function(){ 645 applicableScenariosSwiper1.autoplay.stop(); 646 },function(){ 647 applicableScenariosSwiper1.autoplay.start(); 648 }) 649 } 650 651 652 var applicableScenariosSwiper2 = new Swiper('.applicable-scenarios-section2 .applicable-scenarios-swiper .swiper-container', { 653 autoplay: { 654 delay: 2000, 655 disableOnInteraction: false, 656 }, 657 loop: true, 658 slidesPerView: "auto", 659 //speed:1000, 660 centeredSlides: true, 661 speed: 600, 662 //roundLengths : true, 663 //updateOnWindowResize: true, 664 navigation: { 665 nextEl: ".applicable-scenarios-section2 .applicable-scenarios-swiper-container .swiper-arrow-next", 666 prevEl: ".applicable-scenarios-section2 .applicable-scenarios-swiper-container .swiper-arrow-prev", 667 }, 668 pagination: { 669 el: ".applicable-scenarios-section2 .applicable-scenarios-swiper-container .swiper-pagination", 670 type: 'fraction', 671 }, 672 on:{ 673 init: function(swiper){ 674 $(".applicable-scenarios-section2 .applicable-scenarios-swiper-cont .box").hide(); 675 $(".applicable-scenarios-section2 .applicable-scenarios-swiper-cont .box").eq(0).show(); 676 $(".applicable-scenarios-section2 .applicable-scenarios-tabs li").removeClass("active"); 677 $(".applicable-scenarios-section2 .applicable-scenarios-tabs li").eq(0).addClass("active"); 678 }, 679 slideChange: function(){ 680 $(".applicable-scenarios-section2 .applicable-scenarios-swiper-cont .box").hide(); 681 $(".applicable-scenarios-section2 .applicable-scenarios-swiper-cont .box").eq(this.realIndex).show(); 682 $(".applicable-scenarios-section2 .applicable-scenarios-tabs li").removeClass("active"); 683 $(".applicable-scenarios-section2 .applicable-scenarios-tabs li").eq(this.realIndex).addClass("active"); 684 }, 685 }, 686 }) 687 688 $(".applicable-scenarios-section2 .applicable-scenarios-tabs li .title").click(function(){ 689 var _index = $(this).parents("li").index(); 690 applicableScenariosSwiper2.slideToLoop(_index, 1000, false); 691 }) 692 693 $(".applicable-scenarios-section2 .applicable-scenarios-inner").hover(function(){ 694 applicableScenariosSwiper2.autoplay.stop(); 695 },function(){ 696 applicableScenariosSwiper2.autoplay.start(); 697 }) 698 699 var activitySwiper = new Swiper(".activity-swiper .swiper-container", { 700 loop: true, 701 pagination: { 702 el: ".activity-swiper .swiper-pagination", 703 type: "fraction", 704 }, 705 navigation: { 706 nextEl: ".activity-swiper .swiper-arrow-next", 707 prevEl: ".activity-swiper .swiper-arrow-prev", 708 }, 709 on:{ 710 init: function(swiper){ 711 $(".activity-title-box li").removeClass("active"); 712 $(".activity-title-box li").eq(0).addClass("active"); 713 }, 714 slideChange: function(){ 715 $(".activity-title-box li").removeClass("active"); 716 $(".activity-title-box li").eq(this.realIndex).addClass("active"); 717 }, 718 }, 719 }); 720 721 $(".activity-title-box li .block-box").click(function(){ 722 var _index = $(this).parents("li").index(); 723 activitySwiper.slideToLoop(_index, 300, false); 724 }) 725 726 $(".year-switch .title").click(function(){ 727 if($(this).parents(".year-switch").hasClass("active")){ 728 $(this).parents(".year-switch").removeClass("active"); 729 }else{ 730 $(this).parents(".year-switch").addClass("active"); 731 } 732 }) 733 $(".year-switch .hidden-box li").click(function(){ 734 var _text = $(this).text(); 735 $(this).parents(".year-switch").removeClass("active"); 736 $(this).parents(".year-switch").find(".title a").text(_text); 737 }) 738 739 $(document).bind("click",function(e){ 740 var target = $(e.target); 741 if(target.closest(".year-switch").length == 0){ 742 $(".year-switch").removeClass("active"); 743 } 744 }) 745 746 var jjfaSwiper = new Swiper(".jjfa-swiper .swiper-container", { 747 pagination: { 748 el: ".jjfa-swiper .swiper-pagination", 749 }, 750 }); 751 752 var applicableScenariosSwiperHorizontal = new Swiper('.applicable-scenarios-section-horizontal .applicable-scenarios-swiper-horizontal .swiper-container', { 753 autoplay: { 754 delay: 2000, 755 disableOnInteraction: false, 756 }, 757 loop: true, 758 spaceBetween: 30, 759 navigation: { 760 nextEl: ".applicable-scenarios-section-horizontal .applicable-scenarios-swiper-container .swiper-arrow-next", 761 prevEl: ".applicable-scenarios-section-horizontal .applicable-scenarios-swiper-container .swiper-arrow-prev", 762 }, 763 pagination: { 764 el: ".applicable-scenarios-section-horizontal .applicable-scenarios-swiper-container .swiper-pagination", 765 type: 'fraction', 766 }, 767 on:{ 768 init: function(swiper){ 769 $(".applicable-scenarios-section-horizontal .applicable-scenarios-swiper-cont-horizontal .box").hide(); 770 $(".applicable-scenarios-section-horizontal .applicable-scenarios-swiper-cont-horizontal .box").eq(0).show(); 771 $(".applicable-scenarios-section-horizontal .applicable-scenarios-tabs li").removeClass("active"); 772 $(".applicable-scenarios-section-horizontal .applicable-scenarios-tabs li").eq(0).addClass("active"); 773 }, 774 slideChange: function(){ 775 $(".applicable-scenarios-section-horizontal .applicable-scenarios-swiper-cont-horizontal .box").hide(); 776 $(".applicable-scenarios-section-horizontal .applicable-scenarios-swiper-cont-horizontal .box").eq(this.realIndex).show(); 777 $(".applicable-scenarios-section-horizontal .applicable-scenarios-tabs li").removeClass("active"); 778 $(".applicable-scenarios-section-horizontal .applicable-scenarios-tabs li").eq(this.realIndex).addClass("active"); 779 780 }, 781 }, 782 }) 783 784 if($(".applicable-scenarios-section-horizontal .applicable-scenarios-swiper-horizontal").length > 0){ 785 $(".applicable-scenarios-section-horizontal .applicable-scenarios-inner").hover(function(){ 786 applicableScenariosSwiperHorizontal.autoplay.stop(); 787 },function(){ 788 applicableScenariosSwiperHorizontal.autoplay.start(); 789 }) 790 } 791 792 793 /* é¢çº¦ä¸å®¶å¨è¯¢ */ 794 $(".expert-counselling-trigger").click(function(){ 795 $(".expert-counselling-layer").fadeIn(300); 796 $("body").addClass("body-hidden"); 797 window.myCollect.$eventClick({ 798 click_name: 'é¢çº¦ä¸å®¶å¨è¯¢', 799 click_alias: 'é¢çº¦ä¸å®¶å¨è¯¢', 800 }) 801 }) 802 $(".expert-counselling-layer .layer-close").click(function(){ 803 $(".expert-counselling-layer").fadeOut(300); 804 $("body").removeClass("body-hidden"); 805 }) 806 807 $(".expert-counselling-layer .layer-container .layer-inner .form-inner .form-block .input-box .input-text").focus(function() { 808 $(this).parents(".form-block").siblings().removeClass("focus"); 809 $(this).parents(".form-block").addClass("focus"); 810 }); 811 812 $(".expert-counselling-layer .layer-container .layer-inner .form-inner .form-block .input-box .input-text").blur(function() { 813 $(this).parents(".form-block").removeClass("focus"); 814 }); 815 816 $("body").on("click",".tips-layer .layer-close",function(){ 817 $(".tips-layer").fadeOut(300); 818 }) 819 820 $(".consultation-trigger").click(function(){ 821 $(".consultation-layer").fadeIn(300); 822 $("body").addClass("body-hidden"); 823 }) 824 $(".consultation-layer .layer-close").click(function(){ 825 $(".consultation-layer").fadeOut(300); 826 $("body").removeClass("body-hidden"); 827 }) 828 829 //è¿åé¡¶é¨ 830 var _windowHeight=$(window).height()/2; 831 //console.log($(window).height()) 832 $(window).scroll(function(){ 833 //console.log($(window).scrollTop()) 834 if ($(window).scrollTop()>_windowHeight){ 835 $(".return-top").fadeIn(500); 836 }else{ 837 $(".return-top").fadeOut(500); 838 } 839 }); 840 841 $(".return-top").click(function(){ 842 $('body,html').animate({scrollTop:0},100); 843 return false;
844 }); 845 846 var contactusFocusBigSwiper = new Swiper(".contactus-focus .big-swiper .swiper-container", { 847 autoplay: { 848 delay: 5000, 849 disableOnInteraction: false, 850 }, 851 loop: true, 852 pagination: { 853 el: ".contactus-focus .big-swiper .swiper-pagination", 854 clickable: true, 855 }, 856 }); 857 858 document.querySelectorAll('.ai-platform-app-section').forEach(function(section) { 859 // å¨å½åsectionå æ¥æ¾å ç´ 860 var swiperContainer = section.querySelector('.cont-inner-swiper .swiper-container'); 861 var nextBtn = section.querySelector('.swiper-arrow-next'); 862 var prevBtn = section.querySelector('.swiper-arrow-prev'); 863 var pagination = section.querySelector('.swiper-pagination'); 864 865 // 为æ¯ä¸ªsectionåç¬åå§åSwiper 866 if (swiperContainer) { 867 new Swiper(swiperContainer, { 868 autoplay: { 869 delay: 5000, 870 disableOnInteraction: false, 871 }, 872 loop: true, 873 navigation: { 874 nextEl: nextBtn, 875 prevEl: prevBtn, 876 }, 877 pagination: { 878 el: pagination, 879 type: 'fraction', 880 }, 881 }); 882 } 883}); 884 885 886 //// 887 /* var productTechnologyPartnerSwiper = new Swiper('.product-technology-partner-swiper .swiper-container', { 888 loop: true, 889 speed: 600, 890 }) */ 891 892 893 var yjsjkystSwiper = new Swiper(".yjsjkyst-swiper .swiper-container", { 894 /* autoplay: { 895 delay: 5000, 896 disableOnInteraction: false, 897 }, */ 898 loop: true, 899 spaceBetween: 30, 900 navigation: { 901 nextEl: ".yjsjkyst-swiper .swiper-arrow-next", 902 prevEl: ".yjsjkyst-swiper .swiper-arrow-prev", 903 }, 904 pagination: { 905 el: ".yjsjkyst-swiper .swiper-pagination", 906 type: 'fraction', 907 }, 908 }); 909 910 911 const $lpsLayer = $('.lps-layer'); 912 const $closeBtn = $('.lps-layer .layer-close'); 913 914 // æ£æ¥æ¯å¦åå¨ cookies 915 const hasCookie = getCookieY('lpsLayerClosed'); 916 917 if (!hasCookie) { 918 $lpsLayer.show(); 919 } else { 920 $lpsLayer.hide(); 921 } 922 923 // ç¹å»å ³éæé®äºä»¶ 924 $closeBtn.on('click', function() { 925 $lpsLayer.hide(); 926 setTimeCookieY('lpsLayerClosed', 'true'); 927 }); 928 929 930 $(".click-joinus").click(function(){ 931 $(".joinus-layer").fadeIn(300); 932 933 var countdown = 5; 934 var interval = setInterval(function() { 935 if (countdown > 0) { 936 //console.log(countdown + 'ç§å跳转'); // å¯ä»¥å¨æ§å¶å°çå°å计æ¶ä¿¡æ¯ 937 $(".joinus-layer .countdown-cont span").text(countdown); 938 countdown--; 939 } else { 940 clearInterval(interval); // åæ¢è®¡æ¶å¨ 941 window.location.href = 'http://digitalchina.zhiye.com/'; // 跳转çURLå°å 942 } 943 }, 1000); 944 945 }) 946 947 $(".joinus-layer .layer-close").click(function(){ 948 $(".joinus-layer").fadeOut(300); 949 window.location.href = 'http://digitalchina.zhiye.com/'; // 跳转çURLå°å 950 }) 951 952 $('.cb-checkbox input').change(function () { 953 if ($(this).prop('checked')) { 954 $(this).closest('li').addClass('selected') 955 } else { 956 $(this).closest('li').removeClass('selected') 957 } 958 }) 959 960 961 962 //å¤æææºãpcæ§è¡ 963 if(ismobistaute){ 964 //ææº 965 966 var homeProductsServicesSwiper = new Swiper('.home-products-services-swiper .swiper-container',{ 967 // autoplay: { 968 // delay: 2000, 969 // disableOnInteraction: false, 970 // }, 971 speed: 1000, 972 loop: true, 973 slidesPerView: 2, 974 centeredSlides: true, 975 pagination: { 976 el: ".home-products-services-swiper .swiper-pagination", 977 clickable: true, 978 //type: 'fraction', 979 }, 980 }); 981 982 var enterpriseLogoTopSwiper = new Swiper(".enterprise-logo-top", { 983 autoplay: { 984 delay: 0, 985 disableOnInteraction: false, 986 }, 987 speed: 3000, 988 watchSlidesProgress: true, 989 loop: true, 990 slidesPerView: 3, 991 freeMode: true, 992 //centeredSlides: true, 993 }); 994 995 var enterpriseLogoBottomSwiper = new Swiper(".enterprise-logo-bottom", { 996 autoplay: { 997 delay: 0, 998 disableOnInteraction: false, 999 reverseDirection: true, 1000 }, 1001 speed: 3000, 1002 watchSlidesProgress: true, 1003 loop: true, 1004 slidesPerView: 3, 1005 freeMode: true, 1006 //centeredSlides: true, 1007 }); 1008 1009 var homeNewsSwiper = new Swiper(".home-news-swiper .swiper-container", { 1010 // autoplay: { 1011 // delay: 2000, 1012 // disableOnInteraction: false, 1013 // }, 1014 loop: true, 1015 slidesPerView: 2, 1016 centeredSlides: true, 1017 pagination: { 1018 el: ".home-news-swiper .swiper-pagination", 1019 clickable: true, 1020 }, 1021 }); 1022 1023 var _bestPracticesTotal = $(".best-practices-swiper .swiper-slide").length; 1024 if(_bestPracticesTotal > 1){ 1025 $(".best-practices-swiper").addClass("flex"); 1026 var bestPracticesSwiper = new Swiper(".best-practices-swiper .swiper-container", { 1027 // autoplay: { 1028 // delay: 2000, 1029 // disableOnInteraction: false, 1030 // }, 1031 loop: true, 1032 slidesPerView: 2, 1033 centeredSlides: true, 1034 pagination: { 1035 el: ".best-practices-swiper .swiper-pagination", 1036 clickable: true, 1037 }, 1038 }); 1039 } 1040 1041 var companyProfileSwiper = new Swiper('.company-profile-swiper .swiper-container',{ 1042 // autoplay: { 1043 // delay: 5000, 1044 // //disableOnInteraction: true, 1045 // }, 1046 loop: true, 1047 slidesPerView: 2, 1048 centeredSlides: true, 1049 navigation: { 1050 nextEl: ".company-profile-swiper .swiper-arrow-next", 1051 prevEl: ".company-profile-swiper .swiper-arrow-prev", 1052 }, 1053 pagination: { 1054 el: ".company-profile-swiper .swiper-pagination", 1055 clickable: true, 1056 dynamicBullets: true, 1057 }, 1058 }); 1059 1060 1061
1062 if($(".cooperative-partner-swiper .swiper-slide").length > 12){ 1063 $(".cooperative-partner-swiper").addClass("foucs-animate"); 1064 var cooperativepartnerSwiper = new Swiper(".cooperative-partner-swiper .swiper-container", { 1065 //loop: true, 1066 autoplay: { 1067 delay: 5000, 1068 //disableOnInteraction: true, 1069 }, 1070 speed: 1000, 1071 slidesPerView: 3, 1072 slidesPerGroup: 3, 1073 slidesPerColumn : 4, 1074 slidesPerColumnFill : 'row', 1075 pagination: { 1076 el: ".cooperative-partner-swiper .swiper-pagination", 1077 clickable: true, 1078 dynamicBullets: true, 1079 }, 1080 }); 1081 } 1082 1083 // äºçº§å¯¼èª å½åç¶ææ»å¨å®ä½ 1084 if($(".sub-nav-container").length>0){ 1085 var _subNavIndex = $('.sub-nav-container li.active').index(); 1086 console.log(_subNavIndex) 1087 if(_subNavIndex != 0){ 1088 var _positionLeft = $('.sub-nav-container li').eq(_subNavIndex).position().left; 1089 $(".sub-nav-container ul").animate({ scrollLeft: parseInt(_positionLeft)}, 500); 1090 //console.log(parseInt(_positionLeft)) 1091 } 1092 } 1093 1094 var aiServeListSwiper = new Swiper(".ai-serve-list-swiper .swiper-container", { 1095 // autoplay: { 1096 // delay: 2000, 1097 // disableOnInteraction: false, 1098 // }, 1099 loop: true, 1100 slidesPerView: 2, 1101 centeredSlides: true, 1102 pagination: { 1103 el: ".ai-serve-list-swiper .swiper-pagination", 1104 clickable: true, 1105 }, 1106 }); 1107 1108 var productTechnologyPartnerTabsSwiper = new Swiper(".product-technology-partner-tabs .swiper-container", { 1109 //loop: true, 1110 //spaceBetween: 10, 1111 slidesPerView: 3, 1112 slidesPerGroup: 3, 1113 freeMode: true, 1114 watchSlidesProgress: true, 1115 navigation: { 1116 nextEl: ".product-technology-partner-tabs .swiper-arrow-next", 1117 prevEl: ".product-technology-partner-tabs .swiper-arrow-prev", 1118 }, 1119 on:{ 1120 init: function(swiper){ 1121 $(".product-technology-partner-tabs .swiper-slide").eq(0).addClass("active").siblings().removeClass("active"); 1122 $(".product-technology-partner-swiper .swiper-slide").eq(0).show().siblings().hide(); 1123 }, 1124 click:function(){ 1125 $(".product-technology-partner-tabs .swiper-slide").eq(this.clickedIndex).addClass("active").siblings().removeClass("active"); 1126 $(".product-technology-partner-swiper .swiper-slide").eq(this.clickedIndex).show().siblings().hide(); 1127 } 1128 } 1129 }); 1130 1131 $('.case-item h3').click(function () { 1132 if ($(this).parents('.case-item').hasClass('expand')) { 1133 $(this).parents('.case-item').removeClass('expand') 1134 } else { 1135 $('.case-item').removeClass('expand') 1136 $(this).parents('.case-item').addClass('expand') 1137 } 1138 }) 1139 1140 1141 }else{ 1142 //PC 1143 1144 var _homeProductsServicesSwiperTotal = $(".home-products-services-swiper").length; 1145 if(_homeProductsServicesSwiperTotal > 0){ 1146 var _stretch,_depth; 1147 if(windowWidth < 992){ 1148 1149 }else if(windowWidth < 1300){ 1150 _stretch = "-40.9%"; 1151 _depth = "800"; 1152 }else if(windowWidth < 1400){ 1153 _stretch = "-40.5%"; 1154 _depth = "800"; 1155 }else if(windowWidth < 1680){ 1156 _stretch = "-38.3%"; 1157 _depth = "800"; 1158 }else if(windowWidth < 1920){ 1159 _stretch = "-41.7%"; 1160 _depth = "850"; 1161 }else{ 1162 _stretch = "-48.3%"; 1163 _depth = "950"; 1164 } 1165 1166 var homeProductsServicesSwiper = new Swiper('.home-products-services-swiper .swiper-container', { 1167 autoplay: { 1168 delay: 2000, 1169 disableOnInteraction: false, 1170 }, 1171 loop: true, 1172 effect: "coverflow", 1173 grabCursor: true, 1174 centeredSlides: true, 1175 slidesPerView: 2.8, 1176 coverflowEffect: { 1177 rotate: 30, 1178 stretch: _stretch, 1179 depth: _depth, 1180 modifier: 1, 1181 slideShadows: false, 1182 }, 1183 pagination: { 1184 el: ".home-products-services-swiper .swiper-pagination", 1185 clickable: true, 1186 //type: 'fraction', 1187 }, 1188 navigation: { 1189 nextEl: ".home-products-services-swiper .swiper-arrow-next", 1190 prevEl: ".home-products-services-swiper .swiper-arrow-prev", 1191 }, 1192 }) 1193 1194 homeProductsServicesSwiper.el.onmouseover = function(){ 1195 homeProductsServicesSwiper.autoplay.stop(); 1196 } 1197 homeProductsServicesSwiper.el.onmouseout = function(){ 1198 homeProductsServicesSwiper.autoplay.start(); 1199 } 1200 } 1201 1202 var enterpriseLogoTopSwiper = new Swiper(".enterprise-logo-top", { 1203 autoplay: { 1204 delay: 0, 1205 disableOnInteraction: false, 1206 }, 1207 speed: 3000, 1208 watchSlidesProgress: true, 1209 loop: true, 1210 slidesPerView: 8, 1211 freeMode: true, 1212 //centeredSlides: true, 1213 }); 1214 1215 var enterpriseLogoBottomSwiper = new Swiper(".enterprise-logo-bottom", { 1216 autoplay: { 1217 delay: 0, 1218 disableOnInteraction: false, 1219 reverseDirection: true, 1220 }, 1221 speed: 3000, 1222 watchSlidesProgress: true, 1223 loop: true, 1224 slidesPerView: 8, 1225 freeMode: true, 1226 //centeredSlides: true, 1227 }); 1228 1229 $(".home-news-swiper").each(function() { 1230 var $this = $(this); 1231 var swiperSlides = $this.find(".swiper-slide"); 1232 if (swiperSlides.length > 3) { 1233 var homeNewsSwiper = new Swiper($this.find(".swiper-container")[0], { 1234 autoplay: { 1235 delay: 2000,
1236 disableOnInteraction: false, 1237 }, 1238 loop: true, 1239 slidesPerView: 3, 1240 slidesPerGroup: 3, 1241 navigation: { 1242 nextEl: $this.find(".swiper-arrow-next")[0], 1243 prevEl: $this.find(".swiper-arrow-prev")[0], 1244 }, 1245 }); 1246 1247 // ç¡®ä¿å¯¼èªç®å¤´åå¨ä¸æ¾ç¤º 1248 $this.find(".swiper-arrow").show(); 1249 1250 // è®¾ç½®é¼ æ æ¬åäºä»¶ 1251 $this.find(".swiper-container").on("mouseover", function() { 1252 homeNewsSwiper.autoplay.stop(); 1253 }).on("mouseout", function() { 1254 homeNewsSwiper.autoplay.start(); 1255 }); 1256 } 1257 }); 1258 1259 var _bestPracticesTotal = $(".best-practices-swiper .swiper-slide").length; 1260 if(_bestPracticesTotal > 3){ 1261 $(".best-practices-swiper").addClass("flex"); 1262 var bestPracticesSwiper = new Swiper(".best-practices-swiper .swiper-container", { 1263 autoplay: { 1264 delay: 2000, 1265 disableOnInteraction: false, 1266 }, 1267 loop: true, 1268 slidesPerView: 3, 1269 slidesPerGroup: 3, 1270 pagination: { 1271 el: ".best-practices-swiper .swiper-pagination", 1272 clickable: true, 1273 }, 1274 navigation: { 1275 nextEl: ".best-practices-swiper .swiper-arrow-next", 1276 prevEl: ".best-practices-swiper .swiper-arrow-prev", 1277 }, 1278 }); 1279 $(".best-practices-swiper .swiper-arrow").show(); 1280 1281 bestPracticesSwiper.el.onmouseover = function(){ 1282 bestPracticesSwiper.autoplay.stop(); 1283 } 1284 bestPracticesSwiper.el.onmouseout = function(){ 1285 bestPracticesSwiper.autoplay.start(); 1286 } 1287 } 1288 1289 var companyProfileSwiper = new Swiper(".company-profile-swiper .swiper-container", { 1290 //loop: true, 1291 // autoplay: { 1292 // delay: 5000, 1293 // //disableOnInteraction: true, 1294 // }, 1295 speed: 1000, 1296 slidesPerView: 6, 1297 slidesPerGroup: 6, 1298 slidesPerColumn : 2, 1299 slidesPerColumnFill : 'row', 1300 pagination: { 1301 el: ".company-profile-swiper .swiper-pagination", 1302 clickable: true, 1303 }, 1304 }); 1305 1306 1307 if($(".cooperative-partner-swiper .swiper-slide").length > 24){ 1308 $(".cooperative-partner-swiper").addClass("foucs-animate"); 1309 var cooperativepartnerSwiper = new Swiper(".cooperative-partner-swiper .swiper-container", { 1310 //loop: true, 1311 autoplay: { 1312 delay: 5000, 1313 //disableOnInteraction: true, 1314 }, 1315 speed: 1000, 1316 slidesPerView: 8, 1317 slidesPerGroup: 8, 1318 slidesPerColumn : 3, 1319 slidesPerColumnFill : 'row', 1320 pagination: { 1321 el: ".cooperative-partner-swiper .swiper-pagination", 1322 clickable: true, 1323 }, 1324 }); 1325 } 1326 1327 var _aiServeListTotal = $(".ai-serve-list-swiper .swiper-slide").length; 1328 if(_aiServeListTotal > 4){ 1329 $(".ai-serve-list-swiper").addClass("flex"); 1330 var aiServeListSwiper = new Swiper(".ai-serve-list-swiper .swiper-container", { 1331 autoplay: { 1332 delay: 2000, 1333 disableOnInteraction: false, 1334 }, 1335 loop: true, 1336 slidesPerView: 4, 1337 slidesPerGroup: 4, 1338 pagination: { 1339 el: ".ai-serve-list-swiper .swiper-pagination", 1340 clickable: true, 1341 }, 1342 navigation: { 1343 nextEl: ".ai-serve-list-swiper .swiper-arrow-next", 1344 prevEl: ".ai-serve-list-swiper .swiper-arrow-prev", 1345 }, 1346 }); 1347 $(".ai-serve-list-swiper .swiper-arrow").show(); 1348 1349 aiServeListSwiper.el.onmouseover = function(){ 1350 aiServeListSwiper.autoplay.stop(); 1351 } 1352 aiServeListSwiper.el.onmouseout = function(){ 1353 aiServeListSwiper.autoplay.start(); 1354 } 1355 } 1356 1357 var productTechnologyPartnerTabsSwiper = new Swiper(".product-technology-partner-tabs .swiper-container", { 1358 //loop: true, 1359 //spaceBetween: 10, 1360 slidesPerView: 6, 1361 slidesPerGroup: 6, 1362 freeMode: true, 1363 watchSlidesProgress: true, 1364 navigation: { 1365 nextEl: ".product-technology-partner-tabs .swiper-arrow-next", 1366 prevEl: ".product-technology-partner-tabs .swiper-arrow-prev", 1367 }, 1368 on:{ 1369 init: function(swiper){ 1370 $(".product-technology-partner-tabs .swiper-slide").eq(0).addClass("active").siblings().removeClass("active"); 1371 $(".product-technology-partner-swiper .swiper-slide").eq(0).show().siblings().hide(); 1372 }, 1373 click:function(){ 1374 $(".product-technology-partner-tabs .swiper-slide").eq(this.clickedIndex).addClass("active").siblings().removeClass("active");
1375 $(".product-technology-partner-swiper .swiper-slide").eq(this.clickedIndex).show().siblings().hide(); 1376 } 1377 } 1378 }); 1379 1380 1381 1382 } 1383 1384 1385 1386 1387 1388}) 1389 1390function getWindowSize(){ 1391 windowWidth = $(window).width(); 1392 windowHeight = $(window).height(); 1393 1394 1395 if(windowWidth < 991){ 1396 ismobistaute = true; 1397 } 1398 1399 if( !('placeholder' in document.createElement('input')) ){ 1400 // å¹é é¤type=password以夿æinputãtextarea 1401 $('input[placeholder][type!=password],textarea[placeholder]').each(function(){ 1402 var self = $(this), 1403 text= self.attr('placeholder'); 1404 // 妿å 容为空ï¼ååå ¥ 1405 if(self.val()===""){ 1406 self.val(text).addClass('placeholder'); 1407 } 1408 // æ§ä»¶æ¿æ´»ï¼æ¸ 空placeholder 1409 self.focus(function(){ 1410 self.val(""); 1411 if(self.val()===text){ 1412 self.val("").removeClass('placeholder'); 1413 } 1414 // æ§ä»¶å¤±å»ç¦ç¹ï¼æ¸ 空placeholder 1415 }).blur(function(){ 1416 if(self.val()===""){ 1417 self.val(text).addClass('placeholder'); 1418 } 1419 }); 1420 }); 1421 } 1422 1423 var _headerHeight = $(".header").height(); 1424 $(".height100").css({"height":windowHeight}); 1425 1426 $(".section-404").height(windowHeight); 1427 1428 if(windowWidth > 991){ 1429 //$(".about-banner").css({"height":windowHeight}); 1430 } 1431 1432 1433 if($("#particles-js").length > 0){ 1434 setTimeout(function(){ 1435 1436 particlesJS('particles-js', 1437 1438 { 1439 "particles": { 1440 "number": { 1441 "value": 80, 1442 "density": { 1443 "enable": true, 1444 "value_area": 800 1445 } 1446 }, 1447 "color": { 1448 "value": "#ffffff" 1449 }, 1450 "shape": { 1451 "type": "circle", 1452 "stroke": { 1453 "width": 0, 1454 "color": "#000000" 1455 }, 1456 "polygon": { 1457 "nb_sides": 5 1458 }, 1459 "image": { 1460 "src": "img/github.svg", 1461 "width": 100, 1462 "height": 100 1463 } 1464 }, 1465 "opacity": { 1466 "value": 0.5, 1467 "random": false, 1468 "anim": { 1469 "enable": false, 1470 "speed": 1, 1471 "opacity_min": 0.1, 1472 "sync": false 1473 } 1474 }, 1475 "size": { 1476 "value": 5, 1477 "random": true, 1478 "anim": { 1479 "enable": false, 1480 "speed": 40, 1481 "size_min": 0.1, 1482 "sync": false 1483 } 1484 }, 1485 "line_linked": { 1486 "enable": true, 1487 "distance": 150, 1488 "color": "#ffffff", 1489 "opacity": 0.4, 1490 "width": 1 1491 }, 1492 "move": { 1493 "enable": true, 1494 "speed": 6, 1495 "direction": "none", 1496 "random": false, 1497 "straight": false, 1498 "out_mode": "out", 1499 "attract": { 1500 "enable": false, 1501 "rotateX": 600, 1502 "rotateY": 1200 1503 } 1504 } 1505 }, 1506 "interactivity": { 1507 "detect_on": "canvas", 1508 "events": { 1509 "onhover": { 1510 "enable": true, 1511 "mode": "repulse" 1512 }, 1513 "onclick": { 1514 "enable": true, 1515 "mode": "push" 1516 }, 1517 "resize": true 1518 }, 1519 "modes": { 1520 "grab": { 1521 "distance": 400, 1522 "line_linked": { 1523 "opacity": 1 1524 } 1525 }, 1526 "bubble": { 1527 "distance": 400, 1528 "size": 40, 1529 "duration": 2, 1530 "opacity": 8, 1531 "speed": 3 1532 }, 1533 "repulse": { 1534 "distance": 200 1535 }, 1536 "push": { 1537 "particles_nb": 4 1538 }, 1539 "remove": { 1540 "particles_nb": 2 1541 } 1542 } 1543 }, 1544 "retina_detect": true, 1545 "config_demo": { 1546 "hide_card": false, 1547 "background_color": "#b61924", 1548 "background_image": "", 1549 "background_position": "50% 50%", 1550 "background_repeat": "no-repeat", 1551 "background_size": "cover" 1552 } 1553 } 1554 1555 ); 1556 },500) 1557 1558 1559 } 1560 1561} 1562 1563/*è§é¢ææ¾*/ 1564function Videoplay(){ 1565 //è§é¢å¼¹æ¡ 1566 $("body").on("click",".video-play",function(){ 1567 var _mp4 = $(this).attr("data-mp4"); 1568 $("body").append('<div class="video-layer">'+ 1569 '<div class="opacity"></div>'+ 1570 '<div class="layer-inner">'+ 1571 '<div class="layer-close"></div>'+ 1572 '<div class="layer-container">'+ 1573 '<div class="video-box"><video controls="controls" autoplay="autoplay" poster="" webkit-playsinline="" playsinline="" x-webkit-airplay="true" airplay="allow"><source src="'+_mp4+'" type="video/mp4">æ¨çæµè§å¨ä¸æ¯æ video æ ç¾ã</video></div>'+ 1574 '</div>'+ 1575 '</div>'+ 1576 '</div>'); 1577 $(".video-layer").fadeIn(300); 1578 }) 1579 1580 $("body").on("click",".video-layer .layer-close",function(){ 1581 $(".video-layer").fadeOut(300,function(){ 1582 $(".video-layer").remove(); 1583 }); 1584 }) 1585 1586} 1587 1588function productAdvantages(){ 1589 _productAdvantagesSectionTop = $(".product-advantages-section").offset().top; 1590 _productAdvantagesSectionHeight = $(".product-advantages-section").height() / 5; 1591 1592 var windowScrollTop = $(window).scrollTop(); 1593 var referenceHeight = windowHeight * 1.1; 1594 1595 if(windowScrollTop >= _productAdvantagesSectionTop - referenceHeight + _productAdvantagesSectionHeight && windowScrollTop < _productAdvantagesSectionTop - referenceHeight + _productAdvantagesSectionHeight * 2){ 1596 //console.log(1) 1597 $(".product-advantages-sticky .cont-inner .box").hide(); 1598 $(".product-advantages-sticky .cont-inner .box").eq(0).show(); 1599 $(".product-advantages-page .current").text("1"); 1600 }else if(windowScrollTop >= _productAdvantagesSectionTop -referenceHeight + _productAdvantagesSectionHeight * 2 && windowScrollTop < _productAdvantagesSectionTop - referenceHeight + _productAdvantagesSectionHeight * 3){ 1601 //console.log(2) 1602 $(".product-advantages-sticky .cont-inner .box").hide(); 1603 $(".product-advantages-sticky .cont-inner .box").eq(1).show(); 1604 $(".product-advantages-page .current").text("2"); 1605 }else if(windowScrollTop >= _productAdvantagesSectionTop - referenceHeight + _productAdvantagesSectionHeight * 3){ 1606 //console.log(3) 1607 $(".product-advantages-sticky .cont-inner .box").hide(); 1608 $(".product-advantages-sticky .cont-inner .box").eq(2).show(); 1609 $(".product-advantages-page .current").text("3"); 1610 } 1611} 1612 1613function tipsLayer(txt){ 1614 $("body").append('<div class="tips-layer">'+ 1615 '<div class="opacity"></div>'+ 1616 '<div class="layer-container">'+ 1617 '<div class="layer-close"></div>'+ 1618 '<div class="layer-inner">'+ 1619 '<div class="icon"><img src="/statics/zhsite/images/icon/icon-tips-success.png" alt="" /></div>'+ 1620 '<div class="cont">'+ txt +'</div>'+ 1621 '</div>'+ 1622 '</div>'+ 1623 '</div>'); 1624 $(".tips-layer").fadeIn(300); 1625} 1626 1627//åcookiesï¼æ°¸ä¹ ææ
1628function setCookieY(_cookie, _cookieValue) { 1629 document.cookie = _cookie + "=" + escape(_cookieValue) + ";path=/"; 1630} 1631 1632//åcookiesï¼æææ7天 1633function setTimeCookieY(_cookie, _cookieValue) { 1634 var days = 7; 1635 var date = new Date(); 1636 date.setTime(date.getTime() + (days*24*60*60*1000)); 1637 var expires = "; expires=" + date.toUTCString(); 1638 document.cookie = _cookie + "=" + escape(_cookieValue) + expires + ";path=/"; 1639} 1640 1641//读åcookies 1642function getCookieY(_cookie) { 1643 var arr, reg = new RegExp("(^| )" + _cookie + "=([^;]*)(;|$)"); 1644 if (arr = document.cookie.match(reg)){ 1645 return unescape(arr[2]); 1646 }else{ 1647 return null; 1648 } 1649} 1650 1651//设置cookie彿°ï¼å æ¬é»è®¤æ¶é´ 1652function setbrowserCookie(name, value, days) { 1653 var expires = ""; 1654 if (days) { 1655 var date = new Date(); 1656 date.setTime(date.getTime() + (days*24*60*60*1000)); 1657 expires = "; expires=" + date.toUTCString(); 1658 } 1659 document.cookie = name + "=" + (value || "") + expires + "; path=/;domain=.digitalchina.com"; 1660} 1661 1662// 读åcookie彿° 1663function getbrowserCookie(name) { 1664 var nameEQ = name + "="; 1665 var ca = document.cookie.split(';'); 1666 for(var i=0;i < ca.length;i++) { 1667 var c = ca[i]; 1668 while (c.charAt(0)==' ') c = c.substring(1,c.length); 1669 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 1670 } 1671 return null; 1672}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.