...
|
...
|
@@ -39,7 +39,7 @@ const shop = { |
|
|
if (shopId) {
|
|
|
let shopInfo = (yield listModel.getShopInfo(shopId, uid)) || {};
|
|
|
|
|
|
if (shopInfo) {
|
|
|
if (shopInfo && shopInfo.is_red_shop === '1') {
|
|
|
shopInfo.shopId = _.get(shopInfo, 'shops_id', '');
|
|
|
}
|
|
|
req.shopInfo = shopInfo;
|
...
|
...
|
@@ -122,12 +122,15 @@ const shop = { |
|
|
};
|
|
|
|
|
|
co(function* () {
|
|
|
let banner = yield listModel.getBrandBanner(brandId);
|
|
|
let brandInfo = yield listModel.getBrandIntro(brandId, uid);
|
|
|
let goodsListApi = yield searchModel.getBrandGoods(searchParam);
|
|
|
let [banner, brandInfo, goodsListApi] = yield Promise.all([
|
|
|
listModel.getBrandBanner(brandId),
|
|
|
listModel.getBrandIntro(brandId, uid),
|
|
|
searchModel.getBrandGoods(searchParam)
|
|
|
]);
|
|
|
|
|
|
let title = brandInfo.title;
|
|
|
let goodsList = productProcess.processProductList(_.get(goodsListApi, 'data.product_list', []));
|
|
|
let goodsTotal = _.get(goodsListApi, 'data.total', 0);
|
|
|
|
|
|
brandInfo.banner = banner;
|
|
|
|
...
|
...
|
@@ -143,6 +146,7 @@ const shop = { |
|
|
keywords: title + ',' + title + '服装服饰,' + title + '潮流服装服饰',
|
|
|
description: title + '|Yoho!Buy有货' + title + '潮流服饰官方授权店!100%品牌正品保证,支持货到付款。',
|
|
|
brandId: brandId,
|
|
|
goodsTotal: goodsTotal,
|
|
|
brandInfo: brandInfo,
|
|
|
goodsList: goodsList,
|
|
|
shopPage: true,
|
...
|
...
|
@@ -181,6 +185,7 @@ const shop = { |
|
|
let category = redShopPrcs.category(_.get(categoryData, 'data', []), shopId);
|
|
|
|
|
|
let goodsList = yield listModel.searchProductBySkn(decoratorsAll.skns);
|
|
|
let goodsTotal = _.get(goodsList, 'data.total', 0);
|
|
|
let decorators = redShopPrcs.pushGoodsInfo(decoratorsAll.decorators, goodsList);
|
|
|
|
|
|
res.render('newshop/shop-reds', {
|
...
|
...
|
@@ -211,6 +216,7 @@ const shop = { |
|
|
module: 'product',
|
|
|
page: 'shop-reds',
|
|
|
shopId,
|
|
|
goodsTotal,
|
|
|
banner, shopInfo, favCount, decorators, category
|
|
|
});
|
|
|
})().catch(next);
|
...
|
...
|
@@ -221,7 +227,7 @@ const shop = { |
|
|
*/
|
|
|
list(req, res, next) {
|
|
|
co(function* () {
|
|
|
let title = '商品列表';
|
|
|
let title = '店铺商品列表';
|
|
|
let shopId = req.query.shop_id;
|
|
|
let searchParam = {
|
|
|
isApp: req.yoho.isApp,
|
...
|
...
|
|