...
|
...
|
@@ -49,7 +49,7 @@ const contentCode = contentCodeConfig.sale; |
|
|
* @param {[array]} list
|
|
|
* @return {[array]}
|
|
|
*/
|
|
|
const _processDiscount = (list, channel) => {
|
|
|
const _processDiscount = (list) => {
|
|
|
const formatData = [];
|
|
|
let flag = true;
|
|
|
|
...
|
...
|
@@ -63,7 +63,6 @@ const _processDiscount = (list, channel) => { |
|
|
|
|
|
_.forEach(list, (data) => {
|
|
|
if (flag === true) {
|
|
|
data.specialUrl = `/product/sale/discount/detail?id=${data.id}&channel=${channel}`;
|
|
|
Object.assign(data, processTime(data.leftTime));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -84,7 +83,7 @@ const _discount = (params) => { |
|
|
return api.get('', Object.assign({
|
|
|
method: 'app.activity.get',
|
|
|
sort: 2,
|
|
|
plateform: 3
|
|
|
plateform: 2
|
|
|
}, params));
|
|
|
};
|
|
|
|
...
|
...
|
@@ -300,14 +299,13 @@ const getBreakCodeData = (params) => { |
|
|
* @return {[object]}
|
|
|
*/
|
|
|
const getDiscountData = (yhChannel) => {
|
|
|
const discountData = {};
|
|
|
|
|
|
return _discount({
|
|
|
yh_channel: channelType[yhChannel] || '1'
|
|
|
}).then((result) => {
|
|
|
if (result && result.code === 200) {
|
|
|
discountData.data = _processDiscount(result.data, yhChannel);
|
|
|
return discountData;
|
|
|
return {
|
|
|
list: _processDiscount(result.data)
|
|
|
};
|
|
|
} else {
|
|
|
logger.error('折扣专场专题列表返回 code 不是 200');
|
|
|
return {};
|
...
|
...
|
|