|
@@ -11,11 +11,10 @@ const _ = require('lodash'); |
|
@@ -11,11 +11,10 @@ const _ = require('lodash'); |
11
|
const channelModel = require('../models/index');
|
11
|
const channelModel = require('../models/index');
|
12
|
|
12
|
|
13
|
exports.index = (req, res, next) => {
|
13
|
exports.index = (req, res, next) => {
|
14
|
- let channelType = req.path.substring(1) || 'boys';
|
14
|
+ let channelType = req.path.split('/')[1] || 'boys';
|
15
|
|
15
|
|
16
|
// 将woman转换为girls,以便model层进行处理
|
16
|
// 将woman转换为girls,以便model层进行处理
|
17
|
channelType === 'woman' ? channelType = 'girls' : null;
|
17
|
channelType === 'woman' ? channelType = 'girls' : null;
|
18
|
-
|
|
|
19
|
channelModel.getContent(channelType, req).then(data => {
|
18
|
channelModel.getContent(channelType, req).then(data => {
|
20
|
|
19
|
|
21
|
// channel为空不缓存
|
20
|
// channel为空不缓存
|
|
@@ -81,10 +80,3 @@ exports.getIndexGuide = (req, res, next) => { |
|
@@ -81,10 +80,3 @@ exports.getIndexGuide = (req, res, next) => { |
81
|
res.render('guide', result);
|
80
|
res.render('guide', result);
|
82
|
}).catch(next);
|
81
|
}).catch(next);
|
83
|
}; |
82
|
}; |
84
|
-
|
|
|
85
|
-exports.hasNewUserFloor = (req, res, next) => {
|
|
|
86
|
-
|
|
|
87
|
- channelModel.hasNewUserFloor(req.yoho.channel, req.user.uid).then(data => {
|
|
|
88
|
- res.send(data);
|
|
|
89
|
- }).catch(next);
|
|
|
90
|
-}; |
|
|