Authored by htoooth

Merge branch 'feature/new-product-arrive' into gray

... ... @@ -228,24 +228,26 @@ $('#new-product-floor').on('click', '.catagory-navs li', function() {
*/
$(function() {
// 轮播数量不够隐藏左右箭头
var $swiper = $('#rec-swiper, #brand-swiper'),
recNum = $swiper.find('.swiper-wrapper > .swiper-slide').length,
$prev = $swiper.find('.prev'),
$next = $swiper.find('.next');
var $recSwiper = $('#rec-swiper'),
$brandSwiper = $('#brand-swiper'),
recNum = $recSwiper.find('.swiper-wrapper > .swiper-slide').length,
brandNum = $brandSwiper.find('.swiper-wrapper > .swiper-slide').length;
if (recNum <= 6) {
$prev.addClass('hide');
$next.addClass('hide');
$recSwiper.find('.prev,.next').addClass('hide');
}
if (brandNum <= 6) {
$brandSwiper.find('.prev,.next').addClass('hide');
}
SwiperSingle.getSwiperWidth($('#rec-swiper'));//初始化宽度
SwiperSingle.getSwiperWidth($('#brand-swiper'));//初始化宽度
$next.on('click', function () {
$('.next').on('click', function () {
SwiperSingle.next($(this).parent());
});
$prev.on('click', function () {
$('.prev').on('click', function () {
SwiperSingle.prev($(this).parent());
});
... ...