Authored by 周少峰

Merge branch 'feature/guangDev' into release/5.8

... ... @@ -35,15 +35,15 @@ exports.index = (req, res, next) => {
Promise.all([
reqCtx.getBanner(channel),
reqCtx.getCategory(type, channel),
reqCtx.getTopList(gender, uid, udid, page, true),
reqCtx.getArticleList(gender, type, uid, udid, page, '', '', pageSize, channel, true),
reqCtx.getHotTags(page, pageSize, channel, isHotDegrade),
reqCtx.getAds(channel, isAdDegrade),
reqCtx.getRecoArticles(gender, 1, 10, channel),
headerModel.requestHeaderData(channel)
headerModel.requestHeaderData(channel),
reqCtx.getTopList(gender, uid, udid, page, true)
]).then(ret => {
if (_.get(ret[2], 'msgs') || _.get(ret[3], 'msgs')) {
if (_.get(ret[2], 'msgs') || _.get(ret[7], 'msgs')) {
res.set('Cache-Control', 'no-cache');
}
... ... @@ -54,10 +54,10 @@ exports.index = (req, res, next) => {
slider: ret[0],
msgTypes: ret[1],
msgs: (+type === 0 && +page === 1) ?
_.concat(ret[2] && ret[2].msgs, ret[3] && ret[3].msgs) : ret[3] && ret[3].msgs,
hotTags: ret[4],
ads: ret[6],
exRecos: ret[6],
_.concat(ret[7] && ret[7].msgs, ret[2] && ret[2].msgs) : ret[2] && ret[2].msgs,
hotTags: ret[3],
ads: ret[4],
exRecos: ret[5],
guangIndexPage: true,
pageSize: pageSize,
... ... @@ -65,11 +65,11 @@ exports.index = (req, res, next) => {
pathNav: pathNav,
baseUrl: urlHelper.listUrl(channel, type),
page: page,
total: (ret[3] && ret[3].total) || 0
total: (ret[2] && ret[2].total) || 0
},
module: 'guang',
page: 'guang',
headerData: ret[7] && ret[7].headerData
headerData: ret[6] && ret[6].headerData
}));
}).catch(next);
... ...