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) => {
}
switch (parseInt(brandInfo.type, 10)) {
case 1:
// 搜索
res.location(helpers.urlFormat('', {query: brandInfo.brandDomain}, 'search'));
case 1: // 搜索
res.redirect(helpers.urlFormat('', {query: brandInfo.brandDomain}, 'search'));
break;
case 2:
// 店铺
case 2: // 店铺
return shop(brandInfo.shopId, req, res, next);
default:
// 品牌
default: // 品牌
return list.getBrandData(req.query, Object.assign({uid: req.user.id}, brandInfo),
req.yoho.channel).then(result => {
Object.assign(resData, result, {
... ...
... ... @@ -297,7 +297,7 @@ const shopFormat = shopDatas => {
_.forEach(shopDatas, val => {
let sorts = [];
let shopId = _.get(val, 'shop.id', '');
let shopId = _.get(val, 'shop.shop_id', '');
let url = helpers.urlFormat('', {shopId: shopId}, val.shop.brand_domain);
if (val.shopSort) {
... ...