|
@@ -2,7 +2,7 @@ |
|
@@ -2,7 +2,7 @@ |
2
|
* @Author: Targaryen
|
2
|
* @Author: Targaryen
|
3
|
* @Date: 2016-05-30 16:20:03
|
3
|
* @Date: 2016-05-30 16:20:03
|
4
|
* @Last Modified by: Targaryen
|
4
|
* @Last Modified by: Targaryen
|
5
|
- * @Last Modified time: 2016-06-08 14:19:17
|
5
|
+ * @Last Modified time: 2016-06-08 14:54:51
|
6
|
*/
|
6
|
*/
|
7
|
|
7
|
|
8
|
'use strict';
|
8
|
'use strict';
|
|
@@ -16,6 +16,7 @@ const outletsProcess = require('./outlets-handler'); |
|
@@ -16,6 +16,7 @@ const outletsProcess = require('./outlets-handler'); |
16
|
const outletsApi = require('./outlets-api');
|
16
|
const outletsApi = require('./outlets-api');
|
17
|
const productProcess = require(`${utils}/product-process`);
|
17
|
const productProcess = require(`${utils}/product-process`);
|
18
|
const headerModel = require('../../../doraemon/models/header');
|
18
|
const headerModel = require('../../../doraemon/models/header');
|
|
|
19
|
+const _ = require('lodash');
|
19
|
|
20
|
|
20
|
const publicHandler = require('./public-handler');
|
21
|
const publicHandler = require('./public-handler');
|
21
|
|
22
|
|
|
@@ -182,12 +183,15 @@ exports.getOutletsCategoryData = (params, channel) => { |
|
@@ -182,12 +183,15 @@ exports.getOutletsCategoryData = (params, channel) => { |
182
|
let finalResult = result[0];
|
183
|
let finalResult = result[0];
|
183
|
|
184
|
|
184
|
return api.all([
|
185
|
return api.all([
|
185
|
- list.getSaleOthersData(params, channel),
|
|
|
186
|
- saleApi.getSaleBannerList(channelCode.index)
|
186
|
+ list.getSaleOthersData(params, channel)
|
187
|
]).then(listResult => {
|
187
|
]).then(listResult => {
|
188
|
finalResult.saleList = listResult[0];
|
188
|
finalResult.saleList = listResult[0];
|
189
|
- if (listResult[1].code === 200) {
|
|
|
190
|
- finalResult.saleList.topBanner = publicHandler.handleBannerData(listResult[1].data);
|
189
|
+ console.log(params);
|
|
|
190
|
+ if (!_.isEmpty(params.bannerImage)) {
|
|
|
191
|
+ finalResult.saleList.topBanner = {};
|
|
|
192
|
+ finalResult.saleList.topBanner.list = [];
|
|
|
193
|
+ finalResult.saleList.topBanner.list[0] = {};
|
|
|
194
|
+ finalResult.saleList.topBanner.list[0].img = params.bannerImage;
|
191
|
}
|
195
|
}
|
192
|
return finalResult;
|
196
|
return finalResult;
|
193
|
});
|
197
|
});
|