...
|
...
|
@@ -180,36 +180,33 @@ exports.getOutletsChannelData = (params, channel) => { |
|
|
exports.getOutletsSpecialData = (params, channel) => {
|
|
|
return api.all([
|
|
|
headerModel.requestHeaderData('outlets'),
|
|
|
outletsApi.getOutletsActivityOrigin({
|
|
|
outletsApi.getOutletsActivityOrigin({ // 获取活动信息
|
|
|
id: params.id
|
|
|
})
|
|
|
]).then(result => {
|
|
|
let specialData = {};
|
|
|
|
|
|
specialData.headerData = {};
|
|
|
specialData.headerData = result[0].headerData;
|
|
|
specialData.headerData.header = true;
|
|
|
Object.assign(specialData, result[0]);
|
|
|
specialData.headerData.headType = 'outlets';
|
|
|
|
|
|
specialData.pageErr = true;
|
|
|
if (result[1].code === 200) {
|
|
|
delete specialData.pageErr;
|
|
|
Object.assign(specialData,
|
|
|
outletsProcess.handleOutletsSpecilData(result[1].data[0]));
|
|
|
|
|
|
return api.all([
|
|
|
list.getListData(Object.assign({
|
|
|
productPool: result[1].data[0].productPoolId,
|
|
|
saleType: 4
|
|
|
}, params), channel)
|
|
|
]).then(data => {
|
|
|
specialData.specialHead.count = data[0].totalCount;
|
|
|
Object.assign(specialData, data[0]);
|
|
|
return specialData;
|
|
|
});
|
|
|
if (result[1].code !== 200) {
|
|
|
// 活动信息获取异常
|
|
|
throw new Error('fail_to_get_special_info_with_ID:' + params.id);
|
|
|
}
|
|
|
|
|
|
return specialData;
|
|
|
Object.assign(specialData,
|
|
|
outletsProcess.handleOutletsSpecilData(result[1].data[0]));
|
|
|
|
|
|
return api.all([
|
|
|
list.getListData(Object.assign({
|
|
|
productPool: result[1].data[0].productPoolId,
|
|
|
saleType: 4
|
|
|
}, params), channel)
|
|
|
]).then(data => {
|
|
|
specialData.specialHead.count = data[0].totalCount;
|
|
|
Object.assign(specialData, data[0]);
|
|
|
return specialData;
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
|
...
|
...
|
|