Authored by ccbikai(👎🏻🍜)

Merge branch 'release/guang'

... ... @@ -88,7 +88,7 @@ const pageData = (req, res, next) => {
authorId = req.query.authorId,
isApp = req.yoho.isApp || false,
isTab = req.query.isTab || false,
showAuthor = true;
showAuthor = false;
let uid = req.user.uid,
udid = req.sessionID;
... ... @@ -102,7 +102,7 @@ const pageData = (req, res, next) => {
return;
}
if (!authorId && isNaN(authorId)) {
showAuthor = false;
showAuthor = true;
}
return indexModel.getPageData(gender, sortId, uid, udid, page, tag, authorId, isApp, showAuthor, isTab).then(data => {
if (data) {
... ...
... ... @@ -280,7 +280,7 @@ const index = (req, res, next) => {
}
// 作者信息数据
if (typeof detail.getAuthor.name !== 'undefined') {
if (detail && detail.getAuthor && (typeof detail.getAuthor.name !== 'undefined')) {
data.guang.author = {
avatar: detail.getAuthor.avatar.replace('http://', '//'),
name: detail.getAuthor.name,
... ...
... ... @@ -123,8 +123,9 @@ const getPageData = (gender, sortId, uid, udid, page, tag, authorId, isApp, show
let artList = article.data.list.artList;
artList.forEach(art => {
// build.push(guangProcess.formatArticle(art, true, isApp, showAuthor, uid));
build.push(guangProcess.formatArticle(art, true, isApp, true, uid));
build.push(guangProcess.formatArticle(art, true, isApp, showAuthor, uid));
// build.push(guangProcess.formatArticle(art, true, isApp, true, uid));
});
result.infos = build;
return result;
... ...
<div class="guang-list-page guang-page yoho-page">
{{# guang}}
{{# authorInfo}}
<div id="author-infos" class="editor-header clearfix" data-id={{id}}>
<div id="author-infos" class="editor-header clearfix" data-id={{uid}}>
<div class="avatar">
<img src="{{avatar}}">
</div>
... ...