channel.js
514 Bytes
/**
* 主页
* @author: Bi Kai<kai.bi@yoho.cn>
* @date: 2016/05/09
*/
'use strict';
const channelModel = require('../models/channel');
/**
* 频道选择页
*/
const channel = {
index(req, res) {
res.render('index', {
module: 'channel',
page: 'home'
});
},
resources(req, res, next) {
channelModel.getResourcesData(req.yoho.channel).then(result => {
return res.json(result);
}).catch(next);
}
};
module.exports = channel;