Commit c22d653e by halweg

fix: 缩略图翻页效果

parent 360ccffc
......@@ -349,6 +349,7 @@ $imagesBlock = $helper->getReviewImagesBlock(15, $block->getProductId());
.modal-reviews-details__image-thumbs {
margin-top: 14px;
overflow: hidden;
}
.image-thumbs-list {
......@@ -364,7 +365,6 @@ $imagesBlock = $helper->getReviewImagesBlock(15, $block->getProductId());
transition-property: transform,-webkit-transform;
-webkit-box-sizing: content-box;
box-sizing: content-box;
overflow: hidden;
}
.swiper-item {
......@@ -470,7 +470,6 @@ $imagesBlock = $helper->getReviewImagesBlock(15, $block->getProductId());
overflow: hidden;
border: 1px solid #efefef;
}
</style>
<div class="joshine-model-warp joshine-hidden">
......@@ -577,6 +576,7 @@ $imagesBlock = $helper->getReviewImagesBlock(15, $block->getProductId());
// 节流锁
var lock = true;
var swiper_wrapper = $('.swiper-wrapper');
var swiper_thumbs = $('.image-thumbs-list');
var reviewList;
function processReview(review) {
......@@ -701,6 +701,10 @@ $imagesBlock = $helper->getReviewImagesBlock(15, $block->getProductId());
}
$(element).removeClass('active');
});
let thumbPage = parseInt(img_idx / 11);
swiper_thumbs.css({"transition" : 'transform .2s ease 0s'});
swiper_thumbs.css({"transform" : 'translateX(' + -490 * thumbPage + 'px)'});
}
$(".swiper-button-next").on('click', function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment