Authored by hf

modify to fixes bug guang author list show author info repeat

... ... @@ -265,8 +265,11 @@ class Helpers
$result['share'] = $isApp && isset($articleData['share']['url']) ? $articleData['share']['url'] : false;
// 判断是否显示作者信息
if ($showAuthor) {
$result['author'] = empty($articleData['author']) ? false : $articleData['author'];
if ($showAuthor && !empty($articleData['author'])) {
if (!$isApp) {
$articleData['author']['url'] = Helpers::getFilterUrl($articleData['author']['url']);
}
$result['author'] = $articleData['author'];
}
// 模板中需要的标签标识
... ...
... ... @@ -81,6 +81,7 @@ class ListModel
if (isset($introData['data']['brand_intro'])) {
$result['id'] = $id;
$result['intro'] = $introData['data']['brand_intro'];
$result['collected'] = (isset($introData['data']['is_favorite']) && $introData['data']['is_favorite'] == 'Y') ? true : false;
// 顶部导航的标题
$title = isset($introData['data']['brand_name']) ? $introData['data']['brand_name'] : '';
}
... ...
... ... @@ -154,11 +154,11 @@ class IndexController extends AbstractAction
$data['guangList'] = true;
// 作者信息
$data['author'] = array();
$data['author']['avatar'] = Helpers::getImageUrl($author['avatar'], 100, 100);
$data['author']['name'] = $author['name'];
$data['author']['info'] = $author['author_desc'];
$data['author']['id'] = $id;
$data['authorInfo'] = array();
$data['authorInfo']['avatar'] = Helpers::getImageUrl($author['avatar'], 100, 100);
$data['authorInfo']['name'] = $author['name'];
$data['authorInfo']['info'] = $author['author_desc'];
$data['authorInfo']['id'] = $id;
// 标签聚合内容列表
$article = ListData::article($gender, 0, $uid, $udid, 1, null, $id);
... ...