Authored by biao

Merge branch 'hotfix/outlet'

... ... @@ -124,27 +124,29 @@ const _convertActicityData = (data) => {
data = data || [];
_.forEach(data, (item) => {
discountArr = item.promotionName.split('~');
if (discountArr.length === 1) {
discountNum = _transDiscountToArr(discountArr[0])[0];
discountText = _transDiscountToArr(discountArr[0])[1];
} else {
discountNum = discountArr[0] + '~' + _transDiscountToArr(discountArr[1])[0];
discountText = _transDiscountToArr(discountArr[1])[1];
if (item.promotionName) {
discountArr = item.promotionName.split('~');
if (discountArr.length === 1) {
discountNum = _transDiscountToArr(discountArr[0])[0];
discountText = _transDiscountToArr(discountArr[0])[1];
} else {
discountNum = discountArr[0] + '~' + _transDiscountToArr(discountArr[1])[0];
discountText = _transDiscountToArr(discountArr[1])[1];
}
formatData.push({
activityUrl: '/product/outlet/activity?id=' + item.id,
coverUrl: item.coverUrl,
logoUrl: item.logoUrl,
title: item.title,
discountNum: discountNum,
discountText: discountText,
productPoolId: item.productPoolId || '',
leftTime: item.startLeftTime > 0 ? dateFormate(item.startTime) : item.endLeftTime,
hide: false
});
}
formatData.push({
activityUrl: '/product/outlet/activity?id=' + item.id,
coverUrl: item.coverUrl,
logoUrl: item.logoUrl,
title: item.title,
discountNum: discountNum,
discountText: discountText,
productPoolId: item.productPoolId || '',
leftTime: item.startLeftTime > 0 ? dateFormate(item.startTime) : item.endLeftTime,
hide: false
});
});
return formatData;
... ...