Merge branch 'release/guang'
Showing
4 changed files
with
7 additions
and
6 deletions
@@ -88,7 +88,7 @@ const pageData = (req, res, next) => { | @@ -88,7 +88,7 @@ const pageData = (req, res, next) => { | ||
88 | authorId = req.query.authorId, | 88 | authorId = req.query.authorId, |
89 | isApp = req.yoho.isApp || false, | 89 | isApp = req.yoho.isApp || false, |
90 | isTab = req.query.isTab || false, | 90 | isTab = req.query.isTab || false, |
91 | - showAuthor = true; | 91 | + showAuthor = false; |
92 | 92 | ||
93 | let uid = req.user.uid, | 93 | let uid = req.user.uid, |
94 | udid = req.sessionID; | 94 | udid = req.sessionID; |
@@ -102,7 +102,7 @@ const pageData = (req, res, next) => { | @@ -102,7 +102,7 @@ const pageData = (req, res, next) => { | ||
102 | return; | 102 | return; |
103 | } | 103 | } |
104 | if (!authorId && isNaN(authorId)) { | 104 | if (!authorId && isNaN(authorId)) { |
105 | - showAuthor = false; | 105 | + showAuthor = true; |
106 | } | 106 | } |
107 | return indexModel.getPageData(gender, sortId, uid, udid, page, tag, authorId, isApp, showAuthor, isTab).then(data => { | 107 | return indexModel.getPageData(gender, sortId, uid, udid, page, tag, authorId, isApp, showAuthor, isTab).then(data => { |
108 | if (data) { | 108 | if (data) { |
@@ -280,7 +280,7 @@ const index = (req, res, next) => { | @@ -280,7 +280,7 @@ const index = (req, res, next) => { | ||
280 | } | 280 | } |
281 | 281 | ||
282 | // 作者信息数据 | 282 | // 作者信息数据 |
283 | - if (typeof detail.getAuthor.name !== 'undefined') { | 283 | + if (detail && detail.getAuthor && (typeof detail.getAuthor.name !== 'undefined')) { |
284 | data.guang.author = { | 284 | data.guang.author = { |
285 | avatar: detail.getAuthor.avatar.replace('http://', '//'), | 285 | avatar: detail.getAuthor.avatar.replace('http://', '//'), |
286 | name: detail.getAuthor.name, | 286 | name: detail.getAuthor.name, |
@@ -123,8 +123,9 @@ const getPageData = (gender, sortId, uid, udid, page, tag, authorId, isApp, show | @@ -123,8 +123,9 @@ const getPageData = (gender, sortId, uid, udid, page, tag, authorId, isApp, show | ||
123 | let artList = article.data.list.artList; | 123 | let artList = article.data.list.artList; |
124 | 124 | ||
125 | artList.forEach(art => { | 125 | artList.forEach(art => { |
126 | - // build.push(guangProcess.formatArticle(art, true, isApp, showAuthor, uid)); | ||
127 | - build.push(guangProcess.formatArticle(art, true, isApp, true, uid)); | 126 | + build.push(guangProcess.formatArticle(art, true, isApp, showAuthor, uid)); |
127 | + | ||
128 | + // build.push(guangProcess.formatArticle(art, true, isApp, true, uid)); | ||
128 | }); | 129 | }); |
129 | result.infos = build; | 130 | result.infos = build; |
130 | return result; | 131 | return result; |
1 | <div class="guang-list-page guang-page yoho-page"> | 1 | <div class="guang-list-page guang-page yoho-page"> |
2 | {{# guang}} | 2 | {{# guang}} |
3 | {{# authorInfo}} | 3 | {{# authorInfo}} |
4 | - <div id="author-infos" class="editor-header clearfix" data-id={{id}}> | 4 | + <div id="author-infos" class="editor-header clearfix" data-id={{uid}}> |
5 | <div class="avatar"> | 5 | <div class="avatar"> |
6 | <img src="{{avatar}}"> | 6 | <img src="{{avatar}}"> |
7 | </div> | 7 | </div> |
-
Please register or login to post a comment