Merge branch 'master' of http://114.215.101.231:8099/jinglong/xingqiu
正在显示
7 个修改的文件
包含
16 行增加
和
11 行删除
@@ -98,8 +98,8 @@ class IndexController extends HomeBaseController | @@ -98,8 +98,8 @@ class IndexController extends HomeBaseController | ||
98 | // if(!$res_djxq){ | 98 | // if(!$res_djxq){ |
99 | $position = CityCategoryModel::xqyy; | 99 | $position = CityCategoryModel::xqyy; |
100 | $city_id = CityCategoryModel::djxq; | 100 | $city_id = CityCategoryModel::djxq; |
101 | - $field = 'id,more,thumbnail'; | ||
102 | - $res_djxq = $this->getVideo($position,$city_id,$field,1); | 101 | + $field = 'id,more,index_thumbnail'; |
102 | + $res_djxq = $this->getVideo($position,$city_id,$field,1,1); | ||
103 | foreach($res_djxq as &$value){ | 103 | foreach($res_djxq as &$value){ |
104 | $video = json_decode($value['more'],true); | 104 | $video = json_decode($value['more'],true); |
105 | $value['video'] = $video['video']; | 105 | $value['video'] = $video['video']; |
@@ -234,7 +234,7 @@ class IndexController extends HomeBaseController | @@ -234,7 +234,7 @@ class IndexController extends HomeBaseController | ||
234 | } | 234 | } |
235 | 235 | ||
236 | //获取推荐视频 | 236 | //获取推荐视频 |
237 | - public function getVideo($position,$city_id,$field,$limit=''){ | 237 | + public function getVideo($position,$city_id,$field,$limit='',$extension=''){ |
238 | $pre = CityCategoryModel::pre; | 238 | $pre = CityCategoryModel::pre; |
239 | $limit = empty($limit)?0:$limit; | 239 | $limit = empty($limit)?0:$limit; |
240 | $post_id = Db::table($pre.'portal_category_post') | 240 | $post_id = Db::table($pre.'portal_category_post') |
@@ -244,9 +244,14 @@ class IndexController extends HomeBaseController | @@ -244,9 +244,14 @@ class IndexController extends HomeBaseController | ||
244 | ->toArray(); | 244 | ->toArray(); |
245 | $post_id = array_column($post_id,'post_id'); | 245 | $post_id = array_column($post_id,'post_id'); |
246 | //查询文章 | 246 | //查询文章 |
247 | + if(!empty($extension)){ | ||
248 | + $where = ['city_id'=>$city_id,'is_show'=>1]; | ||
249 | + }else{ | ||
250 | + $where = ['city_id'=>$city_id]; | ||
251 | + } | ||
247 | $res = Db::table($pre.'portal_post') | 252 | $res = Db::table($pre.'portal_post') |
248 | ->whereIn('id',$post_id) | 253 | ->whereIn('id',$post_id) |
249 | - ->where('city_id', $city_id) | 254 | + ->where($where) |
250 | ->where('delete_time', 0) | 255 | ->where('delete_time', 0) |
251 | ->field($field) | 256 | ->field($field) |
252 | ->limit($limit) | 257 | ->limit($limit) |
@@ -134,7 +134,7 @@ class StarController extends HomeBaseController | @@ -134,7 +134,7 @@ class StarController extends HomeBaseController | ||
134 | $pre = CityCategoryModel::pre; | 134 | $pre = CityCategoryModel::pre; |
135 | $limit = empty($limit)?$this->more_limit:$limit; | 135 | $limit = empty($limit)?$this->more_limit:$limit; |
136 | if($limit == -1){ | 136 | if($limit == -1){ |
137 | - $limit = 0; | 137 | + $limit = 1500; |
138 | } | 138 | } |
139 | $post_id = Db::table($pre.'portal_category_post') | 139 | $post_id = Db::table($pre.'portal_category_post') |
140 | ->whereIn('category_id',$position['category_id']) | 140 | ->whereIn('category_id',$position['category_id']) |
@@ -185,7 +185,7 @@ | @@ -185,7 +185,7 @@ | ||
185 | <div class="navbar navbar-default"> | 185 | <div class="navbar navbar-default"> |
186 | <div class="container-fluid"> | 186 | <div class="container-fluid"> |
187 | <div class="navbar-header"> | 187 | <div class="navbar-header"> |
188 | - <a href="{:url('admin/index/index')}" class="navbar-brand" style="min-width: 200px;text-align: center;">ThinkCMF</a> | 188 | + <a href="{:url('admin/index/index')}" class="navbar-brand" style="min-width: 200px;text-align: center;">独角星球</a> |
189 | <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main"> | 189 | <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main"> |
190 | <span class="icon-bar"></span> | 190 | <span class="icon-bar"></span> |
191 | <span class="icon-bar"></span> | 191 | <span class="icon-bar"></span> |
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | <div class="container"> | 31 | <div class="container"> |
32 | <div class="row"> | 32 | <div class="row"> |
33 | <div class="col-md-4 col-md-offset-4"> | 33 | <div class="col-md-4 col-md-offset-4"> |
34 | - <h1 class="text-center">ThinkCMF</h1> | 34 | + <h1 class="text-center">独角星球</h1> |
35 | <form class="js-ajax-form" action="{:url('public/doLogin')}" method="post"> | 35 | <form class="js-ajax-form" action="{:url('public/doLogin')}" method="post"> |
36 | <div class="form-group"> | 36 | <div class="form-group"> |
37 | <input type="text" id="input_username" class="form-control" name="username" | 37 | <input type="text" id="input_username" class="form-control" name="username" |
@@ -93,7 +93,7 @@ | @@ -93,7 +93,7 @@ | ||
93 | <div class="mask_video"> | 93 | <div class="mask_video"> |
94 | <img class="mak_videoCha" onclick="nos()" src="__TMPL__/public/assets/starImg/nos.png" alt="独角星球 小众目的地 旅游资讯"> | 94 | <img class="mak_videoCha" onclick="nos()" src="__TMPL__/public/assets/starImg/nos.png" alt="独角星球 小众目的地 旅游资讯"> |
95 | <div class="mask_videoFeng"> | 95 | <div class="mask_videoFeng"> |
96 | - <img src="{:cmf_get_image_url($res_djxq.thumbnail)}" alt="独角星球 小众目的地 旅游资讯"> | 96 | + <img src="{:cmf_get_image_url($res_djxq.index_thumbnail)}" alt="独角星球 小众目的地 旅游资讯"> |
97 | </div> | 97 | </div> |
98 | <img onclick="bofang2()" class="show_in_banner3" src="__TMPL__/public/assets/starImg/aicon_30.png" alt="独角星球 小众目的地 旅游资讯"> | 98 | <img onclick="bofang2()" class="show_in_banner3" src="__TMPL__/public/assets/starImg/aicon_30.png" alt="独角星球 小众目的地 旅游资讯"> |
99 | <video controls loop="loop" id="video2" src="{:cmf_get_file_download_url($res_djxq.video)}" controlslist="nodownload"></video> | 99 | <video controls loop="loop" id="video2" src="{:cmf_get_file_download_url($res_djxq.video)}" controlslist="nodownload"></video> |
@@ -73,7 +73,7 @@ | @@ -73,7 +73,7 @@ | ||
73 | <div class="vi_video"> | 73 | <div class="vi_video"> |
74 | <video src="{:cmf_get_file_download_url($res_djxq.video)}" id="video2" style="height: 3.4rem;width: 100%;" controls controlslist="nodownload"></video> | 74 | <video src="{:cmf_get_file_download_url($res_djxq.video)}" id="video2" style="height: 3.4rem;width: 100%;" controls controlslist="nodownload"></video> |
75 | <div class="vi_fengm"> | 75 | <div class="vi_fengm"> |
76 | - <img src="{:cmf_get_image_url($res_djxq.thumbnail)}" alt="独角星球 小众目的地 旅游资讯"> | 76 | + <img src="{:cmf_get_image_url($res_djxq.index_thumbnail)}" alt="独角星球 小众目的地 旅游资讯"> |
77 | </div> | 77 | </div> |
78 | <div class="video_start99"> | 78 | <div class="video_start99"> |
79 | <img onclick="bofang2()" src="__TMPL__/public/assets/images/aicon_30.png" alt="独角星球 小众目的地 旅游资讯"> | 79 | <img onclick="bofang2()" src="__TMPL__/public/assets/images/aicon_30.png" alt="独角星球 小众目的地 旅游资讯"> |
-
请 注册 或 登录 后发表评论