Authored by Lynnic

为您优选未返回数据时外层容器隐藏 --code viewed by bikai

... ... @@ -81,4 +81,8 @@ $.ajax({
}
});
if ($('.good-detail-page').length > 0) {
$('#yoho-footer').css('border-top', '1px solid #e0e0e0');
}
require('./like');
... ...
... ... @@ -14,15 +14,19 @@ var recommendSwiper,
if (preferenceUrl) {
$.get(preferenceUrl).then(function(html) {
$recommendForYou.html(html).show();
if ($('#swiper-recommend').length) {
recommendSwiper = new Swiper('#swiper-recommend', {
slidesPerView: 'auto',
grabCursor: true,
slideElement: 'a',
lazyLoading: true,
watchSlidesVisibility: true
});
if (html.length < 5) {
$recommendForYou.css('display', 'none');
} else {
$recommendForYou.html(html).show();
if ($('#swiper-recommend').length) {
recommendSwiper = new Swiper('#swiper-recommend', {
slidesPerView: 'auto',
grabCursor: true,
slideElement: 'a',
lazyLoading: true,
watchSlidesVisibility: true
});
}
}
}).fail(function() {
$recommendForYou.hide();
... ...
... ... @@ -46,7 +46,7 @@ $basicBtnC:#eb0313;
.column {
box-sizing: border-box;
//padding: pxToRem(20px) pxToRem(12px);
padding: 4% 3%;
padding: pxToRem(6px) 3%;
width: 49.9%;
border-bottom: pxToRem(4px) solid #fff;
border-right: pxToRem(4px) solid #fff;
... ... @@ -64,6 +64,20 @@ $basicBtnC:#eb0313;
flex-basis: 49.9%
))
}
.oldbox{
padding: pxToRem(6px) 3%;
width: 49.9%;
background-color: $tableCellC;
box-sizing: border-box;
border-bottom: 1px solid #fff;
border-right: 1px solid #fff;
width: 49.9%;
height: 100%;
float: left;
text-overflow:ellipsis;
white-space:nowrap;
overflow:hidden;
}
}
}
}
... ... @@ -390,6 +404,7 @@ $basicBtnC:#eb0313;
z-index: 2;
padding: pxToRem(20px) pxToRem(28px);
text-align: center;
border-top: 1px solid $borderC;
a {
display: inline-block;
&.num-incart {
... ... @@ -435,9 +450,9 @@ $basicBtnC:#eb0313;
}
}
}
// .recommend-for-you {
// margin-bottom: pxToRem(30px);
// }
.recommend-for-you{
border-bottom: none;
}
.yoho-tip{
top:40%;
}
... ...