Authored by 周少峰

detail path

... ... @@ -67,7 +67,7 @@ router.get('/outlets/:channel', outlets.channel); // 奥莱频道页
// 商品分类列表页
router.get('/list', outletsList.index);
router.get(/\/([\d]+)(.*)/, detail.showMain); // 新的商品详情routers
router.get(/^\/([\d]+)(.*)/, detail.showMain); // 新的商品详情routers
router.get(/\/p([\d]+)(.*)/, detail.showMainBack); // 新的商品详情routers
router.get('/detail/comment', detail.indexComment); // 商品评论
router.get('/detail/consult', detail.indexConsult); // 商品咨询
... ...
... ... @@ -9,7 +9,7 @@ const MAX_QPS_10m = config.maxQps10m; // eslint-disable-line
const _ = require('lodash');
const PAGES = {
'/product/\\/([\\d]+)(.*)/': 5,
'/product/^\\/([\\d]+)(.*)/': 5,
'/product/list/index': 5,
'/product/search/index': 5
};
... ...
... ... @@ -15,7 +15,10 @@ module.exports = (limiter, policy) => {
cache.getAsync(blackKey),
cache.getAsync(whiteKey)
]).then((args) => {
const blacklist = args[0] || [], whitelist = args[1] || [];
const blacklist = args[0] || [],
whitelist = args[1] || [];
logger.debug(args);
if (blacklist.length === 0 && whitelist.length === 0) {
return Promise.resolve(true);
... ...