Authored by 郭成尧

Merge branch 'release/newSearch'

... ... @@ -132,9 +132,9 @@ const _shop = (req, res, shopId) => {
shopHeadHide: true,
gender: req.query.gender,
channel: req.query.channel,
title: result.storeName + '|' + result.storeName + '潮流服装服饰-Yoho!Buy有货',
keywords: result.storeName + ',' + result.storeName + '服装服饰,' + result.storeName + '潮流服装服饰',
description: result.storeName + '|Yoho!Buy有货' + result.storeName + '潮流服饰官方授权店!100%品牌正品保证,支持货到付款。',
title: result.seoTitle + '|' + result.seoTitle + '潮流服装服饰-Yoho!Buy有货',
keywords: result.seoTitle + ',' + result.seoTitle + '服装服饰,' + result.seoTitle + '潮流服装服饰',
description: result.seoTitle + '|Yoho!Buy有货' + result.seoTitle + '潮流服饰官方授权店!100%品牌正品保证,支持货到付款。',
shopId: shopId,
shopPage: true
});
... ... @@ -232,7 +232,7 @@ const brand = (req, res, next) => {
}, params);
// 无店铺:0--->品牌页 无单品店有多品店:1--->搜索页 有单品店:2--->店铺页面
if (brandLogo.type === '2' && brandLogo.shopId) {
if (req.query.from !== 'search' && brandLogo.type === '2' && brandLogo.shopId) {
_shop(req, res, brandLogo.shopId);
} else { // 获取品牌店铺信息
listModel.getBrandShops(brandId).then(brandShop => {
... ... @@ -362,12 +362,14 @@ const favoriteBrand = (req, res, next) => {
}
});
refer = refererSplit[0] + '?' + shopId;
if (shopId) {
refer = refererSplit[0] + '?' + shopId;
}
}
let url = helpers.urlFormat('/signin.html') + '?refer=' + refer;
if (appVersion) {
if (appVersion && appVersion !== 'false') {
uid = req.query.uid ? crypto.decrypt('', req.query.uid) : req.cookies.appUid;
if (!uid || uid === 'undefined') {
... ...
... ... @@ -46,12 +46,12 @@ const list = (req, res, next) => {
query = query.toLowerCase();
_.forEach(result[0], obj => {
if (query === obj.brandDomain && /^[a-z0-9]+$/i.test(obj.brandName)) { // 精确查品牌域名
if (query === obj.brandDomain) { // 精确查品牌域名
domain = query;
return false;
}
if (query === obj.brandName || query === obj.brandName || query === obj.brandName && /^[a-z0-9]+$/i.test(obj.brandName)) { // 精确查品牌名称
if (query === obj.brandName || query === obj.brandName || query === obj.brandName) { // 精确查品牌名称
domain = obj.brandDomain;
return false;
}
... ...
... ... @@ -34,8 +34,8 @@ const _processBrandShops = (list) => {
url: helpers.urlFormat('/product/index/brand/', {
shop_id: item.shop_id
}),
thumb: helpers.image(item.brandIco, 75, 40),
name: item.brandName
thumb: helpers.image(item.brand_ico, 75, 40),
name: item.brand_name
});
}
});
... ... @@ -367,6 +367,7 @@ const _formShopData = (data, shopId, isApp) => {
logoImg: _.get(data, 'shopInfo.shop_logo', ''),
storeName: (_.get(data, 'shopInfo.is_show_shop_name', '') === 'Y') ?
_.get(data, 'shopInfo.shop_name', '') : '',
seoTitle: _.get(data, 'shopInfo.shop_name', ''),
collect: _.get(data, 'shopInfo.is_favorite', '') === 'Y',
url: helpers.urlFormat('', {
shop_id: shopId
... ... @@ -741,15 +742,15 @@ const getShopCategory = (params) => {
_.forEach(resultCopy, value => {
finalResult.class.push({
name: value.categoryName
name: value.category_name
});
_.forEach(value.sub, (subValue, subKey) => {
value.sub[subKey].url = helpers.urlFormat('/product/search/list', {
shop_id: params.shopId,
sort: _.get(value, 'relation_parameter.sort', ''),
title: subValue.categoryName,
query: subValue.categoryName
title: subValue.category_name,
query: subValue.category_name
});
});
... ...
... ... @@ -22,9 +22,9 @@
{{# category}}
<ul class="sub-level">
{{# subcategory}}
<li class="buriedpoint" data-bp-id="shop_sublevel_{{categoryName}}_1">
<li class="buriedpoint" data-bp-id="shop_sublevel_{{category_name}}_1">
<a href={{url}}>
{{categoryName}}
{{category_name}}
</a>
</li>
{{/ subcategory}}
... ...