Authored by mali

Merge branch 'feature/ufo-h5-share' into dev

No preview for this file type
This diff could not be displayed because it is too large.
... ... @@ -58,11 +58,11 @@ a {
.goods-detail-page .swiper-container {
width: 18.75rem;
height: 18.75rem;
}
.goods-detail-page .swiper-container img {
width: 100%;
height: 18.75rem;
}
.goods-detail-page .goods-title {
... ...
... ... @@ -99,21 +99,25 @@
$('title').html(data.product_name || '商品详情');
goodsList.image_list.map(function(item) {
$('.swiper-wrapper').append('<div class="swiper-slide"><img src="' + item.image_url + '"></div>');
if(item.image_url) {
$('.swiper-wrapper').append('<div class="swiper-slide"><img src="' + item.image_url + '"></div>');
}
});
new Swiper('.swiper-container', {
autoplay: true,
pagination: {
el: '.swiper-pagination',
type: 'fraction',
renderFraction: function (currentClass, totalClass) {
return '<span class="' + currentClass + '"></span>' +
'|' +
'<span class="' + totalClass + '"></span>';
if ($('.swiper-slide').length > 0) {
new Swiper('.swiper-container', {
autoplay: true,
pagination: {
el: '.swiper-pagination',
type: 'fraction',
renderFraction: function (currentClass, totalClass) {
return '<span class="' + currentClass + '"></span>' +
'|' +
'<span class="' + totalClass + '"></span>';
}
}
}
});
});
}
}
})
});
... ...