...
|
...
|
@@ -18,29 +18,32 @@ const outletsSimulation = require('../models/simulation'); |
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
exports.index = (req, res) => {
|
|
|
let data = {};
|
|
|
let resData = {};
|
|
|
|
|
|
data.module = 'product';
|
|
|
data.page = 'outlets';
|
|
|
data.footerTop = true;
|
|
|
data.devEnv = true;
|
|
|
resData.module = 'product';
|
|
|
resData.page = 'outlets';
|
|
|
resData.devEnv = true;
|
|
|
|
|
|
data.banner = [
|
|
|
{
|
|
|
href: '#',
|
|
|
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}'
|
|
|
},
|
|
|
{
|
|
|
href: '#',
|
|
|
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}'
|
|
|
},
|
|
|
{
|
|
|
href: '#',
|
|
|
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}'
|
|
|
}
|
|
|
];
|
|
|
resData.mainBanner = {
|
|
|
list: [
|
|
|
{
|
|
|
href: '#',
|
|
|
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}',
|
|
|
bgColor: '#f00'
|
|
|
},
|
|
|
{
|
|
|
href: '#',
|
|
|
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}',
|
|
|
bgColor: '#ff0'
|
|
|
},
|
|
|
{
|
|
|
href: '#',
|
|
|
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}'
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
|
|
|
data.column = [
|
|
|
resData.column = [
|
|
|
{
|
|
|
href: '#',
|
|
|
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}'
|
...
|
...
|
@@ -55,7 +58,7 @@ exports.index = (req, res) => { |
|
|
}
|
|
|
];
|
|
|
|
|
|
data.limitedBuy = {
|
|
|
resData.limitedBuy = {
|
|
|
name: '限时嗨购',
|
|
|
topic: [
|
|
|
{
|
...
|
...
|
@@ -145,7 +148,7 @@ exports.index = (req, res) => { |
|
|
}
|
|
|
};
|
|
|
|
|
|
data.nearOver = {
|
|
|
resData.nearOver = {
|
|
|
name: '即将结束',
|
|
|
topic: [
|
|
|
{
|
...
|
...
|
@@ -183,7 +186,7 @@ exports.index = (req, res) => { |
|
|
]
|
|
|
};
|
|
|
|
|
|
data.goodsBoard = {
|
|
|
resData.goodsBoard = {
|
|
|
goodsMenu: {
|
|
|
title: '最新折扣',
|
|
|
menuList: [
|
...
|
...
|
@@ -236,7 +239,20 @@ exports.index = (req, res) => { |
|
|
}
|
|
|
]
|
|
|
};
|
|
|
res.render('outlets/index', data);
|
|
|
|
|
|
headerModel.requestHeaderData().then(headerData => {
|
|
|
resData = Object.assign(resData, headerModel.setHeaderData(headerData.data, 'outlets'));
|
|
|
|
|
|
res.render('outlets/index', resData);
|
|
|
|
|
|
// outlets.getOutletsSpecialData(params).then(result => {
|
|
|
// res.render('outlets/special', resData);
|
|
|
// });
|
|
|
|
|
|
}).catch(() => {
|
|
|
resData.pageErr = true;
|
|
|
res.render('error', resData);
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
|