...
|
...
|
@@ -77,15 +77,12 @@ const link = (req, res, next) => { |
|
|
*/
|
|
|
const category = (req, res, next) => {
|
|
|
let channel = req.yoho.channel || 'boys';
|
|
|
let resData = {};
|
|
|
|
|
|
return Promise.all([
|
|
|
headerModel.requestHeaderData(channel),
|
|
|
req.ctx(aboutModel).getCategoryDataWithCache(channel)
|
|
|
]).then(result => {
|
|
|
Object.assign(resData, responseData, result[0], result[1]);
|
|
|
|
|
|
res.render('category', resData);
|
|
|
res.render('category', Object.assign(result[1], responseData, result[0]));
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
...
|
...
|
@@ -95,10 +92,11 @@ const category = (req, res, next) => { |
|
|
const chanpin = (req, res, next) => {
|
|
|
let channel = req.yoho.channel || 'boys';
|
|
|
|
|
|
headerModel.requestHeaderData(channel).then(result => {
|
|
|
responseData.headerData = result.headerData;
|
|
|
|
|
|
res.render('chanpin', responseData);
|
|
|
return Promise.all([
|
|
|
headerModel.requestHeaderData(channel),
|
|
|
req.ctx(aboutModel).getChanpinData(channel)
|
|
|
]).then(result => {
|
|
|
res.render('chanpin', Object.assign(result[1], responseData, result[0]));
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
...
|
...
|
|