1$(function() { 2 new WOW({}).init(); 3 4 5 6 // Ê×Ò³ - ÂÖ²¥Í¼ 7 if ($('.banner-swiper').length > 0) { 8 var banner = new Swiper(".banner-swiper", { 9 autoplay: { 10 delay: 5000, 11 disableOnInteraction: false, 12 }, 13 speed: 500, 14 watchSlidesProgress: true, 15 watchSlidesVisibility: true, 16 observer: true,//ÐÞ¸Äswiper×Ô¼º»ò×ÓÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 17 observeParents: true,//ÐÞ¸ÄswiperµÄ¸¸ÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 18 preventClicks: true,//ĬÈÏtrue 19 on: { 20 slideChange: function () { 21 // Çл»swiperÉèÖÃitem£¬activeÑ¡ÖÐ 22 setSwiperCurrent(this.activeIndex, elItem) 23 }, 24 }, 25 navigation: { 26 nextEl: '.mxw-banner .swiper-button-next', 27 prevEl: '.mxw-banner .swiper-button-prev', 28 }, 29 }); 30 let elItem = $('.banner-ctrl .mxw-box .item') 31 // Êó±êÒÆÈëÇл»swiper 32 setSwiperCurrent(false, elItem, banner, 'mouseover') 33 // ĬÈϵÚÒ»¸öitemÑ¡ÖÐ 34 setSwiperCurrent(0, elItem) 35 36 37$('.banner-swiper').mouseenter(function(){ 38 banner.autoplay.stop(); // Í£Ö¹×Ô¶¯¹ö¶¯ 39}); 40$('.banner-swiper').mouseleave(function(){ 41 banner.autoplay.start(); // ÖØÐ¿ªÊ¼×Ô¶¯¹ö¶¯ 42}); 43 } 44 45 46 47 if ($('.fa-swiper').length > 0) { 48 var fa = new Swiper(".fa-swiper", { 49 speed: 500, 50 watchSlidesProgress: true, 51 watchSlidesVisibility: true, 52 observer: true,//ÐÞ¸Äswiper×Ô¼º»ò×ÓÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 53 observeParents: true,//ÐÞ¸ÄswiperµÄ¸¸ÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 54 preventClicks: true,//ĬÈÏtrue 55 on: { 56 slideChange: function () { 57 // Çл»swiperÉèÖÃitem£¬activeÑ¡ÖÐ 58 setSwiperCurrent(this.activeIndex, elItem) 59 }, 60 }, 61 62 }); 63 let elItem = $('.fa-cate .item') 64 // Êó±êÒÆÈëÇл»swiper 65 setSwiperCurrent(false, elItem, fa, 'mouseover') 66 // ĬÈϵÚÒ»¸öitemÑ¡ÖÐ 67 setSwiperCurrent(0, elItem) 68 } 69 70 71 72 73 74 if (IsPC()) { 75 76 77 78 79 80 81 82 }else { 83 84 85 86 87 } 88 89 90 if ($(".news1-swiper").length > 0) { 91 var news1 = new Swiper(".news1-swiper", { 92 speed: 500, 93 slidesPerView: 1, 94 spaceBetween: 0, 95 loop: true, 96 centeredSlides: true, 97 centeredSlidesBounds: true, 98 centerInsufficientSlides: true, 99 autoplay: { 100 delay: 5000, 101 disableOnInteraction: false, 102 }, 103 104 105 }); 106 } 107 108 109 if ($(".zs-swiper").length > 0) { 110 var zs = new Swiper(".zs-swiper", { 111 autoplay: { 112 delay: 5000, 113 disableOnInteraction: false, 114 }, 115 loop: true, 116 117 spaceBetween: 15, 118 speed: 500, 119 slidesPerView: 5, 120 watchSlidesProgress: true, 121 watchSlidesVisibility: true, 122 observer: true,//ÐÞ¸Äswiper×Ô¼º»ò×ÓÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 123 observeParents: true,//ÐÞ¸ÄswiperµÄ¸¸ÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 124 preventClicks: false,//ĬÈÏtrue 125 breakpoints: { 126 1280: { //µ±ÆÁÄ»¿í¶ÈСÓÚµÈÓÚ1280 127 slidesPerView: 5, 128 spaceBetween: 30 129 }, 130 768: { //µ±ÆÁÄ»¿í¶ÈСÓÚµÈÓÚ768 131 slidesPerView: 4, 132 spaceBetween: 20, 133 }, 134 320: { //µ±ÆÁÄ»¿í¶ÈСÓÚµÈÓÚ320 135 slidesPerView: 2, 136 spaceBetween: 10, 137 } 138 }, 139 navigation: { 140 nextEl: '.mxw-about .swiper-button-next', 141 prevEl: '.mxw-about .swiper-button-prev', 142 }, 143 144 145 }); 146 } 147 148 if ($(".pa-swiper.in0").length > 0) { 149 var pa = new Swiper(".pa-swiper.in0", { 150 autoplay: { 151 delay: 5000, 152 disableOnInteraction: false, 153 154 }, 155 loop: true, 156 loopedSlides: 3, 157 spaceBetween: 15, 158 speed: 500, 159 slidesPerView: 6, 160 watchSlidesProgress: true, 161 watchSlidesVisibility: true, 162 observer: true,//ÐÞ¸Äswiper×Ô¼º»ò×ÓÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 163 observeParents: true,//ÐÞ¸ÄswiperµÄ¸¸ÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 164 preventClicks: false,//ĬÈÏtrue 165 breakpoints: { 166 1280: { //µ±ÆÁÄ»¿í¶ÈСÓÚµÈÓÚ1280 167 slidesPerView: 5, 168 spaceBetween: 30 169 }, 170 768: { //µ±ÆÁÄ»¿í¶ÈСÓÚµÈÓÚ768 171 slidesPerView: 4, 172 spaceBetween: 20, 173 }, 174 320: { //µ±ÆÁÄ»¿í¶ÈСÓÚµÈÓÚ320 175 slidesPerView: 2, 176 spaceBetween: 5, 177 } 178 }, 179 180 }); 181 } 182 183 184 if ($(".pa-swiper.in1").length > 0) { 185 var pa = new Swiper(".pa-swiper.in1", { 186 autoplay: { 187 delay: 5000, 188 disableOnInteraction: false, 189 reverseDirection: true, 190 }, 191 loop: true, 192 loopedSlides: 3, 193 spaceBetween: 15, 194 speed: 500, 195 slidesPerView: 6, 196 watchSlidesProgress: true, 197 watchSlidesVisibility: true, 198 observer: true,//ÐÞ¸Äswiper×Ô¼º»ò×ÓÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 199 observeParents: true,//ÐÞ¸ÄswiperµÄ¸¸ÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 200 preventClicks: false,//ĬÈÏtrue 201 breakpoints: { 202 1280: { //µ±ÆÁÄ»¿í¶ÈСÓÚµÈÓÚ1280 203 slidesPerView: 5, 204 spaceBetween: 30 205 }, 206 768: { //µ±ÆÁÄ»¿í¶ÈСÓÚµÈÓÚ768 207 slidesPerView: 4, 208 spaceBetween: 20, 209 }, 210 320: { //µ±ÆÁÄ»¿í¶ÈСÓÚµÈÓÚ320 211 slidesPerView: 2, 212 spaceBetween: 5, 213 } 214 }, 215 216 }); 217 } 218 219 220 221 if ($('.pro-swiper').length > 0) { 222 223 var pro = new Swiper(".pro-swiper", { 224 speed: 500, 225 spaceBetween: 20, 226 autoHeight: false, 227 watchSlidesProgress: true, 228 watchSlidesVisibility: true, 229 observer: true,//ÐÞ¸Äswiper×Ô¼º»ò×ÓÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 230 observeParents: true,//ÐÞ¸ÄswiperµÄ¸¸ÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 231 preventClicks: false,//ĬÈÏtrue 232 233 on: { 234 slideChange: function () { 235 // Çл»swiperÉèÖÃitem£¬activeÑ¡ÖÐ 236 setSwiperCurrent(this.activeIndex, elItem) 237 }, 238 } 239 }); 240 let elItem = $('.pro-cate .item') 241 // Êó±êÒÆÈëÇл»swiper 242 setSwiperCurrent(false, elItem, pro, 'mouseover') 243 // ĬÈϵÚÒ»¸öitemÑ¡ÖÐ 244 setSwiperCurrent(0, elItem) 245 246 } 247 248 249 250 251 252 function ImgRoll (ele) { 253 this.box = $(ele) 254 // »ñÈ¡¹ö¶¯ÈÝÆ÷
255 this.scrollBox = this.box.find('.scroll-wrap') 256 // 257 this.translateX = parseInt(this.scrollBox.css('transform').replace(/[^0-9\-,]/g, '').split(',')[4]) || 0 258 this.item = this.box.find('.scroll-item') 259 // »ñÈ¡ÈÝÆ÷ÄÚitmµÄ¿í¶È 260 this.itemWidth = (this.item.outerWidth(true) * this.item.length) 261 // ³õʼËÙ¶È 262 this.speed = 1 263 // Ìí¼Ó¶¨Ê±Æ÷ 264 this.timer = null 265 // ³õʼ»¯ÎÞ·ì¹ö¶¯ 266 this.init() 267 } 268 ImgRoll.prototype.init = function() { 269 this.addItem() 270 clearInterval(this.timer) 271 this.startRun() 272 let that = this 273 this.scrollBox.hover(function() { 274 clearInterval(that.timer) 275 276 }, function() { 277 clearInterval(that.timer) 278 that.startRun() 279 280 }) 281 } 282 ImgRoll.prototype.addItem = function() { 283 const cloneEl = this.scrollBox.html() 284 this.scrollBox.append(cloneEl) 285 } 286 ImgRoll.prototype.startRun = function() { 287 let that = this 288 this.timer = setInterval(function() { 289 // »ñÈ¡µ±Ç°µÄ translateX 290 let translateX = parseInt(that.scrollBox.css('transform').replace(/[^0-9\-,]/g, '').split(',')[4]) 291 translateX -= that.speed 292 if (translateX >= -(that.itemWidth)) { 293 that.scrollBox.css('transform', 'translateX(' + translateX + 'px)') 294 return 295 } 296 else { 297 that.scrollBox.css('transform', 'translateX(' + that.translateX + 'px)') 298 } 299 }, 20) 300 } 301 //Ö¤Êé 302 if ($('.honor-list .mxw-scroll').length > 0) { 303 const imgRoll = new ImgRoll('.mxw-scroll') 304 } 305 306 307 //µ¼º½ÏÂÀ 308 309 $(".sub_nav .side_dt_title li:first-child").addClass("on"); 310 $(".sub_nav .side_dd_content_wrap .each_dd_content:first-child").show(); 311 $(".sub_nav .side_dt_title li").hover(function () { 312 $(this).addClass("on").siblings().removeClass("on"); 313 $(this).parents(".side_dt_title").next(".side_dd_content_wrap").find(".each_dd_content").eq($(this).index()).show().siblings().hide(); 314 }); 315 316 $(".sub_nav .per_serious_title li:first-child").addClass("on"); 317 $(".sub_nav .side_dd_content .side_dd_content_each:first-child").show(); 318 $(".sub_nav .per_serious_title li").hover(function () { 319 $(this).addClass("on").siblings().removeClass("on"); 320 $(this).parents(".side_dd_title").next(".side_dd_content").find(".side_dd_content_each").eq($(this).index()).show().siblings().hide(); 321 }); 322 323 324 325 // ÊÖ·çÇÙ 326 $('.mxw-cu .itembox1 .item1').on('mouseover',function(){ 327 $('.mxw-cu .itembox1 .item1').removeClass('active') 328 $(this).addClass('active') 329 }) 330 331 332 333 // ÄÚÒ³ - ²úÆ·ÏêÇé 334 if ($('.ny-product-desc .big-swiper').length > 0) { 335 if (IsPC()) { 336 var bigImage = new Swiper('.ny-product-desc .big-swiper', { 337 observer: true,//ÐÞ¸Äswiper×Ô¼º»ò×ÓÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 338 observeParents: true,//ÐÞ¸ÄswiperµÄ¸¸ÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 339 spaceBetween: 20, 340 watchSlidesProgress: true, 341 roundLengths: true, // ËÄÉáÎåÈë 342 watchSlidesVisibility: true, 343 thumbs: { 344 swiper: { 345 el: '.ny-product-desc .small-swiper', 346 spaceBetween: 20, 347 slidesPerView: 5, 348 observer: true,//ÐÞ¸Äswiper×Ô¼º»ò×ÓÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 349 observeParents: true,//ÐÞ¸ÄswiperµÄ¸¸ÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 350 watchSlidesProgress: true, 351 watchSlidesVisibility: true, 352 roundLengths: true, // ËÄÉáÎåÈë 353 navigation: { 354 nextEl: '.ny-product-desc .small-image .swiper-button-next', 355 prevEl: '.ny-product-desc .small-image .swiper-button-prev', 356 }, 357 }, 358 autoScrollOffset: 1 359 } 360 }) 361 362 } else { 363 var bigImage = new Swiper('.ny-product-desc .big-swiper', { 364 observer: true,//ÐÞ¸Äswiper×Ô¼º»ò×ÓÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 365 observeParents: true,//ÐÞ¸ÄswiperµÄ¸¸ÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 366 spaceBetween: 20, 367 watchSlidesProgress: true, 368 watchSlidesVisibility: true, 369 thumbs: { 370 swiper: { 371 el: '.ny-product-desc .small-swiper', 372 slidesPerView: 3, 373 spaceBetween: 10, 374 observer: true,//ÐÞ¸Äswiper×Ô¼º»ò×ÓÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 375 observeParents: true,//ÐÞ¸ÄswiperµÄ¸¸ÔªËØÊ±£¬×Ô¶¯³õʼ»¯swiper 376 watchSlidesProgress: true, 377 roundLengths: true, // ËÄÉáÎåÈë 378 watchSlidesVisibility: true, 379 navigation: { 380 nextEl: '.ny-product-desc .small-image .swiper-button-next', 381 prevEl: '.ny-product-desc .small-image .swiper-button-prev', 382 }, 383 }, 384 autoScrollOffset: 1 385 } 386 }) 387 } 388 } 389 390 391 392 393 394 395 396 397 398 399 400 401}); 402
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.