Authored by 周少峰

cache and price

... ... @@ -315,7 +315,7 @@ exports.detail = (req, res, next) => {
brands: ret[5],
tag: info.tags,
relatedPost: (ret[9] && ret[9].length) ? ret[9] : false,
relatedPost: (ret[10] && ret[10].length) ? ret[10] : false,
exRecos: ret[6],
ads: ret[7],
... ...
... ... @@ -295,7 +295,7 @@ exports.getSearchLessProduct = (channelNum, uid, udid, page) => {
img: it.default_images ? helpers.image(it.default_images, 180, 240) : '',
alt: it.product_name,
price: '¥' + transPrice(it.sales_price),
marketPrice: transPrice(it.market_price) === transPrice(it.sales_price) ?
marketPrice: transPrice(it.market_price) <= transPrice(it.sales_price) ?
false : ('¥' + transPrice(it.market_price))
};
... ...
... ... @@ -26,7 +26,7 @@ const cachePage = {
'/guang/tags/index': 1 * MINUTE,
// 领券中心
'/coupon/index': 5 * MINUTE,
'/coupon/': 5 * MINUTE,
// 商品列表
// '/product/list/index': 5 * MINUTE,
... ... @@ -58,7 +58,7 @@ const cachePage = {
'/brands/plusstar': 5 * MINUTE,
'/^\\/special\\/(\\d+)_(.*)\\.html$/': 5 * MINUTE,
'/\\/product\\/search\\/keyword(.*)/': 7 * DAY
'/product/search/keyword/:id': 7 * DAY
};
... ...