Authored by ccbikai(👎🏻🍜)

Merge remote-tracking branch 'origin/release/newSearch'

@@ -232,7 +232,7 @@ const brand = (req, res, next) => { @@ -232,7 +232,7 @@ const brand = (req, res, next) => {
232 }, params); 232 }, params);
233 233
234 // 无店铺:0--->品牌页 无单品店有多品店:1--->搜索页 有单品店:2--->店铺页面 234 // 无店铺:0--->品牌页 无单品店有多品店:1--->搜索页 有单品店:2--->店铺页面
235 - if (brandLogo.type === '2' && brandLogo.shopId) { 235 + if (req.query.from !== 'search' && brandLogo.type === '2' && brandLogo.shopId) {
236 _shop(req, res, brandLogo.shopId); 236 _shop(req, res, brandLogo.shopId);
237 } else { // 获取品牌店铺信息 237 } else { // 获取品牌店铺信息
238 listModel.getBrandShops(brandId).then(brandShop => { 238 listModel.getBrandShops(brandId).then(brandShop => {
@@ -362,12 +362,14 @@ const favoriteBrand = (req, res, next) => { @@ -362,12 +362,14 @@ const favoriteBrand = (req, res, next) => {
362 } 362 }
363 }); 363 });
364 364
365 - refer = refererSplit[0] + '?' + shopId; 365 + if (shopId) {
  366 + refer = refererSplit[0] + '?' + shopId;
  367 + }
366 } 368 }
367 369
368 let url = helpers.urlFormat('/signin.html') + '?refer=' + refer; 370 let url = helpers.urlFormat('/signin.html') + '?refer=' + refer;
369 371
370 - if (appVersion) { 372 + if (appVersion && appVersion !== 'false') {
371 uid = req.query.uid ? crypto.decrypt('', req.query.uid) : req.cookies.appUid; 373 uid = req.query.uid ? crypto.decrypt('', req.query.uid) : req.cookies.appUid;
372 374
373 if (!uid || uid === 'undefined') { 375 if (!uid || uid === 'undefined') {
@@ -46,12 +46,12 @@ const list = (req, res, next) => { @@ -46,12 +46,12 @@ const list = (req, res, next) => {
46 query = query.toLowerCase(); 46 query = query.toLowerCase();
47 _.forEach(result[0], obj => { 47 _.forEach(result[0], obj => {
48 48
49 - if (query === obj.brandDomain && /^[a-z0-9]+$/i.test(obj.brandName)) { // 精确查品牌域名 49 + if (query === obj.brandDomain) { // 精确查品牌域名
50 domain = query; 50 domain = query;
51 return false; 51 return false;
52 } 52 }
53 53
54 - if (query === obj.brandName || query === obj.brandName || query === obj.brandName && /^[a-z0-9]+$/i.test(obj.brandName)) { // 精确查品牌名称 54 + if (query === obj.brandName || query === obj.brandName || query === obj.brandName) { // 精确查品牌名称
55 domain = obj.brandDomain; 55 domain = obj.brandDomain;
56 return false; 56 return false;
57 } 57 }
@@ -34,8 +34,8 @@ const _processBrandShops = (list) => { @@ -34,8 +34,8 @@ const _processBrandShops = (list) => {
34 url: helpers.urlFormat('/product/index/brand/', { 34 url: helpers.urlFormat('/product/index/brand/', {
35 shop_id: item.shop_id 35 shop_id: item.shop_id
36 }), 36 }),
37 - thumb: helpers.image(item.brandIco, 75, 40),  
38 - name: item.brandName 37 + thumb: helpers.image(item.brand_ico, 75, 40),
  38 + name: item.brand_name
39 }); 39 });
40 } 40 }
41 }); 41 });