作者 lyh

gx

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