正在显示
1 个修改的文件
包含
6 行增加
和
5 行删除
@@ -230,10 +230,9 @@ class LoginController extends HomeBaseController | @@ -230,10 +230,9 @@ class LoginController extends HomeBaseController | ||
230 | ->join('city_category c','p.city_id = c.id','LEFT') | 230 | ->join('city_category c','p.city_id = c.id','LEFT') |
231 | ->join('portal_category_post c_p','p.id = c_p.post_id','LEFT') | 231 | ->join('portal_category_post c_p','p.id = c_p.post_id','LEFT') |
232 | ->where('p.post_title','like','%'.$keyword.'%') | 232 | ->where('p.post_title','like','%'.$keyword.'%') |
233 | - ->where('c_p.category_id','<>',CityCategoryModel::xqyy) | ||
234 | ->where('c_p.category_id','<>',CityCategoryModel::xyhl) | 233 | ->where('c_p.category_id','<>',CityCategoryModel::xyhl) |
235 | ->where('p.delete_time', 0) | 234 | ->where('p.delete_time', 0) |
236 | - ->field('p.id,p.post_title,p.post_excerpt,p.post_favorites,c.name city_name') | 235 | + ->field('p.id,p.post_title,p.post_excerpt,p.post_favorites,c.name city_name,c.id city_id') |
237 | ->order('p.weigh desc') | 236 | ->order('p.weigh desc') |
238 | ->paginate($limit,false,['query'=>request()->param()]); | 237 | ->paginate($limit,false,['query'=>request()->param()]); |
239 | $data = $res->toArray(); | 238 | $data = $res->toArray(); |
@@ -253,7 +252,7 @@ class LoginController extends HomeBaseController | @@ -253,7 +252,7 @@ class LoginController extends HomeBaseController | ||
253 | foreach($category as $item){ | 252 | foreach($category as $item){ |
254 | if($value['id'] == $item['post_id']){ | 253 | if($value['id'] == $item['post_id']){ |
255 | $value['category_name'] = $item['name']; | 254 | $value['category_name'] = $item['name']; |
256 | - $value['post_url'] = $this->getDetailUrl($item['id']); | 255 | + $value['post_url'] = $this->getDetailUrl($item['id'],$value['city_id']); |
257 | } | 256 | } |
258 | } | 257 | } |
259 | } | 258 | } |
@@ -263,7 +262,6 @@ class LoginController extends HomeBaseController | @@ -263,7 +262,6 @@ class LoginController extends HomeBaseController | ||
263 | ->alias('p') | 262 | ->alias('p') |
264 | ->join('portal_category_post c_p','p.id = c_p.post_id','LEFT') | 263 | ->join('portal_category_post c_p','p.id = c_p.post_id','LEFT') |
265 | ->where('p.post_title','like','%'.$keyword.'%') | 264 | ->where('p.post_title','like','%'.$keyword.'%') |
266 | - ->where('c_p.category_id','<>',CityCategoryModel::xqyy) | ||
267 | ->where('c_p.category_id','<>',CityCategoryModel::xyhl) | 265 | ->where('c_p.category_id','<>',CityCategoryModel::xyhl) |
268 | ->where('p.delete_time', 0) | 266 | ->where('p.delete_time', 0) |
269 | ->count(); | 267 | ->count(); |
@@ -279,12 +277,15 @@ class LoginController extends HomeBaseController | @@ -279,12 +277,15 @@ class LoginController extends HomeBaseController | ||
279 | } | 277 | } |
280 | 278 | ||
281 | //获取各个板块详情页位置 | 279 | //获取各个板块详情页位置 |
282 | - public function getDetailUrl($c_id){ | 280 | + public function getDetailUrl($c_id,$city_id){ |
283 | $url = ''; | 281 | $url = ''; |
284 | switch ($c_id) { | 282 | switch ($c_id) { |
285 | case CityCategoryModel::xqgs: | 283 | case CityCategoryModel::xqgs: |
286 | $url = '/portal/star/getStoryDetail'; | 284 | $url = '/portal/star/getStoryDetail'; |
287 | break; | 285 | break; |
286 | + case CityCategoryModel::xqyy: | ||
287 | + $url = '/portal/region/getMoreVideo?city_id='.$city_id; | ||
288 | + break; | ||
288 | case CityCategoryModel::whmj: | 289 | case CityCategoryModel::whmj: |
289 | $url = '/portal/star/getSceneryDetail'; | 290 | $url = '/portal/star/getSceneryDetail'; |
290 | break; | 291 | break; |
-
请 注册 或 登录 后发表评论