正在显示
1 个修改的文件
包含
11 行增加
和
6 行删除
| @@ -154,18 +154,19 @@ class NewsController extends BaseController | @@ -154,18 +154,19 @@ class NewsController extends BaseController | ||
| 154 | 154 | ||
| 155 | 155 | ||
| 156 | /** | 156 | /** |
| 157 | - * @name :添加新闻时获取分类列表 | ||
| 158 | - * @author :liyuhang | ||
| 159 | - * @method | 157 | + * 添加新闻时获取分类列表 |
| 158 | + * @param NewsLogic $newsLogic | ||
| 159 | + * @throws \App\Exceptions\BsideGlobalException | ||
| 160 | */ | 160 | */ |
| 161 | public function get_category_list(NewsLogic $newsLogic){ | 161 | public function get_category_list(NewsLogic $newsLogic){ |
| 162 | $list = $newsLogic->news_get_category_list(); | 162 | $list = $newsLogic->news_get_category_list(); |
| 163 | $this->response('success',Code::SUCCESS,$list); | 163 | $this->response('success',Code::SUCCESS,$list); |
| 164 | } | 164 | } |
| 165 | + | ||
| 165 | /** | 166 | /** |
| 166 | - * @name :获取详情 | ||
| 167 | - * @author :liyuhang | ||
| 168 | - * @method | 167 | + * 获取新闻详情 |
| 168 | + * @param NewsLogic $newsLogic | ||
| 169 | + * @throws \App\Exceptions\BsideGlobalException | ||
| 169 | */ | 170 | */ |
| 170 | public function info(NewsLogic $newsLogic){ | 171 | public function info(NewsLogic $newsLogic){ |
| 171 | $this->request->validate([ | 172 | $this->request->validate([ |
| @@ -174,6 +175,10 @@ class NewsController extends BaseController | @@ -174,6 +175,10 @@ class NewsController extends BaseController | ||
| 174 | 'id.required' => 'ID不能为空', | 175 | 'id.required' => 'ID不能为空', |
| 175 | ]); | 176 | ]); |
| 176 | $info = $newsLogic->newsInfo(); | 177 | $info = $newsLogic->newsInfo(); |
| 178 | + | ||
| 179 | + $template_id = $this->getTemplateId(BTemplate::SOURCE_NEWS,BTemplate::IS_DETAIL);//获取模版id | ||
| 180 | + $info['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_NEWS,BTemplate::IS_DETAIL,$template_id, $info['id']); | ||
| 181 | + | ||
| 177 | $this->response('success',Code::SUCCESS,$info); | 182 | $this->response('success',Code::SUCCESS,$info); |
| 178 | } | 183 | } |
| 179 | 184 |
-
请 注册 或 登录 后发表评论