...
|
...
|
@@ -168,7 +168,17 @@ const index = (req, res, next) => { |
|
|
isShare = isWeixin || isqq || isWeibo ? true : false;
|
|
|
|
|
|
co(function* () {
|
|
|
let ret = yield tdk('article', id, req);
|
|
|
let [ret, detail, commentsTotal, praise, wxFooter] = yield Promise.all([
|
|
|
tdk('article', id, req),
|
|
|
req.ctx(DetailModel).packageData(id, isApp, isWeixin, channel, isShare),
|
|
|
req.ctx(DetailModel).commentsTotal({ article_id: id, udid: udid }),
|
|
|
req.ctx(DetailModel).getArticlePraiseAndFavor({
|
|
|
uid: uid,
|
|
|
id: id,
|
|
|
udid: udid
|
|
|
}),
|
|
|
req.ctx(aboutModel).about(req.yoho.isApp)
|
|
|
]);
|
|
|
|
|
|
if (ret[0]) {
|
|
|
req.tdk = {
|
...
|
...
|
@@ -177,13 +187,7 @@ const index = (req, res, next) => { |
|
|
description: ret[3]
|
|
|
};
|
|
|
}
|
|
|
let detail = yield req.ctx(DetailModel).packageData(id, isApp, isWeixin, channel, isShare);
|
|
|
let commentsTotal = yield req.ctx(DetailModel).commentsTotal({article_id: id, udid: udid});
|
|
|
let praise = yield req.ctx(DetailModel).getArticlePraiseAndFavor({
|
|
|
uid: uid,
|
|
|
id: id,
|
|
|
udid: udid
|
|
|
});
|
|
|
|
|
|
let data = {
|
|
|
guangDetail: true,
|
|
|
guang: {}
|
...
|
...
|
@@ -275,9 +279,7 @@ const index = (req, res, next) => { |
|
|
// 标识有微信分享
|
|
|
data.hasWxShare = true;
|
|
|
|
|
|
let resu = yield req.ctx(aboutModel).about(req.yoho.isApp);
|
|
|
|
|
|
data.guang.wxFooter = resu;
|
|
|
data.guang.wxFooter = wxFooter;
|
|
|
res.render('info/index', Object.assign({
|
|
|
page: 'info-index',
|
|
|
gender: gender,
|
...
|
...
|
|