...
|
...
|
@@ -39,15 +39,18 @@ const shop = { |
|
|
if (shopId) {
|
|
|
let shopInfo = (yield listModel.getShopInfo(shopId, uid)) || {};
|
|
|
|
|
|
req.shopInfo = _.assign(shopInfo, {shopId: shopId}); // 通过店铺 ID 查询店铺类型
|
|
|
if (shopInfo) {
|
|
|
shopInfo.shopId = _.get(shopInfo, 'shops_id', '');
|
|
|
}
|
|
|
req.shopInfo = shopInfo;
|
|
|
} else if (domain) {
|
|
|
let domainInfo = (yield listModel.getBrandLogoByDomain(domain)) || {}; // 通过域名查询店铺类型,或者品牌信息
|
|
|
|
|
|
if (domainInfo.shopId && domainInfo.type === '2') {
|
|
|
if (domainInfo.shopId && domainInfo.type === '2') { // 红人店铺
|
|
|
let shopInfo = yield listModel.getShopInfo(domainInfo.shopId, uid);
|
|
|
|
|
|
_.assign(req.shopInfo, domainInfo, shopInfo);
|
|
|
} else {
|
|
|
} else { // 品牌
|
|
|
req.shopInfo = domainInfo;
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -217,7 +220,7 @@ const shop = { |
|
|
list(req, res, next) {
|
|
|
co(function* () {
|
|
|
let title = '商品列表';
|
|
|
let shopId = req.shopInfo.shopId;
|
|
|
let shopId = req.query.shop_id;
|
|
|
let searchParam = {
|
|
|
isApp: req.yoho.isApp,
|
|
|
shop_id: shopId,
|
...
|
...
|
|