...
|
...
|
@@ -80,7 +80,7 @@ exports.handleSaleActivityData = (origin, channel) => { |
|
|
normal: []
|
|
|
};
|
|
|
|
|
|
_.forEach(origin, function(value, key) {
|
|
|
_.forEach(origin, function (value, key) {
|
|
|
let activity = {
|
|
|
link: helpers.urlFormat('/product/sale/discount/detail', {id: value.id, channel: channel}),
|
|
|
img: value.web_cover_url,
|
...
|
...
|
@@ -127,9 +127,9 @@ exports.handleSaleBannerData = (origin) => { |
|
|
list: []
|
|
|
};
|
|
|
|
|
|
_.forEach(origin, function(value) {
|
|
|
_.forEach(origin, function (value) {
|
|
|
if (value.template_name === 'focus') {
|
|
|
_.forEach(value.data, function(subValue) {
|
|
|
_.forEach(value.data, function (subValue) {
|
|
|
let banner = {
|
|
|
bannerHeight: 450,
|
|
|
href: subValue.url,
|
...
|
...
|
@@ -153,9 +153,9 @@ exports.handleSaleBannerSmallData = (origin) => { |
|
|
let dest = [];
|
|
|
let count = 0;
|
|
|
|
|
|
_.forEach(origin, function(value) {
|
|
|
_.forEach(origin, function (value) {
|
|
|
if (value.template_name === 'threePicture') {
|
|
|
_.forEach(value.data, function(picList) {
|
|
|
_.forEach(value.data, function (picList) {
|
|
|
if (count++ < 3) {
|
|
|
let smallPic = {
|
|
|
link: picList.url,
|
...
|
...
|
@@ -202,6 +202,7 @@ exports.handleSaleCategoryData = (origin, saleType, channel, breakingSizeSort) = |
|
|
urlLocation = {
|
|
|
url: '?saleType=' + saleType + '&order=s_t_desc&channel=' + channel +
|
|
|
'&breakSize=' + breakingSizeSort.breakSize + '&breakSort=' + breakingSizeSort.breakSort,
|
|
|
localUrl: '?saleType=' + saleType + '&order=s_t_desc&channel=' + channel,
|
|
|
limit: 14
|
|
|
};
|
|
|
break;
|
...
|
...
|
@@ -229,13 +230,21 @@ exports.handleSaleCategoryData = (origin, saleType, channel, breakingSizeSort) = |
|
|
_.forEach(origin, (value) => {
|
|
|
|
|
|
if (count++ < 4) {
|
|
|
let forBreakingUrl = '';
|
|
|
|
|
|
if (saleType === '1') {
|
|
|
forBreakingUrl = urlLocation.localUrl;
|
|
|
} else {
|
|
|
forBreakingUrl = urlLocation.url;
|
|
|
}
|
|
|
|
|
|
let nav = {
|
|
|
urlLocation: urlLocation.url + '&sort=' + value.relation_parameter.sort +
|
|
|
urlLocation: forBreakingUrl + '&sort=' + value.relation_parameter.sort +
|
|
|
`&limit=${(urlLocation.limit + 1)}`,
|
|
|
title: value.category_name,
|
|
|
newDiscount: true
|
|
|
};
|
|
|
|
|
|
|
|
|
dest.navItem.push(nav);
|
|
|
}
|
|
|
});
|
...
|
...
|
|