Showing
1 changed file
with
19 additions
and
2 deletions
@@ -9,6 +9,7 @@ const camelCase = global.yoho.camelCase; | @@ -9,6 +9,7 @@ const camelCase = global.yoho.camelCase; | ||
9 | const _ = require('lodash'); | 9 | const _ = require('lodash'); |
10 | const helpers = global.yoho.helpers; | 10 | const helpers = global.yoho.helpers; |
11 | const api = global.yoho.API; | 11 | const api = global.yoho.API; |
12 | +const searchModel = require('./search'); | ||
12 | 13 | ||
13 | /* 多品牌店铺列表数据信息处理*/ | 14 | /* 多品牌店铺列表数据信息处理*/ |
14 | const _processBrandShops = (list) => { | 15 | const _processBrandShops = (list) => { |
@@ -374,7 +375,22 @@ const getShopData = (req, shopId, uid, isApp) => { | @@ -374,7 +375,22 @@ const getShopData = (req, shopId, uid, isApp) => { | ||
374 | let shopData = {}; | 375 | let shopData = {}; |
375 | let channel = req.yoho.channel; | 376 | let channel = req.yoho.channel; |
376 | 377 | ||
377 | - return Promise.all([_getShopDecorator(shopId), _getShopInfo(shopId, uid)]).then((result) => { | 378 | + return Promise.all([ |
379 | + _getShopDecorator(shopId), | ||
380 | + _getShopInfo(shopId, uid), | ||
381 | + searchModel.getFilterData({ | ||
382 | + shop_id: shopId, | ||
383 | + gender: '1,3', // TODO TAR 获取性别 | ||
384 | + channel: channel, | ||
385 | + brand: '' // TODO TAR 获取品牌 | ||
386 | + }), | ||
387 | + searchModel.getSearchData({ | ||
388 | + shop_id: shopId, | ||
389 | + gender: '1,3', // TODO TAR 获取性别 | ||
390 | + channel: channel, | ||
391 | + brand: '' // TODO TAR 获取品牌 | ||
392 | + }) | ||
393 | + ]).then((result) => { | ||
378 | shopData = { | 394 | shopData = { |
379 | decorator: result[0], // 店铺装修资源数据 | 395 | decorator: result[0], // 店铺装修资源数据 |
380 | shopInfo: result[1] // 店铺信息 | 396 | shopInfo: result[1] // 店铺信息 |
@@ -394,7 +410,8 @@ const getShopData = (req, shopId, uid, isApp) => { | @@ -394,7 +410,8 @@ const getShopData = (req, shopId, uid, isApp) => { | ||
394 | }, shopData); | 410 | }, shopData); |
395 | 411 | ||
396 | // noinspection JSCheckFunctionSignatures | 412 | // noinspection JSCheckFunctionSignatures |
397 | - return _formShopData(shopData, shopId, isApp); // 组织楼层数据 | 413 | + return Object.assign(_formShopData(shopData, shopId, isApp), |
414 | + {filter: result[2]}, {goods: result[3]}); // TODO TAR 获取筛选数据和商品数据数据校验 | ||
398 | }); | 415 | }); |
399 | }); | 416 | }); |
400 | }; | 417 | }; |
-
Please register or login to post a comment