Authored by htoooth

Merge branch 'feature/promotion-list' into gray

... ... @@ -92,6 +92,12 @@ exports.index = (req, res, next) => {
if (_.isEmpty(_.get(resData, 'list.goods', []))) {
res.set('Cache-Control', 'no-cache');
}
// 商品详情页跳转过来带参数
if (req.query.phrase) {
resData.list.phrase = decodeURIComponent(req.query.phrase);
}
res.render('list/index', resData);
}).catch(next);
};
... ...
... ... @@ -214,11 +214,15 @@ const _getBundleAsync = (result) => {
};
const _getActivityDataByProductBaseInfo = (data) => {
return _.get(data, 'data', []).map(value => ({
type: value.promotionType.replace(/¥/g, '¥'),
des: value.promotionTitle.replace(/¥/g, '¥'),
url: value.id && helpers.urlFormat('', {psp_id: value.id}, 'list')
}));
return _.get(data, 'data', []).map(value => {
let des = value.promotionTitle.replace(/¥/g, '¥');
return {
type: value.promotionType.replace(/¥/g, '¥'),
des: des,
url: value.id && helpers.urlFormat('', {psp_id: value.id, phrase: encodeURIComponent(des)}, 'list')
};
});
};
/**
... ...
... ... @@ -3,6 +3,12 @@
{{> product/filter-box}}
{{/ filters}}
{{#if phrase}}
<div class="phrase">
以下商品参加 {{phrase}}
</div>
{{/if}}
{{# opts}}
<div class="sort-pager">
{{# sortType}}
... ...
... ... @@ -1371,6 +1371,7 @@
img {
max-width: 100%;
margin-bottom: 10px;
}
.img-responsive {
... ...
... ... @@ -15,6 +15,13 @@
width: 970px;
}
.phrase {
text-align: center;
font-size: 18px;
height: 50px;
line-height: 50px;
}
.brand-banner {
position: relative;
... ...