Authored by 郝肖肖

逛相关品牌 https

... ... @@ -74,7 +74,7 @@ class InfoModel
$result['pathNav'] = self::getCenterCrumb($article['article_title'], $channel);
//文章头部信息
$result['header']['title'] = $article['article_title'];
$result['header']['avatar'] = isset($data['author']['avatar']) && !empty($data['author']['avatar']) ? $data['author']['avatar'] : '';
$result['header']['avatar'] = isset($data['author']['avatar']) && !empty($data['author']['avatar']) ? Helpers::getUrlSafe($data['author']['avatar']) : '';
$result['header']['name'] = isset($data['author']['name']) && !empty($data['author']['name']) ? $data['author']['name'] : '';
$result['header']['authorUrl'] = isset($data['author']['name']) && !empty($data['author']['name']) ? Helpers::url('/Index/editor', array('author_id'=>$article['author_id']), 'guang') : '';
$result['header']['intro'] = isset($data['author']['author_desc']) && !empty($data['author']['author_desc']) ? $data['author']['author_desc'] : '';
... ... @@ -119,8 +119,13 @@ class InfoModel
}
}
//相关品牌
$result['brands'] = array();
if (isset($data['brands']) && !empty($data['brands'])) {
$result['brands'] = $data['brands'];
$result['brands'][] = array_map(function($val) {
$val['thumb'] = Helpers::getUrlSafe($val['thumb']);
$val['url'] = Helpers::getUrlSafe($val['url']);
return $val;
}, $data['brands']);
}
//相关文章
if (isset($data['relate']) && !empty($data['relate'])) {
... ...