1/* 2 * @Author: hl,[email protected] 3 * @Date: 2024-05-09 13:21:06 4 * @LastEditTime: 2025-07-23 14:26:22 5 * @LastEditors: hl,[email protected] 6 * @Description: 7 */ 8 9// å¤åè¯è¿åè½®æå½æ° 10function initForeignSwipers(swiper) { 11 const selector = typeof swiper === 'string' ? swiper : swiper.selector; 12 const delay = typeof swiper === 'string' ? 4000 : (swiper.time || 4000); 13 const $selectorElement = $(selector); 14 if($selectorElement.length) { 15 new Swiper($selectorElement[0], { 16 loop: true, 17 autoplay: { 18 delay: delay, 19 disableOnInteraction: false, //é¼ æ æä½åç»§ç»è½®æ 20 }, 21 observer: true, 22 observeParents: true, 23 pagination: { 24 el: $selectorElement.find('.swiper-pagination')[0], 25 type: 'bullets', 26 clickable: true 27 }, 28 }); 29 } 30} 31 32$(function() { 33 34 // Specials å¾ç忢 35 new Swiper('.j-special-swiper .swiper-container', { 36 watchSlidesProgress: true, 37 slidesPerView: 'auto', 38 centeredSlides: true, 39 loop: true, 40 loopedSlides: 5, 41 autoplay: true, 42 pagination: { 43 el: '.swiper-pagination', 44 clickable :true, 45 }, 46 on: { 47 progress: function(progress) { 48 for(i = 0; i < this.slides.length; i++) { 49 var slide = this.slides.eq(i); 50 var slideProgress = this.slides[i].progress; 51 modify = 1; 52 if(Math.abs(slideProgress) > 1) { 53 modify = (Math.abs(slideProgress) - 1) * 0.12 + 1; 54 } 55 translate = slideProgress * modify * 260 + 'px'; 56 scale = 1 - Math.abs(slideProgress) / 5; 57 zIndex = 999 - Math.abs(Math.round(10 * slideProgress)); 58 slide.transform('translateX(' + translate + ') scale(' + scale + ')'); 59 slide.css('zIndex', zIndex); 60 slide.css('opacity', 1); 61 if(Math.abs(slideProgress) > 3) { 62 slide.css('opacity', 0); 63 } 64 } 65 }, 66 setTransition: function(transition) { 67 for(var i = 0; i < this.slides.length; i++) { 68 var slide = this.slides.eq(i) 69 slide.transition(transition); 70 } 71 72 } 73 } 74 }); 75 76 // tab 忢 77 $('.j-special-tab').on('mouseover', '.j-tab-hd .item', function(){ 78 var _index = $(this).index(); 79 $(this).addClass('active').siblings().removeClass('active'); 80 $('.j-special-tab .j-tab-bd').find('.j-tab-item').eq(_index).show().siblings().hide(); 81 }); 82 83 // new Swiper('.j-news-swiper', { 84 // loop: true, 85 // autoplay: { 86 // delay: 4000, 87 // disableOnInteraction: false, //é¼ æ æä½åç»§ç»è½®æ 88 // }, 89 // observer: true, 90 // observeParents: true, 91 // pagination: { 92 // el: '.swiper-pagination', 93 // type: 'bullets', 94 // clickable: true 95 // }, 96 // on: { 97 // init: function() { 98 // var duplen = $('.j-news-swiper .swiper-wrapper').find('.swiper-slide-duplicate').length; 99 // var total = this.slides.length - duplen; 100 // var active = this.realIndex + 1; 101 // $('.u-swiper-num .active').text(active); 102 // $('.u-swiper-num .total').text(total); 103 // }, 104 // slideChangeTransitionStart: function () { // 忢å¼å§ 105 // var active = this.realIndex + 1; 106 // $('.u-swiper-num .active').text(active); 107 // $('.u-swiper-num .line').addClass('rotateIn'); 108 // }, 109 // slideChangeTransitionEnd: function() { // åæ¢ç»æ 110 // setTimeout(() => { 111 // $('.u-swiper-num .line').removeClass('rotateIn'); 112 // }, 500); 113 // }, 114 // } 115 // }); 116 117 new Swiper('.j-stories-swiper', { 118 loop: true, 119 autoplay: false, 120 slidesPerView: 'auto', 121 spaceBetween: 20, 122 centeredSlides: true, 123 observer: true, 124 observeParents: true, 125 pagination: { 126 el: '.swiper-pagination', 127 clickable: true, 128 }, 129 }); 130 131 // ä¸é¢ 132 new Swiper('.j-topic-box .swiper-container', { 133 // spaceBetween: 15, 134 slidesPerView: 'auto', 135 loop: true, 136 autoplay: { 137 delay: 1000, 138 disableOnInteraction: false, 139 }, 140 centeredSlides: true, 141 navigation: { 142 nextEl: '.j-topic-box .swiper-button-next', 143 prevEl: '.j-topic-box .swiper-button-prev', 144 }, 145 pagination: { 146 el: '.j-topic-box .swiper-pagination', 147 type: 'bullets', 148 clickable :true 149 } 150 }); 151 152 // // review å¾ç忢 153 // new Swiper('.j-review-swiper .swiper-container', { 154 // loop: true, 155 // autoplay: true, 156 // navigation: { 157 // nextEl: ".swiper-button-next", 158 // prevEl: ".swiper-button-prev", 159 // }, 160 // }); 161 162 let day = getDaySinceOpening('2026-11-05 00:00:00'); 163 if (day === 0) { 164 $('#startupDiv').hide(); 165 $('#startup').hide(); 166 $('#countdown').show(); 167 $('#countdownDiv').show(); 168 // åè®¡æ¶ 169 $('#countdown').countDown({ 170 endTime: '2026/11/05 00:00:00', 171 dayPad: true // å¯ç¨å¤©å°äº10æ¶è¡¥ä¸¤ä¸ª0çåè½ 172 }); 173 } else { 174 $('#countdownDiv').hide(); 175 $('#countdown').hide(); 176 $('#startupDiv').show(); 177 $('#startup').show(); 178 $('#startupDiv .u-bg-number').html(day); 179 } 180 181 // åºé¦äº¤äº 182 $(document).on('mousemove', '.j-legend-list li', function(e) { 183 let exhibition = $(this).data('exhibition'); 184 $('.j-exhibition-tab .u-tab-ct').removeClass('z-crt'); 185 $('.j-exhibition-tab .u-tab-ct[data-exhibition="' + exhibition + '"]').addClass('z-crt'); 186 }); 187 188 $(document).on('click', '#exhibition polygon', function(e) { 189 e.preventDefault(); 190 let url = $(this).data('url'); 191 window.open(url); 192 }).on('mousemove', '#exhibition polygon', function(e) { 193 let exhibition = $(this).data('exhibition'); 194 $('.j-exhibition-tab .u-tab-ct').removeClass('z-crt'); 195 $('.j-exhibition-tab .u-tab-ct[data-exhibition="' + exhibition + '"]').addClass('z-crt'); 196 }); 197 198 // è¿åå°å¾åæ¢ 199 $(".j-accordion-map").slide({ 200 titCell:".u-tit", 201 targetCell:".u-item-list", 202 defaultIndex:0, 203 effect:"slideDown", 204 delayTime:300, 205 trigger:"click", 206 titOnClassName:"z-crt" 207 }); 208 209 // æé£ç´ææ 210 $(document).on('mouseenter','.j-accordion-list li', function () { 211 const that = $(this), 212 url = that.data('img'); 213 that.addClass('z-crt').siblings().removeClass('z-crt'); 214 that.parents('.m-accordion-box').css('background-image', `url(${url})`); 215 }); 216 217 // 第ä¸å±åç¬å¤ç 218 $(document).on('click','.j-accordion-list li.j-seventh', function (e) { 219 e.preventDefault(); 220 var top = $('#mainBox').offset().top; 221 $('html, body').animate({scrollTop: top},800); 222 }); 223 224 // å¤åè¯è¿åè°ç¨ 225 initForeignSwipers('.j-foreign-swiper1'); //åç¬¦ä¸²åæ°é»è®¤4ç§ 226 initForeignSwipers('.j-foreign-swiper2'); 227 initForeignSwipers('.j-foreign-swiper3'); 228 initForeignSwipers({ selector: '.j-foreign-swiper4', time: 2000 }); //å¯¹è±¡åæ°å¯ä¼ å ¥æ»å¨é´éæ¶é´ 229 230})
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.