Authored by 李奇

详情页ssr修改

... ... @@ -64,6 +64,8 @@ const component = {
product.formatPrice = product.format_sales_price !== '0' ? product.format_sales_price : product.format_market_price;//eslint-disable-line
product.isDiscount = product.market_price > product.sales_price;
product.coverImage = product.goods_list[0].color_image;
res.render('pdetail', {
module: 'product',
page: 'detail',
... ...
... ... @@ -4,15 +4,11 @@
<div class="ssr show-box first-box">
<div class="image-swipe">
<div class="swipe-wrap">
<div class="swiper-container swiper-container-horizontal">
<div class="ssr-swiper-container">
<div class="swiper-wrapper">
{{#each goods_list}}
{{#if color_image}}
<div class="swiper-slide" style="width: 300px;" data-swiper-slide-index="0">
<img width="100%" src="{{image2 color_image w=580 h=770 q=80}}/interlace/1">
<div class="ssr-swiper">
<img width="100%" src="{{image2 coverImage w=580 h=770 q=80}}/interlace/1">
</div>
{{/if}}
{{/each}}
</div>
</div>
</div>
... ...
... ... @@ -25,7 +25,7 @@ yoho.ready(() => {
if (ssrs) {
ssrs.remove();
}
}, 500);
}, 100);
}
});
});
... ...
... ... @@ -112,6 +112,28 @@
};
</script>
<style>
#ssr {
.ssr-swiper-container {
background-color: #f7f7f7;
}
.ssr-swiper {
width: 620px;
padding: 0 20px;
background-color: #fff;
transform: translateX(590px);
font-size: 0;
img {
width: 580px;
height: 700px;
}
}
}
.image-swipe {
overflow: hidden;
... ...