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