Authored by yyq

fix

... ... @@ -88,7 +88,7 @@ module.exports = class extends global.yoho.BaseModel {
ensureHandleModel.handleViewPrice(result.data.promotion_formula_list);
}
result.data = Object.assign(result.data, ensureHandleModel.handleUseYohoCoin(result.data));
result.data = Object.assign(result.data || {}, ensureHandleModel.handleUseYohoCoin(result.data));
}
return result;
... ...
... ... @@ -406,17 +406,19 @@ function getSaleDiscountData(params, channel) {
}
}
let productPool = _.get(result, '[1].data[0].product_pool');
// 这里把 channel 全都处理掉,因为根据channel查小分类,而传入商品池时,不需要
return Promise.all([
this.saleApi.getSaleGoodsList({
channel: null,
saleType: '3',
limit: '1',
productPool: result[1].data[0].product_pool
productPool: productPool
}),
this.saleApi.getSaleGoodsList(Object.assign({}, params, {
channel: null,
productPool: result[1].data[0].product_pool
productPool: productPool
}))
]).then(subResult => {
// 删除无用参数
... ...