Authored by ccbikai

商品详情页面优化

... ... @@ -157,7 +157,7 @@ const getSizeInfo = (sizeInfo) => {
dest.sizeInfo.detail.list.push(temp);
});
} else {
dest.sizeInfo.detail.list[0].params[0] = '';
dest.sizeInfo.detail.list[0] && (dest.sizeInfo.detail.list[0].params[0] = '');
}
}
... ...
... ... @@ -22,8 +22,10 @@ function hiddenTips($ele) {
if ($ele.length > 0) {
offsetContainer = $ele[0].getBoundingClientRect().right;
offsetLastColumn = $ele.find('.swiper-slide:last-child')[0].getBoundingClientRect().right;
if ($ele.find('.swiper-slide:last-child')[0]) {
offsetLastColumn = $ele.find('.swiper-slide:last-child')[0].getBoundingClientRect().right;
}
if (offsetLastColumn - offsetContainer < 0) {
$ele.next('.tips').css('display', 'none');
... ... @@ -119,4 +121,3 @@ function scrollHandler() {
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
... ...