...
|
...
|
@@ -11,11 +11,10 @@ const _ = require('lodash'); |
|
|
const channelModel = require('../models/index');
|
|
|
|
|
|
exports.index = (req, res, next) => {
|
|
|
let channelType = req.path.substring(1) || 'boys';
|
|
|
let channelType = req.path.split('/')[1] || 'boys';
|
|
|
|
|
|
// 将woman转换为girls,以便model层进行处理
|
|
|
channelType === 'woman' ? channelType = 'girls' : null;
|
|
|
|
|
|
channelModel.getContent(channelType, req).then(data => {
|
|
|
|
|
|
// channel为空不缓存
|
...
|
...
|
@@ -81,10 +80,3 @@ exports.getIndexGuide = (req, res, next) => { |
|
|
res.render('guide', result);
|
|
|
}).catch(next);
|
|
|
}; |
|
|
|
|
|
exports.hasNewUserFloor = (req, res, next) => {
|
|
|
|
|
|
channelModel.hasNewUserFloor(req.yoho.channel, req.user.uid).then(data => {
|
|
|
res.send(data);
|
|
|
}).catch(next);
|
|
|
}; |
...
|
...
|
|