Authored by htoooth

Merge remote-tracking branch 'origin/feature/japanKoreanChannel' into feature/japanKoreanChannel

# Conflicts:
#	apps/channel/controllers/index.js
#	apps/channel/router.js
@@ -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 -};  
@@ -17,7 +17,7 @@ router.get('/', channelController.index); @@ -17,7 +17,7 @@ router.get('/', channelController.index);
17 router.get('/woman', channelController.index); 17 router.get('/woman', channelController.index);
18 router.get('/kids', channelController.index); 18 router.get('/kids', channelController.index);
19 router.get('/lifestyle', channelController.index); 19 router.get('/lifestyle', channelController.index);
20 -router.get('/japanKorean', channelController.index); 20 +router.get('/*/japanKorean', channelController.index);
21 router.get('/channel/isNewUserAjax', channelController.hasNewUserFloor); 21 router.get('/channel/isNewUserAjax', channelController.hasNewUserFloor);
22 22
23 // ajax 23 // ajax