|
|
/**
|
|
|
* 微信抽奖控制器
|
|
|
* @author: bikai
|
|
|
* @date: 2016/4/1
|
|
|
*/
|
|
|
|
|
|
// var lotteryModel = require('../../models/wxLottery/index');
|
|
|
// var errUtil = require('../../util/error');
|
|
|
|
|
|
// 星潮教室主页
|
|
|
exports.index = (req, res) => {
|
|
|
|
|
|
// 传入参数给lotteryModel发送到后端,获取返回的数据
|
|
|
// lotteryModel({test: 1}).then((data) => {
|
|
|
|
|
|
// // 接收接口返回到的数据,处理后,渲染页面或者返回 JSON
|
|
|
// res.send(data);
|
|
|
|
|
|
// }).catch((err) => {
|
|
|
// errUtil.webError(err, res); // 抓取 Promise 链的错误
|
|
|
// });
|
|
|
res.render('starClassroom/index', {
|
|
|
title: '星潮教室',
|
|
|
module: 'starClassroom',
|
|
|
version: '0.0.1'
|
|
|
|
|
|
// wxLottery: data
|
|
|
});
|
|
|
};
|
|
|
|
|
|
// 星潮教室签到
|
|
|
exports.checkIn = (req, res) => {
|
|
|
res.render('starClassroom/index', {
|
|
|
title: '星潮教室',
|
|
|
module: 'starClassroom',
|
|
|
version: '0.0.1'
|
|
|
|
|
|
// wxLottery: data
|
|
|
});
|
|
|
};
|
|
|
|
|
|
// 星潮教室星专题
|
|
|
exports.subject = (req, res) => {
|
|
|
res.render('starClassroom/subject', {
|
|
|
title: '星潮教室星专题',
|
|
|
module: 'starClassroom',
|
|
|
version: '0.0.1'
|
|
|
|
|
|
// wxLottery: data
|
|
|
});
|
|
|
};
|
|
|
|
|
|
// 星潮教室星搭配
|
|
|
exports.collocation = (req, res) => {
|
|
|
res.render('starClassroom/collocation', {
|
|
|
title: '星潮教室星搭配',
|
|
|
module: 'starClassroom',
|
|
|
version: '0.0.1'
|
|
|
|
|
|
// wxLottery: data
|
|
|
});
|
|
|
}; |
...
|
...
|
|