router.js
974 Bytes
/**
* 路由处理文件
* @author: liuyue(yue.liu@yoho.cn)
* @date: 2015/7/13
*/
var controllerPath = './views/controller/',
boys = require(controllerPath + 'boys'),
girls = require(controllerPath + 'girls'),
goods = require(controllerPath + 'goods'),
kids = require(controllerPath + 'kids'),
goodsCate = require(controllerPath + 'goods-cate'),
lifestyle = require(controllerPath + 'lifestyle');
module.exports = function(app) {
app.get('/boys', boys.index); //boys首页
app.get('/girls', girls.index); //girls首页
app.get('/kids', kids.index); //kids首页
app.get('/goods-cate', goodsCate.index); //商品分类
app.get('/lifestyle', lifestyle.index); //家居首页
app.get('/common/goodinfo', goods.goodTpl); //商品信息模板
app.get('/goods/more', goods.more); //下拉加载更多
app.get('/goods/prise', goods.like); //商品收藏/取消收藏
app.get('/goods/cancelprise', goods.like);
};