Authored by hf

Merge branch 'test' of http://git.dev.yoho.cn/web/yohobuy into test

... ... @@ -4728,13 +4728,27 @@ var goodsSwiper,
$discountFolder = $('.goodsDiscount .discount-folder'),
$discountArrow = $('.goodsDiscount .first-item span');
var goodsDiscountHammer = new Hammer(document.getElementById('goodsDiscount'));
var goodsDiscountEl = document.getElementById('goodsDiscount'),
goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl);
require("js/product/detail/desc");
require("js/product/detail/comments-consults");
//add extra marign-bottom for footer to show the yoho copyright
window.reMarginFooter('.cart-bar');
function showFooter() {
var $cartBar = $('.cart-bar');
var timer = setInterval(function() {
if ($cartBar) {
window.reMarginFooter('.cart-bar');
clearInterval(timer);
} else {
$cartBar = $('.cart-bar');
}
}, 200);
}
showFooter();
lazyLoad($('img.lazy'));
... ... @@ -4756,19 +4770,23 @@ if (0 === $('.goodsDiscount .discount-folder').children().length) {
}
//goods-discount下拉按钮点击事件
goodsDiscountHammer.on('tap', function(e) {
if ($discountFolder.is(':hidden')) {
$discountArrow.removeClass('icon-down').addClass('icon-up').html('');
$discountFolder.slideDown();
} else {
$discountArrow.removeClass('icon-up').addClass('icon-down').html('');
$discountFolder.slideUp();
}
return false;
});
if (goodsDiscountHammer) {
goodsDiscountHammer.on('tap', function(e) {
if ($discountFolder.is(':hidden')) {
$discountArrow.removeClass('icon-down').addClass('icon-up').html('');
$discountFolder.slideDown();
} else {
$discountArrow.removeClass('icon-up').addClass('icon-down').html('');
$discountFolder.slideUp();
}
return false;
});
}
require("js/product/detail/like");
});
define("js/product/detail/desc", ["jquery","lazyload","swiper","index"], function(require, exports, module){
/**
... ...
This diff could not be displayed because it is too large.
... ... @@ -31,7 +31,7 @@ class DetailModel
if (is_numeric($productId) && is_numeric($goodsId)) {
// 调用服务
$baseInfo = DetailData::baseInfo($productId, $uid); var_dump($baseInfo);
$baseInfo = DetailData::baseInfo($productId, $uid);
// 判断商品是否在架
if (empty($baseInfo['status'])) {
... ...