perf: author info

master
LiaoYijun 9 months ago
parent 626211c9e7
commit 9953cb3901

@ -2699,17 +2699,19 @@ class Information extends CI_Controller
$author = $this->Operator_model->get_author_nikename($information->ic_author);
$author_url = '';
$author_info = $this->get_author_info('japanhighlights.com', $author->OPI_Code);
$data['author_info'] = $author_info;
if (!empty($author)) {
$data['author_name'] = $author->OPI_FirstName;
$data['OPI_Code'] = $author->OPI_Code;
$author_info = $this->get_author_info('japanhighlights.com', $author->OPI_Code);
$data['author_info'] = $author_info;
$author_url = $this->get_author_url('www.japanhighlights.com', $author->OPI_Code);
} else {
$author_web = $this->Infoauthors_model->detail_by_id($information->ic_author); //原始作者,可能是在线作者等
if (!empty($author_web)) {
$data['author_name'] = $author_web->a_name;
$data['author_info'] = ['url' => '', 'avatar' => '', 'expertise' => ''];
}
}
$data['breadcrumb_data'] = $breadcrumb_data;
@ -6270,6 +6272,6 @@ class Information extends CI_Controller
$authorData['2'] = $authorData['zzy'];
$authorData['zzyGH'] = $authorData['zzy'];
return isset($authorData[$OPI_Code]) ? $authorData[$OPI_Code] : ['url' => '', 'avatar' => '', 'expertise' => '', 'name' => ''];
return isset($authorData[$OPI_Code]) ? $authorData[$OPI_Code] : ['url' => '', 'avatar' => '', 'expertise' => ''];
}
}

Loading…
Cancel
Save