...
|
...
|
@@ -9,6 +9,7 @@ const camelCase = global.yoho.camelCase; |
|
|
const _ = require('lodash');
|
|
|
const helpers = global.yoho.helpers;
|
|
|
const api = global.yoho.API;
|
|
|
const searchModel = require('./search');
|
|
|
|
|
|
/* 多品牌店铺列表数据信息处理*/
|
|
|
const _processBrandShops = (list) => {
|
...
|
...
|
@@ -374,7 +375,22 @@ const getShopData = (req, shopId, uid, isApp) => { |
|
|
let shopData = {};
|
|
|
let channel = req.yoho.channel;
|
|
|
|
|
|
return Promise.all([_getShopDecorator(shopId), _getShopInfo(shopId, uid)]).then((result) => {
|
|
|
return Promise.all([
|
|
|
_getShopDecorator(shopId),
|
|
|
_getShopInfo(shopId, uid),
|
|
|
searchModel.getFilterData({
|
|
|
shop_id: shopId,
|
|
|
gender: '1,3', // TODO TAR 获取性别
|
|
|
channel: channel,
|
|
|
brand: '' // TODO TAR 获取品牌
|
|
|
}),
|
|
|
searchModel.getSearchData({
|
|
|
shop_id: shopId,
|
|
|
gender: '1,3', // TODO TAR 获取性别
|
|
|
channel: channel,
|
|
|
brand: '' // TODO TAR 获取品牌
|
|
|
})
|
|
|
]).then((result) => {
|
|
|
shopData = {
|
|
|
decorator: result[0], // 店铺装修资源数据
|
|
|
shopInfo: result[1] // 店铺信息
|
...
|
...
|
@@ -394,7 +410,8 @@ const getShopData = (req, shopId, uid, isApp) => { |
|
|
}, shopData);
|
|
|
|
|
|
// noinspection JSCheckFunctionSignatures
|
|
|
return _formShopData(shopData, shopId, isApp); // 组织楼层数据
|
|
|
return Object.assign(_formShopData(shopData, shopId, isApp),
|
|
|
{filter: result[2]}, {goods: result[3]}); // TODO TAR 获取筛选数据和商品数据数据校验
|
|
|
});
|
|
|
});
|
|
|
};
|
...
|
...
|
|