var swiper = new Swiper(".swiper-screen", { pagination: { el: '.swiper-pagination-screen', // type: 'fraction', // renderFraction: function (currentClass, totalClass) { // return '' + // 'of' + ''; type: 'custom', renderCustom: function (swiper, current, total) { if (total < 10) { return '0' + current + '' + '|' + '' + '0' + total + ''; } else if (current < 10) { return '0' + current + '' + '|' + total+'';} else { return ''+ current + '' + '|' + '' + '' + total+'';} // return current + ' | ' + total+''; } }, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", }, }); var swiper = new Swiper(".swiper-news", { pagination: { // noSwiping: true, el: '.swiper-pagination', type: 'bullets', clickable: true, renderBullet: function (index, className) { return '' + (index + 1) + ''; }, renderBullet: function (index, className) { switch(index){ case 0:text='鑽f槍鍔ㄦ€?;break; case 1:text='濯掍綋鎶ラ亾';break; case 2:text='鑽f槍鍏憡';break; } return '' + '

' + text + '

' + '
'; }, }, }); var swiper = new Swiper(".swiper-product", { speed: 700, slidesPerView: 'auto', centeredSlides: true, allowTouchMove: true, spaceBetween: 20, navigation: { nextEl: ".product-btn-next", prevEl: ".product-btn-prev", }, pagination: { noSwiping: true, el: '.swiper-pagination', type: 'bullets', centeredSlides:true, clickable: true, loop:true, renderBullet: function (index, className) { return '' + (index + 1) + ''; }, renderBullet: function (index, className) { switch(index){ // case 0:text='浜у搧涓績';break; case 0:text='鑲涜偁绫?;break; case 1:text='绁炵粡绮剧绫?;break; case 2:text='琛ョ泭绫?;break; case 3:text='蹇冭剳琛€绠$被';break; case 4:text='鎰熷啋绫?;break; case 5:text='鑳冭偁绫?;break; case 6:text='濡囩绫?;break; case 7:text='鍎跨绫?;break; case 8:text='鍏朵粬';break; } return '' + '

' + text + '

' + '
'; }, }, });