...
|
...
|
@@ -11,12 +11,10 @@ var $ = require('yoho-jquery'), |
|
|
|
|
|
require('./detail/page-render')(function() {
|
|
|
var $discountFolder = $('.goods-discount .discount-folder'),
|
|
|
$discountArrow = $('.goods-discount .first-item span'),
|
|
|
$bannerSwiper = $('.banner-swiper');
|
|
|
$discountArrow = $('.goods-discount .first-item span');
|
|
|
|
|
|
var goodsDiscountEl = document.getElementById('goodsDiscount'),
|
|
|
goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl),
|
|
|
bannerSwiperHammer = new Hammer($bannerSwiper[0]),
|
|
|
$discountFirstItem = $(goodsDiscountEl).find('.first-item');
|
|
|
|
|
|
var $cart = $('.cart-bar');
|
...
|
...
|
@@ -59,10 +57,14 @@ require('./detail/page-render')(function() { |
|
|
prevButton: '.my-swiper-button-prev',
|
|
|
spaceBetween: 3
|
|
|
});
|
|
|
bannerSwiperHammer.on('tap', function() {
|
|
|
$('.banner-top').toggleClass('hover');
|
|
|
swiper.onResize();
|
|
|
})
|
|
|
if ($('.banner-swiper').length) {
|
|
|
var bannerSwiperHammer = new Hammer($('.banner-swiper')[0])
|
|
|
bannerSwiperHammer.on('tap', function() {
|
|
|
$('.banner-top').toggleClass('hover');
|
|
|
swiper.onResize();
|
|
|
})
|
|
|
}
|
|
|
|
|
|
|
|
|
// 初始化goods-discount
|
|
|
if ($discountFolder.children().length === 0) {
|
...
|
...
|
|