Authored by yyq

global entries

... ... @@ -11,13 +11,15 @@ const helpers = global.yoho.helpers;
const cache = global.yoho.cache;
const logger = global.yoho.logger;
const fullParamToMinPath = require(`${global.utils}/parameter`).fullParamToMinPath;
// 判断用户是否收藏品牌
const isFavoriteBrandUrl = '/shops/service/v1/favorite/getUidBrandFav';
// 根据品牌查询相关文章
const relateArticleUrl = 'guang/service/v2/article/getArticleByBrand';
const GLOBAL_BASE_URI = '/product/global/list';
const GLOBAL_BASE_URI = '/list/global';
// 缓存生效时间
const CACHE_TIME_S = 60;
... ... @@ -359,7 +361,7 @@ function getShopList(params) {
};
if (value.is_global === 'Y') {
shopInfo.home = helpers.urlFormat(GLOBAL_BASE_URI, {brand: value.global_brand_id});
shopInfo.home = helpers.urlFormat(fullParamToMinPath(GLOBAL_BASE_URI, {brand: value.global_brand_id}));
shopInfo.shopType = 'global-brand';
}
... ... @@ -372,10 +374,10 @@ function getShopList(params) {
sortHref = helpers.urlFormat('', {misort: subSort.sort_id},
value.shop_domain || value.brand_domain);
} else {
sortHref = helpers.urlFormat(GLOBAL_BASE_URI, {
sortHref = helpers.urlFormat(fullParamToMinPath(GLOBAL_BASE_URI, {
misort: subSort.sort_id,
brand: value.global_brand_id
});
}));
}
shopInfo.sort.push({
href: sortHref,
... ...
... ... @@ -99,7 +99,7 @@ router.post('/detail/notify/cancel', auth, notify.cancel); // 删
// 全球购routers
router.get('/list/global', globalCtrl.list); // 全球购列表页
router.get('/list/global/:pathQs', paramParse, globalCtrl.list); // 全球购列表页
router.get('/global/list', globalCtrl.list); // 全球购列表页
router.get('/global/list', globalCtrl.list); // 全球购列表页 【老路由,待删】
router.get('/global/detail', globalCtrl.detail);
router.get(/\/global\/([\d]+)(.*)/, globalCtrl.detail);
... ...