...
|
...
|
@@ -16,9 +16,7 @@ const yohobuy = (req, res, next) => { |
|
|
let channel = req.yoho.channel || 'boys';
|
|
|
|
|
|
req.ctx(headerModel).requestHeaderData(channel).then(result => {
|
|
|
responseData.headerData = result.headerData;
|
|
|
|
|
|
res.render('yohobuy', responseData);
|
|
|
res.render('yohobuy', Object.assign({}, responseData, result));
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
...
|
...
|
@@ -29,9 +27,7 @@ const newpower = (req, res, next) => { |
|
|
let channel = req.yoho.channel || 'boys';
|
|
|
|
|
|
req.ctx(headerModel).requestHeaderData(channel).then(result => {
|
|
|
responseData.headerData = result.headerData;
|
|
|
|
|
|
res.render('newpower', responseData);
|
|
|
res.render('newpower', Object.assign({}, responseData, result));
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
...
|
...
|
@@ -42,9 +38,7 @@ const contact = (req, res, next) => { |
|
|
let channel = req.yoho.channel || 'boys';
|
|
|
|
|
|
req.ctx(headerModel).requestHeaderData(channel).then(result => {
|
|
|
responseData.headerData = result.headerData;
|
|
|
|
|
|
res.render('contact', responseData);
|
|
|
res.render('contact', Object.assign({}, responseData, result));
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
...
|
...
|
@@ -55,9 +49,7 @@ const privacy = (req, res, next) => { |
|
|
let channel = req.yoho.channel || 'boys';
|
|
|
|
|
|
req.ctx(headerModel).requestHeaderData(channel).then(result => {
|
|
|
responseData.headerData = result.headerData;
|
|
|
|
|
|
res.render('privacy', responseData);
|
|
|
res.render('privacy', Object.assign({}, responseData, result));
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
...
|
...
|
@@ -71,9 +63,7 @@ const link = (req, res, next) => { |
|
|
req.ctx(headerModel).requestHeaderData(channel),
|
|
|
req.ctx(aboutModel).link(),
|
|
|
]).then(result => {
|
|
|
responseData.headerData = _.get(result, '[0].headerData');
|
|
|
|
|
|
res.render('link', Object.assign(_.get(result, '[1]', {}), responseData));
|
|
|
res.render('link', Object.assign(_.get(result, '[1]', {}), responseData, result[0]));
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
...
|
...
|
|