...
|
...
|
@@ -389,17 +389,21 @@ const shop = { |
|
|
let shopId = req.query.shop_id || 792; // test3
|
|
|
let channel = req.yoho.channel || 'boys';
|
|
|
let gender = req.query.gender;
|
|
|
let uid = req.user.uid || 0;
|
|
|
let udid = req.sessionID || 'yoho';
|
|
|
|
|
|
co(function* () {
|
|
|
let bannerData = yield redsShopModel.getBanner(shopId);
|
|
|
let shopData = yield redsShopModel.getIntro(shopId);
|
|
|
let favCountData = yield redsShopModel.favCount(shopId, uid, channel, udid);
|
|
|
let decoratorsData = yield redsShopModel.getShopsdecorator(shopId);
|
|
|
let categoryData = yield redsShopModel.getShopCategory(shopId, channel, gender);
|
|
|
|
|
|
let banner = _.get(bannerData, 'data.banner');
|
|
|
let shopInfo = redShopPrcs.shopIntro(_.get(shopData, 'data', {}));
|
|
|
let favCount = _.get(favCountData, 'data[0].approximateCount', '2.1w');
|
|
|
let decorators = redShopPrcs.floor(_.get(decoratorsData, 'data.modules', []));
|
|
|
let category = redShopPrcs.category(categoryData, shopId);
|
|
|
let category = redShopPrcs.category(_.get(categoryData, 'data', []), shopId);
|
|
|
|
|
|
res.render('newshop/shop-reds', {
|
|
|
pageHeader: headerModel.setNav({
|
...
|
...
|
@@ -410,7 +414,7 @@ const shop = { |
|
|
module: 'product',
|
|
|
page: 'reds-shop',
|
|
|
shopId,
|
|
|
banner, shopInfo, decorators, category
|
|
|
banner, shopInfo, favCount, decorators, category
|
|
|
});
|
|
|
})().catch(next);
|
|
|
},
|
...
|
...
|
|