sale.page.js 853 Bytes
/**
 * 商品列表页
 * @author: wsl<shuiling.wang@yoho.cn>
 * @date: 2016/5/17
 */

var $ = require('yoho-jquery'),
    Swiper = require('yoho-swiper');

var search = require('./sale/search');

require('../common');

search.start();

$('.swiper-container').each(function() {
    if ($(this).find('.swiper-slide').length > 1) {
        new Swiper($(this).get(0), {
            lazyLoading: true,
            lazyLoadingInPrevNext: true,
            loop: true,
            autoplay: 3000,
            autoplayDisableOnInteraction: true,
            paginationClickable: true,
            pagination: $(this).closest('.banner-top').find('.pagination-inner').get(0)
        });
    }
});

$(function() {
    var $saleNavSelect = $('.sale-nav-select');

    $('.sale-nav').on('click', function() {
        $saleNavSelect.toggleClass('show');
    });
});