Authored by 陈峰

fix gender default

@@ -20,10 +20,7 @@ exports.index = (req, res) => { @@ -20,10 +20,7 @@ exports.index = (req, res) => {
20 20
21 /* 查询 产品列表 */ 21 /* 查询 产品列表 */
22 exports.fetchProducts = (req, res, next) => { 22 exports.fetchProducts = (req, res, next) => {
23 - const params = req.query;  
24 -  
25 - params.gender = '';  
26 - model.products(params) 23 + model.products(req.query)
27 .then(result => res.json(result)) 24 .then(result => res.json(result))
28 .catch(next); 25 .catch(next);
29 }; 26 };
@@ -4,15 +4,11 @@ @@ -4,15 +4,11 @@
4 * @author: Aiden Xu<aiden.xu@yoho.cn> 4 * @author: Aiden Xu<aiden.xu@yoho.cn>
5 * @date: 2016/4/27 5 * @date: 2016/4/27
6 */ 6 */
7 -const channelGender = require('./doraemon/middleware/channel-gender').channelGender;  
8 7
9 module.exports = app => { 8 module.exports = app => {
10 app.use('/', require('./apps/channel')); // 一级频道模块 9 app.use('/', require('./apps/channel')); // 一级频道模块
11 // 商品模块 10 // 商品模块
12 - app.use('/'  
13 - , channelGender  
14 - , require('./apps/product')  
15 - ); 11 + app.use('/', require('./apps/product'));
16 app.use('/', require('./apps/me')); // 个人中心 12 app.use('/', require('./apps/me')); // 个人中心
17 app.use('/api', require('./apps/api')); // 各模块公有 API 13 app.use('/api', require('./apps/api')); // 各模块公有 API
18 app.use('/editorial', require('./apps/editorial')); // 资讯 14 app.use('/editorial', require('./apps/editorial')); // 资讯