Authored by 刘传洋

Merge branch 'release/newSearch' of http://git.yoho.cn/fe/yohobuy-node into release/newSearch

@@ -91,18 +91,12 @@ exports.brand = (req, res, next) => { @@ -91,18 +91,12 @@ exports.brand = (req, res, next) => {
91 } 91 }
92 92
93 switch (parseInt(brandInfo.type, 10)) { 93 switch (parseInt(brandInfo.type, 10)) {
94 - case 1:  
95 - // 搜索  
96 - res.location(helpers.urlFormat('', {query: brandInfo.brandDomain}, 'search')); 94 + case 1: // 搜索
  95 + res.redirect(helpers.urlFormat('', {query: brandInfo.brandDomain}, 'search'));
97 break; 96 break;
98 -  
99 - case 2:  
100 - // 店铺 97 + case 2: // 店铺
101 return shop(brandInfo.shopId, req, res, next); 98 return shop(brandInfo.shopId, req, res, next);
102 -  
103 - default:  
104 -  
105 - // 品牌 99 + default: // 品牌
106 return list.getBrandData(req.query, Object.assign({uid: req.user.id}, brandInfo), 100 return list.getBrandData(req.query, Object.assign({uid: req.user.id}, brandInfo),
107 req.yoho.channel).then(result => { 101 req.yoho.channel).then(result => {
108 Object.assign(resData, result, { 102 Object.assign(resData, result, {
@@ -297,7 +297,7 @@ const shopFormat = shopDatas => { @@ -297,7 +297,7 @@ const shopFormat = shopDatas => {
297 297
298 _.forEach(shopDatas, val => { 298 _.forEach(shopDatas, val => {
299 let sorts = []; 299 let sorts = [];
300 - let shopId = _.get(val, 'shop.id', ''); 300 + let shopId = _.get(val, 'shop.shop_id', '');
301 let url = helpers.urlFormat('', {shopId: shopId}, val.shop.brand_domain); 301 let url = helpers.urlFormat('', {shopId: shopId}, val.shop.brand_domain);
302 302
303 if (val.shopSort) { 303 if (val.shopSort) {