star.js
1.39 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
/**
* 新潮教室
* @author: wsl<shuiling.wang@yoho.cn>
* @date: 2016/05/30
*/
'use strict';
// const library = '../../../library';
// const channelModel = require('../models/channel');
const mRoot = '../models';
const _ = require('lodash');
// const helpers = require(`${library}/helpers`);
// const log = require(`${library}/logger`);
const headerModel = require('../../../doraemon/models/header');
const starModel = require(`${mRoot}/star`);
/**
* 星潮教室首页
* @param {[object]} req
* @param {[object]} res
* @return {[type]}
*/
exports.index = (req, res) => {
let headerData = headerModel.setNavHeader('新潮教室');
let renderData = {
// module: 'product',
// page: 'sale',
title: '新潮教室',
pageHeader: headerData,
pageFooter: true
};
starModel.getIndexData().then(() => {
res.render('star/index', _.assign(headerData, renderData, {
content: '',
headTab: [
{
cur: true,
url: '',
name: '全部'
},
{
cur: false,
url: '',
name: '星专题'
},
{
cur: false,
url: '',
name: '星搭配'
}
]
}));
});
};