router.js 1.13 KB
/**
 * router of sub app girls
 * @author: biao<bill.zhao@yoho.cn>
 * @date: 2016/05/16
 */

'use strict';

const router = require('express').Router({strict: true}); // eslint-disable-line
const cRoot = './controllers';

// Your controller here
const channelController = require(`${cRoot}/index`);
const sitemap = require('../3party/controllers/sitemap');


// 频道页路由
router.get('/', channelController.index);
router.get('/woman', channelController.redirect('/girls/'));
router.get('/girls', channelController.redirect('/girls/'), channelController.index);
router.get('/kids', channelController.redirect('/kids/'), channelController.index);
router.get('/lifestyle', channelController.redirect('/lifestyle/'), channelController.index);
router.get('/lifestyle/', channelController.index);
router.get('/japanKorean', channelController.japanKorean);
router.get('/channel/isNewUserAjax', channelController.hasNewUserFloor);

// ajax
router.post('/common/getNewArrival', channelController.getNewArrival);
router.get('/guide', channelController.getIndexGuide);

// www站点地图
router.get(/^\/sitemap(\d*)\.xml/, sitemap.siteMap);

module.exports = router;