Authored by Rock Zhang

更新到201512051405静态资源

@@ -4728,13 +4728,27 @@ var goodsSwiper, @@ -4728,13 +4728,27 @@ var goodsSwiper,
4728 $discountFolder = $('.goodsDiscount .discount-folder'), 4728 $discountFolder = $('.goodsDiscount .discount-folder'),
4729 $discountArrow = $('.goodsDiscount .first-item span'); 4729 $discountArrow = $('.goodsDiscount .first-item span');
4730 4730
4731 -var goodsDiscountHammer = new Hammer(document.getElementById('goodsDiscount')); 4731 +var goodsDiscountEl = document.getElementById('goodsDiscount'),
  4732 + goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl);
4732 4733
4733 require("js/product/detail/desc"); 4734 require("js/product/detail/desc");
4734 require("js/product/detail/comments-consults"); 4735 require("js/product/detail/comments-consults");
4735 4736
4736 //add extra marign-bottom for footer to show the yoho copyright 4737 //add extra marign-bottom for footer to show the yoho copyright
4737 -window.reMarginFooter('.cart-bar'); 4738 +function showFooter() {
  4739 + var $cartBar = $('.cart-bar');
  4740 +
  4741 + var timer = setInterval(function() {
  4742 + if ($cartBar) {
  4743 + window.reMarginFooter('.cart-bar');
  4744 + clearInterval(timer);
  4745 + } else {
  4746 + $cartBar = $('.cart-bar');
  4747 + }
  4748 + }, 200);
  4749 +}
  4750 +
  4751 +showFooter();
4738 4752
4739 lazyLoad($('img.lazy')); 4753 lazyLoad($('img.lazy'));
4740 4754
@@ -4756,7 +4770,8 @@ if (0 === $('.goodsDiscount .discount-folder').children().length) { @@ -4756,7 +4770,8 @@ if (0 === $('.goodsDiscount .discount-folder').children().length) {
4756 } 4770 }
4757 4771
4758 //goods-discount下拉按钮点击事件 4772 //goods-discount下拉按钮点击事件
4759 -goodsDiscountHammer.on('tap', function(e) { 4773 +if (goodsDiscountHammer) {
  4774 + goodsDiscountHammer.on('tap', function(e) {
4760 if ($discountFolder.is(':hidden')) { 4775 if ($discountFolder.is(':hidden')) {
4761 $discountArrow.removeClass('icon-down').addClass('icon-up').html(''); 4776 $discountArrow.removeClass('icon-down').addClass('icon-up').html('');
4762 $discountFolder.slideDown(); 4777 $discountFolder.slideDown();
@@ -4765,10 +4780,13 @@ goodsDiscountHammer.on('tap', function(e) { @@ -4765,10 +4780,13 @@ goodsDiscountHammer.on('tap', function(e) {
4765 $discountFolder.slideUp(); 4780 $discountFolder.slideUp();
4766 } 4781 }
4767 return false; 4782 return false;
4768 -}); 4783 + });
  4784 +}
  4785 +
4769 4786
4770 require("js/product/detail/like"); 4787 require("js/product/detail/like");
4771 4788
  4789 +
4772 }); 4790 });
4773 define("js/product/detail/desc", ["jquery","lazyload","swiper","index"], function(require, exports, module){ 4791 define("js/product/detail/desc", ["jquery","lazyload","swiper","index"], function(require, exports, module){
4774 /** 4792 /**
This diff could not be displayed because it is too large.