|
...
|
...
|
@@ -154,18 +154,19 @@ class NewsController extends BaseController |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :添加新闻时获取分类列表
|
|
|
|
* @author :liyuhang
|
|
|
|
* @method
|
|
|
|
* 添加新闻时获取分类列表
|
|
|
|
* @param NewsLogic $newsLogic
|
|
|
|
* @throws \App\Exceptions\BsideGlobalException
|
|
|
|
*/
|
|
|
|
public function get_category_list(NewsLogic $newsLogic){
|
|
|
|
$list = $newsLogic->news_get_category_list();
|
|
|
|
$this->response('success',Code::SUCCESS,$list);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :获取详情
|
|
|
|
* @author :liyuhang
|
|
|
|
* @method
|
|
|
|
* 获取新闻详情
|
|
|
|
* @param NewsLogic $newsLogic
|
|
|
|
* @throws \App\Exceptions\BsideGlobalException
|
|
|
|
*/
|
|
|
|
public function info(NewsLogic $newsLogic){
|
|
|
|
$this->request->validate([
|
|
...
|
...
|
@@ -174,6 +175,10 @@ class NewsController extends BaseController |
|
|
|
'id.required' => 'ID不能为空',
|
|
|
|
]);
|
|
|
|
$info = $newsLogic->newsInfo();
|
|
|
|
|
|
|
|
$template_id = $this->getTemplateId(BTemplate::SOURCE_NEWS,BTemplate::IS_DETAIL);//获取模版id
|
|
|
|
$info['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_NEWS,BTemplate::IS_DETAIL,$template_id, $info['id']);
|
|
|
|
|
|
|
|
$this->response('success',Code::SUCCESS,$info);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|