作者 lyh

gx

... ... @@ -79,8 +79,7 @@ class NewsController extends BaseController
'id.required' => 'ID不能为空',
]);
$info = $newsLogic->newsInfo();
$info['url'] = $this->user['domain'] . $info['route'];
$info['image_link'] = getImageUrl($info['image']);
$this->response('success',Code::SUCCESS,$info);
}
... ...
... ... @@ -140,6 +140,8 @@ class NewsLogic extends BaseLogic
*/
public function newsInfo(){
$info = $this->model->read($this->param);
$info['url'] = $this->user['domain'] . $info['url'];
$info['image_link'] = getImageUrl($info['image']);
$newsCategoryLogic = new NewsCategoryLogic();
$info = $newsCategoryLogic->get_category_name($info);
return $this->success($info);
... ...