1/** 2 * @copyright Copyright (c) 2020 䏿µ·ç¨»å£³ç½ç»ç§ææéå ¬å¸ 3 * @link http://www.dookay.com/ 4 * @create Created on 2020/5/8 5 */ 6"use strict"; 7(function ($) { 8 $.fn.numberRock = function (options) { 9 var defaults = { 10 lastNumber: 100, 11 duration: 2000, 12 easing: "swing", 13 }; 14 var opts = $.extend({}, defaults, options); 15 16 $(this).animate( 17 { 18 num: "numberRock", 19 }, 20 { 21 duration: opts.duration, 22 easing: opts.easing, 23 complete: function () { 24 //console.log("success"); 25 }, 26 step: function (a, b) { 27 $(this).html(parseInt(b.pos * opts.lastNumber)); 28 }, 29 } 30 ); 31 }; 32})(jQuery); 33$(function () { 34 /** 35 * 坿æ¬ç¼è¾å¨å¾çå¤ç 36 * @type {*[]} 37 */ 38 var mediaAdapt = []; 39 $(".js-edui-content").each(function () { 40 var $this = $(this); 41 $this.find("img").each(function (i, n) { 42 $(n).attr("style", "max-width:100%;").removeAttr("height"); 43 }); 44 45 $this.find(".edui-upload-video,.edui-iframe-video").each(function () { 46 var _this = $(this); 47 _this.parent().css({ paddingRight: "", paddingLeft: "" }); 48 mediaAdapt.push({ 49 parent: $this, 50 current: _this, 51 width: parseInt(_this.attr("width")) || 360, 52 height: parseInt(_this.attr("height")) || 250, 53 }); 54 }); 55 }); 56 var app = { 57 moveNum: function (obj) { 58 $(obj) 59 .find(".move-num") 60 .each(function () { 61 $(this).numberRock({ 62 lastNumber: $(this).data("num"), 63 duration: parseInt($(this).data("speed")), 64 easing: "swing", 65 }); 66 }); 67 }, 68 scrollNum: function (obj) { 69 console.log($(obj)); 70 if ($(obj).length > 0) { 71 function scrTo() { 72 if ( 73 $(window).scrollTop() + $(window).height() > 74 $(obj).offset().top - 50 75 ) { 76 if (!$(obj).hasClass("active")) { 77 $(obj).addClass("active"); 78 app.moveNum(obj); 79 } 80 } 81 } 82 $(window).scroll(scrTo); 83 scrTo(); 84 } 85 }, 86 }; 87 app.scrollNum(".js-num"); 88 //å¨ç»ææ 89 Pace.on("hide", function () { 90 //æ»å¨ææåå§å 91 AOS.init({ 92 offset: 60, 93 anchorPlacement: "top-center", 94 once: true, 95 duration: 1000, 96 }); 97 }); 98 function setMediaAdapt(mediaAdapt) { 99 for (var i in mediaAdapt) { 100 var item = mediaAdapt[i], 101 currWidth = item.current.width(); 102 if (currWidth >= item.parent.width()) { 103 item.current.attr("height", (item.height / item.width) * currWidth); 104 } 105 } 106 }; 107 $(window).resize(function () { 108 setMediaAdapt(mediaAdapt); 109 }); 110 setMediaAdapt(mediaAdapt); 111 //导èªåè² 112 $(window).scroll(function () { 113 if (!$(".js-head").hasClass("isblack")) { 114 if ($(window).scrollTop() > 100) { 115 $(".js-head").addClass("black"); 116 } else { 117 $(".js-head").removeClass("black"); 118 } 119 } 120 }); 121 //æç´¢æ¡ 122 $(".j-search").mouseenter(function (e) { 123 e.stopPropagation(); 124 var $this = $(this); 125 if(window.innerWidth>768){ 126 $this.addClass('active'); 127 $this.siblings().slideDown(); 128 } 129 }); 130 $(".j-search-inner").mouseleave(function (e) { 131 var $this = $(this); 132 if(window.innerWidth>768){ 133 $this.slideUp(); 134 $this.siblings().removeClass('active'); 135 } 136 }); 137 // å¹»ç¯ç 138 $(".js-swiper").each(function () { 139 var $this = $(this); 140 if ($this.data("objSwiper")) return; 141 var objSwiper = new Swiper( 142 $this, 143 $.extend( 144 {}, 145 { 146 spaceBetween: 50, 147 mousewheel: { 148 releaseOnEdges: true, 149 }, 150 navigation: { 151 nextEl: ".j-next-1", 152 prevEl: ".j-prev-1", 153 }, 154 pagination: { 155 el: ".swiper-pagination", 156 clickable: true, 157 }, 158 effect:"fade" 159 }, 160 $this.data() 161 ) 162 );
163 $this.data("objSwiper", objSwiper); 164 }); 165 $(".js-swiper-product").each(function () { 166 var $this = $(this); 167 if ($this.data("objSwiper")) return; 168 var objSwiper = new Swiper( 169 $this, 170 $.extend( 171 {}, 172 { 173 spaceBetween: 50, 174 navigation: { 175 nextEl: ".j-next-product", 176 prevEl: ".j-prev-product", 177 }, 178 }, 179 $this.data() 180 ) 181 ); 182 $this.data("objSwiper", objSwiper); 183 }); 184 $(".js-swiper-career").each(function () { 185 var $this = $(this); 186 if ($this.data("objSwiper")) return; 187 var objSwiper = new Swiper( 188 $this, 189 $.extend( 190 {}, 191 { 192 spaceBetween: 30, 193 freeMode:true, 194 mousewheel: { 195 releaseOnEdges: true, 196 }, 197 }, 198 $this.data() 199 ) 200 ); 201 $this.data("objSwiper", objSwiper); 202 }); 203 $(".js-swiper-index").each(function () { 204 var $this = $(this); 205 if ($this.data("objSwiper")) return; 206 var objSwiper = new Swiper( 207 $this, 208 $.extend( 209 {}, 210 { 211 mousewheel: { 212 releaseOnEdges: true, 213 }, 214 spaceBetween: 50, 215 navigation: { 216 nextEl: ".j-next-1", 217 prevEl: ".j-prev-1", 218 }, 219 pagination: { 220 el: ".swiper-pagination", 221 clickable: true, 222 }, 223 }, 224 $this.data() 225 ) 226 ); 227 $this.data("objSwiper", objSwiper); 228 }); 229 $(".js-swiper3").each(function () { 230 var $this = $(this); 231 if ($this.data("objSwiper")) return; 232 var objSwiper = new Swiper( 233 $this, 234 $.extend( 235 {}, 236 { 237 slidesPerView: 3, 238 mousewheel: { 239 releaseOnEdges: true, 240 }, 241 pagination: { 242 el: ".swiper-pagination-a", 243 clickable: true, 244 }, 245 navigation: { 246 nextEl: ".j-next", 247 prevEl: ".j-prev", 248 }, 249 }, 250 $this.data() 251 ) 252 ); 253 $this.data("objSwiper", objSwiper); 254 }); 255 $(".js-swiper31").each(function () { 256 var $this = $(this); 257 if ($this.data("objSwiper")) return; 258 var objSwiper = new Swiper( 259 $this, 260 $.extend( 261 {}, 262 { 263 centeredSlides: true, 264 slidesPerView: 3, 265 mousewheel: { 266 releaseOnEdges: true, 267 }, 268 pagination: { 269 el: ".swiper-pagination-a1", 270 clickable: true, 271 }, 272 navigation: { 273 nextEl: ".j-next", 274 prevEl: ".j-prev", 275 }, 276 }, 277 $this.data() 278 ) 279 ); 280 $this.data("objSwiper", objSwiper); 281 }); 282 $(".js-swiper32").each(function () { 283 var $this = $(this); 284 if ($this.data("objSwiper")) return; 285 var objSwiper = new Swiper( 286 $this, 287 $.extend( 288 {}, 289 { 290 centeredSlides: true, 291 slidesPerView: 3, 292 mousewheel: { 293 releaseOnEdges: true, 294 }, 295 pagination: { 296 el: ".swiper-pagination-a2", 297 clickable: true, 298 }, 299 navigation: { 300 nextEl: ".j-next", 301 prevEl: ".j-prev", 302 }, 303 }, 304 $this.data() 305 ) 306 ); 307 $this.data("objSwiper", objSwiper); 308 }); 309 $(".js-swiper1").each(function () { 310 var $this = $(this); 311 if ($this.data("objSwiper")) return; 312 var objSwiper = new Swiper( 313 $this, 314 $.extend( 315 {}, 316 { 317 loop: true, 318 centeredSlides: true, 319 slidesPerView: 1, 320 spaceBetween: 20, 321 mousewheel: { 322 releaseOnEdges: true, 323 }, 324 navigation: { 325 nextEl: ".j-next", 326 prevEl: ".j-prev", 327 }, 328 }, 329 $this.data() 330 ) 331 ); 332 $this.data("objSwiper", objSwiper); 333 }); 334 $(".js-swiper4").each(function () { 335 var $this = $(this);
336 if ($this.data("objSwiper")) return; 337 var objSwiper = new Swiper( 338 $this, 339 $.extend( 340 {}, 341 { 342 loop: true, 343 slidesOffsetBefore: 170, 344 mousewheel: { 345 releaseOnEdges: true, 346 }, 347 slidesPerView: "auto", 348 slideToClickedSlide:true, 349 pagination: { 350 el: ".swiper-pagination", 351 clickable: true, 352 }, 353 on:{ 354 init:function(){ 355 var t='#'+this.realIndex 356 $('.j-stab').find(t).addClass('active').siblings().removeClass('active'); 357 }, 358 slideChange:function(){ 359 var t='#'+this.realIndex 360 $('.j-stab').find(t).addClass('active').siblings().removeClass('active'); 361 } 362 } 363 }, 364 $this.data() 365 ) 366 ); 367 $this.data("objSwiper", objSwiper); 368 }); 369 $(".js-swiper-history").each(function () { 370 var $this = $(this); 371 var history = ["1921", "2001", "2002", "2013", "2014", "2016"]; 372 if ($this.data("objSwiper")) return; 373 var objSwiper = new Swiper( 374 $this, 375 $.extend( 376 {}, 377 { 378 pagination: { 379 el: ".dk-history-pagination", 380 clickable: true, 381 renderBullet: function (index, className) { 382 return ( 383 '<span class="' + className + '">' + history[index] + "</span>" 384 ); 385 }, 386 }, 387 }, 388 $this.data() 389 ) 390 ); 391 $this.data("objSwiper", objSwiper); 392 }); 393 $(".js-swiper-innerhistory").each(function () { 394 var $this = $(this); 395 if ($this.data("objSwiper")) return; 396 var objSwiper = new Swiper( 397 $this, 398 $.extend( 399 {}, 400 { 401 mousewheel: { 402 releaseOnEdges: true, 403 }, 404 touchMoveStopPropagation: true, 405 pagination: { 406 el: ".dk-history-innerpagination", 407 clickable: true, 408 }, 409 }, 410 $this.data() 411 ) 412 ); 413 $this.data("objSwiper", objSwiper); 414 }); 415 $(".js-swiper-mobile").each(function () { 416 var $this = $(this); 417 if ($this.data("objSwiper")) return; 418 var objSwiper = new Swiper( 419 $this, 420 $.extend( 421 {}, 422 { 423 mousewheel: { 424 releaseOnEdges: true, 425 }, 426 touchMoveStopPropagation: true, 427 pagination: { 428 el: ".dk-mobile-innerpagination", 429 clickable: true, 430 }, 431 }, 432 $this.data() 433 ) 434 ); 435 $this.data("objSwiper", objSwiper); 436 }); 437 $(".js-swiper-t").each(function () { 438 var $this = $(this); 439 if ($this.data("objSwiper")) return; 440 var objSwiper = new Swiper( 441 $this, 442 $.extend( 443 {}, 444 { 445 mousewheel: { 446 releaseOnEdges: true, 447 }, 448 slidesPerView: "auto", 449 pagination: { 450 el: ".swiper-pagination", 451 clickable: true, 452 }, 453 }, 454 $this.data() 455 ) 456 ); 457 $this.data("objSwiper", objSwiper); 458 }); 459 $('.js-tab').each(function () { 460 var $this = $(this); 461 if($this.data('objSwiper')) return; 462 var objSwiper = new Swiper ($this, $.extend({},{ 463 touchMoveStopPropagation : true, 464 pagination:{ 465 el: ".dk-tab", 466 type:'custom', 467 clickableClass:'.dk-tab-item', 468 clickable: true, 469 renderCustom:function(swiper,current,total){ 470 $('.dk-tab').children().eq(current-1).addClass('active').siblings().removeClass('active') 471 $('.dk-tab').on('click', 'a', function (e) { 472 e.preventDefault(); 473 objSwiper.slideTo($(this).index(), 1000, false) 474 }) 475 }, 476 } 477 },$this.data())); 478 $this.data('objSwiper',objSwiper); 479 }); 480 $('.j-location').on('click','a',function(e){ 481 e.preventDefault(); 482 var $this = $(this); 483 $this.addClass('active').siblings().removeClass('active'); 484 var s=$this.data('class') 485 $('.j-location-site .dk-map-dot').each(function(){ 486 var $this = $(this); 487 if($this.hasClass(s)){ 488 $this.addClass('dk-map-dot-active') 489 }else{ 490 $this.removeClass('dk-map-dot-active') 491 } 492 });
493 }); 494 $('.j-location-site').on('mouseenter','.dk-map-dot',function(e){ 495 e.preventDefault(); 496 var $this = $(this); 497 var s=$this.data('class'); 498 $('.j-location-sitehover .dk-map-info-box').each(function(){ 499 var $this = $(this); 500 if($this.hasClass(s)){ 501 $this.toggleClass('active') 502 }else{ 503 $this.removeClass('active') 504 } 505 }) 506 }); 507 $('.j-location-sitehover .dk-map-info-box').mouseleave(function(e){ 508 var $this = $(this); 509 $this.removeClass('active') 510 }); 511 $('.dk-map-w').on('click','.dk-map-img',function(e){ 512 e.preventDefault(); 513 $('.j-location-sitehover .dk-map-info-box').each(function(){ 514 var $this = $(this); 515 $this.removeClass('active') 516 }) 517 }); 518 $('.j-dropdown').mouseenter(function(e){ 519 $('.j-dropdown-btn').dropdown('show') 520 }); 521 $('.j-dropdown').mouseleave(function(e){ 522 $('.j-dropdown-btn').dropdown('hide') 523 }); 524 $(".js-swiper-banner").each(function () { 525 var $this = $(this); 526 if ($this.data("objSwiper")) return; 527 var objSwiper = new Swiper( 528 $this, 529 $.extend( 530 {}, 531 { 532 pagination: { 533 el: ".swiper-pagination-banner", 534 clickable: true, 535 }, 536 }, 537 $this.data() 538 ) 539 ); 540 $this.data("objSwiper", objSwiper); 541 }); 542 $(".js-play").click(function(e){ 543 e.stopPropagation(); 544 var $this=$(this); 545 console.log($this.siblings('video')) 546 $this.hide(); 547 $this.siblings('video')[0].play(); 548 }); 549});
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.