router.js
985 Bytes
/**
* router of sub app product
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2016/05/06
*/
'use strict';
const router = require('express').Router(); // eslint-disable-line
const cRoot = './controllers';
// 商品详情controller
const detail = require(`${cRoot}/detail`);
// sale controller
const sale = require(`${cRoot}/sale`);
// routers
// /pro_136349_455445/HEARTSOFARMianMaShuJiaoXiuXianKuPS1684.html
router.get(/\/pro_([\d]+)_([\d]+)\/(.*)/, detail.index);
router.get('/detail/intro/:productskn', detail.intro);
router.get('/detail/preference/:productskn/:yhchannel/:brandId', detail.preference);
router.get('/sale', sale.index);
router.get('/sale/discount', sale.discount);
router.get('/sale/discount/detail', sale.discountDetail);
router.get('/sale/breakingYards', sale.breakingYards);
router.get('/sale/vip', sale.vip);
router.get('/sale/search', sale.search);
router.get('/sale/filter', sale.filter);
// router.get('/outlet', sale.outlet);
module.exports = router;