index.js
2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/**
* 微信抽奖控制器
* @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('star-classroom/index', {
title: '星潮教室',
module: 'star-classroom',
version: '0.0.1',
headTab: [
{name: '全部', url: '#', cur: true},
{name: '星专题', url: '#'},
{name: '星搭配', url: '#'},
{name: '星鲜事', url: '#'},
],
bannerList: [
{
url:'http://feature.yoho.cn/0328/0328DAILYBOY/index.html?title=出游场景模拟变装趴&share_id=870',
img: 'http://img11.static.yhbimg.com/yhb-img01/2016/03/28/08/01b36610904562fd3085090f55aeca66df.jpg?imageView/2/w/640/h/240'
},
{
url:'http://designer.yoho.cn/bill?title=晒晒你的潮流清单&share_id=898',
img: 'http://img11.static.yhbimg.com/yhb-img01/2016/04/01/05/010cb10578a55206faff271bceb0f22aaf.jpg?imageView/2/w/640/h/240'
},
{
url:'http://feature.yoho.cn/NEWS/0331APPWEEKNEWSBOY/index.html?title=一周速报&share_id=882',
img: 'http://img11.static.yhbimg.com/yhb-img01/2016/03/31/03/01337e43ca91484214c4b5b2becc0ef13d.jpg?imageView/2/w/640/h/240'
},
{
url:'http://sale.m.yohobuy.com/?specialsale_id=14&gender=1,3',
img: 'http://img12.static.yhbimg.com/yhb-img01/2016/04/01/08/02c78a28a9ca1dc585d614b195abff3eb1.jpg?imageView/2/w/640/h/240'
},
{
url:'http://sale.m.yohobuy.com/?specialsale_id=11&gender=1,3',
img: 'http://img12.static.yhbimg.com/yhb-img01/2016/03/28/04/02ca2b986e193f7134d2f75c74f8169ec3.jpg?imageView/2/w/640/h/240'
}
]
// wxLottery: data
});
};
// 星潮教室签到
exports.checkIn = (req, res) => {
res.render('star-classroom/index', {
title: '星潮教室',
module: 'star-classroom',
version: '0.0.1'
// wxLottery: data
});
};
// 星潮教室星专题
exports.subject = (req, res) => {
res.render('star-classroom/subject', {
title: '星潮教室星专题',
module: 'star-classroom',
version: '0.0.1'
// wxLottery: data
});
};
// 星潮教室星搭配
exports.collocation = (req, res) => {
res.render('star-classroom/collocation', {
title: '星潮教室星搭配',
module: 'star-classroom',
version: '0.0.1'
// wxLottery: data
});
};