|
@@ -78,19 +78,14 @@ class WaterfallIndexScene extends scene {
|
|
|
let container = document.getElementById('advert-carousel');
|
|
|
container.innerHTML = swiperHTML;
|
|
|
// 创建swiper对象
|
|
|
- if (!this.advertSwiper) {
|
|
|
- this.advertSwiper = new Swiper('.swiper-container-advert', {
|
|
|
- direction: 'horizontal',
|
|
|
- autoplay: true,
|
|
|
- pagination: {
|
|
|
- el: '.swiper-pagination-advert',
|
|
|
- bulletElement: 'li',
|
|
|
- },
|
|
|
- });
|
|
|
- // 更新swiper对象
|
|
|
- } else {
|
|
|
- this.advertSwiper.updateSlides();
|
|
|
- }
|
|
|
+ this.advertSwiper = new Swiper('.swiper-container-advert', {
|
|
|
+ direction: 'horizontal',
|
|
|
+ autoplay: true,
|
|
|
+ pagination: {
|
|
|
+ el: '.swiper-pagination-advert',
|
|
|
+ bulletElement: 'li',
|
|
|
+ },
|
|
|
+ });
|
|
|
this.moye.root.reRender();
|
|
|
}
|
|
|
|