...
|
...
|
@@ -6,7 +6,7 @@ |
|
|
|
|
|
'use strict';
|
|
|
|
|
|
// const headerModel = require('../../../doraemon/models/header');
|
|
|
const headerModel = require('../../../doraemon/models/header');
|
|
|
|
|
|
// 开发用模拟数据
|
|
|
const outletsSimulation = require('../models/simulation');
|
...
|
...
|
@@ -268,3 +268,65 @@ exports.channel = (req, res) => { |
|
|
|
|
|
// res.render('outlets/channel', response);
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* outlets 活动
|
|
|
* @param {[type]} req [description]
|
|
|
* @param {[type]} res [description]
|
|
|
* @return {[type]} [description]
|
|
|
*/
|
|
|
exports.special = (req, res) => {
|
|
|
let params = req.query;
|
|
|
|
|
|
let resData = {
|
|
|
module: 'product',
|
|
|
page: 'outlets',
|
|
|
devEnv: true
|
|
|
};
|
|
|
|
|
|
resData.mainBanner = {
|
|
|
list: [
|
|
|
{
|
|
|
href: '#',
|
|
|
img: 'http://img10.static.yhbimg.com/brandBanner/2014/11/24/07/01ff74fb2a33764c2fd18b3c8a60f5beef.jpg'
|
|
|
},
|
|
|
{
|
|
|
href: '#',
|
|
|
img: 'http://img10.static.yhbimg.com/brandBanner/2014/11/24/07/01ff74fb2a33764c2fd18b3c8a60f5beef.jpg'
|
|
|
},
|
|
|
{
|
|
|
href: '#',
|
|
|
img: 'http://img10.static.yhbimg.com/brandBanner/2014/11/24/07/01ff74fb2a33764c2fd18b3c8a60f5beef.jpg'
|
|
|
}
|
|
|
],
|
|
|
href: '#',
|
|
|
img: 'http://img10.static.yhbimg.com/brandBanner/2014/11/24/07/01ff74fb2a33764c2fd18b3c8a60f5beef.jpg'
|
|
|
};
|
|
|
|
|
|
resData.specialHead = {
|
|
|
logo: 'http://img10.static.yhbimg.com/brandLogo/2012/08/02/15/0119ad6a2407f5505268688a470d6f6c13.jpg',
|
|
|
special: '精品上装专场',
|
|
|
discount: '8',
|
|
|
title: '全部商品',
|
|
|
count: '123533',
|
|
|
limit: '20000'
|
|
|
};
|
|
|
|
|
|
headerModel.requestHeaderData().then(headerData => {
|
|
|
resData = Object.assign(resData, headerModel.setHeaderData(headerData.data, 'outlets'));
|
|
|
|
|
|
if (!params.id) {
|
|
|
resData.pageErr = true;
|
|
|
}
|
|
|
|
|
|
res.render('outlets/special', resData);
|
|
|
|
|
|
// outlets.getOutletsSpecialData(params).then(result => {
|
|
|
// res.render('outlets/special', resData);
|
|
|
// });
|
|
|
|
|
|
}).catch(() => {
|
|
|
resData.pageErr = true;
|
|
|
res.render('error', resData);
|
|
|
});
|
|
|
}; |
...
|
...
|
|