|
@@ -10,6 +10,7 @@ const library = '../../../library'; |
|
@@ -10,6 +10,7 @@ const library = '../../../library'; |
10
|
const utils = '../../../utils';
|
10
|
const utils = '../../../utils';
|
11
|
const API = require(`${library}/api`).API;
|
11
|
const API = require(`${library}/api`).API;
|
12
|
const api = new API();
|
12
|
const api = new API();
|
|
|
13
|
+const list = require('./list');
|
13
|
const saleApi = require('./sale-api');
|
14
|
const saleApi = require('./sale-api');
|
14
|
const outletsProcess = require('./outlets-handler');
|
15
|
const outletsProcess = require('./outlets-handler');
|
15
|
const outletsApi = require('./outlets-api');
|
16
|
const outletsApi = require('./outlets-api');
|
|
@@ -130,7 +131,7 @@ exports.getOutletsChannelData = (params) => { |
|
@@ -130,7 +131,7 @@ exports.getOutletsChannelData = (params) => { |
130
|
* @return {[type]}
|
131
|
* @return {[type]}
|
131
|
*/
|
132
|
*/
|
132
|
exports.getOutletsSpecialData = (params) => {
|
133
|
exports.getOutletsSpecialData = (params) => {
|
133
|
- return Promise.all([
|
134
|
+ return api.all([
|
134
|
headerModel.requestHeaderData('outlets'),
|
135
|
headerModel.requestHeaderData('outlets'),
|
135
|
outletsApi.getOutletsActivityOrigin({
|
136
|
outletsApi.getOutletsActivityOrigin({
|
136
|
id: params.id
|
137
|
id: params.id
|
|
@@ -143,6 +144,17 @@ exports.getOutletsSpecialData = (params) => { |
|
@@ -143,6 +144,17 @@ exports.getOutletsSpecialData = (params) => { |
143
|
delete specialData.pageErr;
|
144
|
delete specialData.pageErr;
|
144
|
Object.assign(specialData,
|
145
|
Object.assign(specialData,
|
145
|
outletsProcess.handleOutletsSpecilData(result[1].data[0]));
|
146
|
outletsProcess.handleOutletsSpecilData(result[1].data[0]));
|
|
|
147
|
+
|
|
|
148
|
+ return api.all([
|
|
|
149
|
+ list.getSaleOthersData({
|
|
|
150
|
+ productPool: result[1].data[0].productPoolId,
|
|
|
151
|
+ saleType: 4
|
|
|
152
|
+ })
|
|
|
153
|
+ ]).then(data => {
|
|
|
154
|
+ specialData.specialHead.count = data[0].totalCount;
|
|
|
155
|
+ Object.assign(specialData, data[0]);
|
|
|
156
|
+ return specialData;
|
|
|
157
|
+ });
|
146
|
}
|
158
|
}
|
147
|
|
159
|
|
148
|
return specialData;
|
160
|
return specialData;
|