作者 zhangwei
... ... @@ -11,8 +11,8 @@
return [
// 应用调试模式
'app_debug' => true,
'app_debug' => false,
// 应用Trace
'app_trace' => true,
'app_trace' => false,
];
\ No newline at end of file
... ...
... ... @@ -98,8 +98,8 @@ class IndexController extends HomeBaseController
// if(!$res_djxq){
$position = CityCategoryModel::xqyy;
$city_id = CityCategoryModel::djxq;
$field = 'id,more,thumbnail';
$res_djxq = $this->getVideo($position,$city_id,$field,1);
$field = 'id,more,index_thumbnail';
$res_djxq = $this->getVideo($position,$city_id,$field,1,1);
foreach($res_djxq as &$value){
$video = json_decode($value['more'],true);
$value['video'] = $video['video'];
... ... @@ -234,7 +234,7 @@ class IndexController extends HomeBaseController
}
//获取推荐视频
public function getVideo($position,$city_id,$field,$limit=''){
public function getVideo($position,$city_id,$field,$limit='',$extension=''){
$pre = CityCategoryModel::pre;
$limit = empty($limit)?0:$limit;
$post_id = Db::table($pre.'portal_category_post')
... ... @@ -244,9 +244,14 @@ class IndexController extends HomeBaseController
->toArray();
$post_id = array_column($post_id,'post_id');
//查询文章
if(!empty($extension)){
$where = ['city_id'=>$city_id,'is_show'=>1];
}else{
$where = ['city_id'=>$city_id];
}
$res = Db::table($pre.'portal_post')
->whereIn('id',$post_id)
->where('city_id', $city_id)
->where($where)
->where('delete_time', 0)
->field($field)
->limit($limit)
... ...
... ... @@ -134,7 +134,7 @@ class StarController extends HomeBaseController
$pre = CityCategoryModel::pre;
$limit = empty($limit)?$this->more_limit:$limit;
if($limit == -1){
$limit = 0;
$limit = 1500;
}
$post_id = Db::table($pre.'portal_category_post')
->whereIn('category_id',$position['category_id'])
... ...
... ... @@ -185,7 +185,7 @@
<div class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a href="{:url('admin/index/index')}" class="navbar-brand" style="min-width: 200px;text-align: center;">ThinkCMF</a>
<a href="{:url('admin/index/index')}" class="navbar-brand" style="min-width: 200px;text-align: center;">独角星球</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
... ...
... ... @@ -31,7 +31,7 @@
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<h1 class="text-center">ThinkCMF</h1>
<h1 class="text-center">独角星球</h1>
<form class="js-ajax-form" action="{:url('public/doLogin')}" method="post">
<div class="form-group">
<input type="text" id="input_username" class="form-control" name="username"
... ...
... ... @@ -93,7 +93,7 @@
<div class="mask_video">
<img class="mak_videoCha" onclick="nos()" src="__TMPL__/public/assets/starImg/nos.png" alt="独角星球 小众目的地 旅游资讯">
<div class="mask_videoFeng">
<img src="{:cmf_get_image_url($res_djxq.thumbnail)}" alt="独角星球 小众目的地 旅游资讯">
<img src="{:cmf_get_image_url($res_djxq.index_thumbnail)}" alt="独角星球 小众目的地 旅游资讯">
</div>
<img onclick="bofang2()" class="show_in_banner3" src="__TMPL__/public/assets/starImg/aicon_30.png" alt="独角星球 小众目的地 旅游资讯">
<video controls loop="loop" id="video2" src="{:cmf_get_file_download_url($res_djxq.video)}" controlslist="nodownload"></video>
... ...
... ... @@ -73,7 +73,7 @@
<div class="vi_video">
<video src="{:cmf_get_file_download_url($res_djxq.video)}" id="video2" style="height: 3.4rem;width: 100%;" controls controlslist="nodownload"></video>
<div class="vi_fengm">
<img src="{:cmf_get_image_url($res_djxq.thumbnail)}" alt="独角星球 小众目的地 旅游资讯">
<img src="{:cmf_get_image_url($res_djxq.index_thumbnail)}" alt="独角星球 小众目的地 旅游资讯">
</div>
<div class="video_start99">
<img onclick="bofang2()" src="__TMPL__/public/assets/images/aicon_30.png" alt="独角星球 小众目的地 旅游资讯">
... ...