...
|
...
|
@@ -6,11 +6,11 @@ |
|
|
var $ = require('yoho-jquery'),
|
|
|
Swiper = require('yoho-swiper'),
|
|
|
Hammer = require('yoho-hammer'),
|
|
|
lazyLoad = require('yoho-jquery-lazyload'),
|
|
|
commonJS = require('../common');
|
|
|
lazyLoad = require('yoho-jquery-lazyload');
|
|
|
|
|
|
var goodsSwiper,
|
|
|
$discountFolder = $('.goodsDiscount .discount-folder'),
|
|
|
// commonJS = require('../common');
|
|
|
|
|
|
var $discountFolder = $('.goodsDiscount .discount-folder'),
|
|
|
$discountArrow = $('.goodsDiscount .first-item span');
|
|
|
|
|
|
var goodsDiscountEl = document.getElementById('goodsDiscount'),
|
...
|
...
|
@@ -40,7 +40,7 @@ function showFooter() { |
|
|
|
|
|
showFooter();
|
|
|
|
|
|
require('./like');
|
|
|
require('./detail/like');
|
|
|
|
|
|
lazyLoad($('img.lazy'));
|
|
|
|
...
|
...
|
@@ -49,7 +49,7 @@ if ($('#goodsDiscount h1').length < 1) { |
|
|
}
|
|
|
|
|
|
// 顶部swiper
|
|
|
goodsSwiper = new Swiper('.banner-swiper', {
|
|
|
new Swiper('.banner-swiper', {
|
|
|
lazyLoading: true,
|
|
|
lazyLoadingInPrevNext: true,
|
|
|
paginationClickable: true,
|
...
|
...
|
@@ -59,7 +59,6 @@ goodsSwiper = new Swiper('.banner-swiper', { |
|
|
spaceBetween: 3
|
|
|
});
|
|
|
|
|
|
|
|
|
// 初始化goods-discount
|
|
|
if ($discountFolder.children().length === 0) {
|
|
|
$discountFolder.css('display', 'none');
|
...
|
...
|
@@ -113,18 +112,18 @@ $('#limit-sale').on('touchend', function(e) { |
|
|
|
|
|
}, undefined, true);
|
|
|
|
|
|
$('.dialog-wrapper').off('touchstart').on('touchstart', function(e) {
|
|
|
e.stopPropagation();
|
|
|
if ($(e.target).hasClass('dialog-wrapper')) {
|
|
|
$('.dialog-wrapper').off('touchstart').on('touchstart', function(para) {
|
|
|
para.stopPropagation();
|
|
|
if ($(para.target).hasClass('dialog-wrapper')) {
|
|
|
dialog.hideDialog();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
require('./desc');
|
|
|
require('./comments-consults');
|
|
|
require('../recommend-for-you-product-desc');
|
|
|
require('./detail/desc');
|
|
|
require('./detail/comments-consults');
|
|
|
require('./detail/recommend-for-you-product-desc');
|
|
|
|
|
|
// 购物车商品数量
|
|
|
$.ajax({
|
...
|
...
|
|