Authored by 张丽霞

sale二期增加奥莱入口,折扣专区小图不展示折扣类别

... ... @@ -144,7 +144,7 @@ exports.handleSaleBannerData = (origin) => {
};
/**
* 处理首页 banner 小图 只取前三张
* 处理首页 banner 小图 threePicture楼层和small_pic楼层都去一遍,产品确认只会有一个接口有数据
* @param origin 要处理的原始数据
* @returns {Array}
*/
... ... @@ -153,9 +153,11 @@ exports.handleSaleBannerSmallData = (origin) => {
let count = 0;
_.forEach(origin, function(value) {
if (value.template_name === 'threePicture') {
_.forEach(value.data, function(picList) {
if (count++ < 3) {
console.log(count);
let smallPic = {
link: picList.url,
icon: picList.src,
... ... @@ -167,6 +169,23 @@ exports.handleSaleBannerSmallData = (origin) => {
}
});
}
if (count === 0) {
if (value.template_name === 'small_pic') {
_.forEach(value.data, function(picList) {
if (count++ < 4) {
let smallPic = {
link: picList.url,
icon: picList.src,
title: picList.title,
desc: picList.alt
};
dest.push(smallPic);
}
});
}
}
});
return dest;
... ...
... ... @@ -32,7 +32,7 @@
<a class="item pull-left" href="{{link}}" target= "_blank">
<img class="pic" src="{{image img 350 350}}">
<div class="detail">
<div class="title">{{title}}{{discount}}{{discountText}}</div>
<div class="title">{{title}}</div>
<div class="time">{{time}}</div>
</div>
</a>
... ...
... ... @@ -389,3 +389,13 @@ $('.senior-sub').on('click', '.multi-select', function() {
}).on('mouseleave', function() {
hideSeniorPanel();
});
// 资源位三张四张样式调整
(function rejustActivityEntryDisplay() {
var activityEntryNumb = $('.activity-entry').find('a').length,
activityItemWidth = (1150 - (activityEntryNumb - 1) * 10) / activityEntryNumb;
$('.activity-entry .entry-item').css('width', activityItemWidth);
}());
... ...
... ... @@ -85,18 +85,13 @@
.activity-entry {
margin: 10px 0;
width: 1170px;
width: 1150px;
.entry-item {
display: block;
width: 376px;
margin-right: 10px;
background: #f5f5f5;
&.first,
&.last {
width: 376px;
}
height: 88px;
&.last {
margin-right: 0;
... ...