Authored by yyq

global entries

@@ -11,13 +11,15 @@ const helpers = global.yoho.helpers; @@ -11,13 +11,15 @@ const helpers = global.yoho.helpers;
11 const cache = global.yoho.cache; 11 const cache = global.yoho.cache;
12 const logger = global.yoho.logger; 12 const logger = global.yoho.logger;
13 13
  14 +const fullParamToMinPath = require(`${global.utils}/parameter`).fullParamToMinPath;
  15 +
14 // 判断用户是否收藏品牌 16 // 判断用户是否收藏品牌
15 const isFavoriteBrandUrl = '/shops/service/v1/favorite/getUidBrandFav'; 17 const isFavoriteBrandUrl = '/shops/service/v1/favorite/getUidBrandFav';
16 18
17 // 根据品牌查询相关文章 19 // 根据品牌查询相关文章
18 const relateArticleUrl = 'guang/service/v2/article/getArticleByBrand'; 20 const relateArticleUrl = 'guang/service/v2/article/getArticleByBrand';
19 21
20 -const GLOBAL_BASE_URI = '/product/global/list'; 22 +const GLOBAL_BASE_URI = '/list/global';
21 23
22 // 缓存生效时间 24 // 缓存生效时间
23 const CACHE_TIME_S = 60; 25 const CACHE_TIME_S = 60;
@@ -359,7 +361,7 @@ function getShopList(params) { @@ -359,7 +361,7 @@ function getShopList(params) {
359 }; 361 };
360 362
361 if (value.is_global === 'Y') { 363 if (value.is_global === 'Y') {
362 - shopInfo.home = helpers.urlFormat(GLOBAL_BASE_URI, {brand: value.global_brand_id}); 364 + shopInfo.home = helpers.urlFormat(fullParamToMinPath(GLOBAL_BASE_URI, {brand: value.global_brand_id}));
363 shopInfo.shopType = 'global-brand'; 365 shopInfo.shopType = 'global-brand';
364 } 366 }
365 367
@@ -372,10 +374,10 @@ function getShopList(params) { @@ -372,10 +374,10 @@ function getShopList(params) {
372 sortHref = helpers.urlFormat('', {misort: subSort.sort_id}, 374 sortHref = helpers.urlFormat('', {misort: subSort.sort_id},
373 value.shop_domain || value.brand_domain); 375 value.shop_domain || value.brand_domain);
374 } else { 376 } else {
375 - sortHref = helpers.urlFormat(GLOBAL_BASE_URI, { 377 + sortHref = helpers.urlFormat(fullParamToMinPath(GLOBAL_BASE_URI, {
376 misort: subSort.sort_id, 378 misort: subSort.sort_id,
377 brand: value.global_brand_id 379 brand: value.global_brand_id
378 - }); 380 + }));
379 } 381 }
380 shopInfo.sort.push({ 382 shopInfo.sort.push({
381 href: sortHref, 383 href: sortHref,
@@ -99,7 +99,7 @@ router.post('/detail/notify/cancel', auth, notify.cancel); // 删 @@ -99,7 +99,7 @@ router.post('/detail/notify/cancel', auth, notify.cancel); // 删
99 // 全球购routers 99 // 全球购routers
100 router.get('/list/global', globalCtrl.list); // 全球购列表页 100 router.get('/list/global', globalCtrl.list); // 全球购列表页
101 router.get('/list/global/:pathQs', paramParse, globalCtrl.list); // 全球购列表页 101 router.get('/list/global/:pathQs', paramParse, globalCtrl.list); // 全球购列表页
102 -router.get('/global/list', globalCtrl.list); // 全球购列表页 102 +router.get('/global/list', globalCtrl.list); // 全球购列表页 【老路由,待删】
103 router.get('/global/detail', globalCtrl.detail); 103 router.get('/global/detail', globalCtrl.detail);
104 router.get(/\/global\/([\d]+)(.*)/, globalCtrl.detail); 104 router.get(/\/global\/([\d]+)(.*)/, globalCtrl.detail);
105 105