...
|
...
|
@@ -25,7 +25,7 @@ class IndexController extends HomeBaseController |
|
|
$coverImg = cache('coverImg');
|
|
|
if(!$coverImg){
|
|
|
$coverImg = $this->getCoverImg(CityCategoryModel::indexImg,3);
|
|
|
cache('coverImg',$coverImg,86400);
|
|
|
cache('coverImg',$coverImg);
|
|
|
}
|
|
|
$this->assign('coverImg',$coverImg);
|
|
|
|
...
|
...
|
@@ -52,7 +52,7 @@ class IndexController extends HomeBaseController |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
cache('res_city', $city,86400);//有效期一天
|
|
|
cache('res_city', $city);
|
|
|
}
|
|
|
$this->assign('res_city',$city);
|
|
|
|
...
|
...
|
@@ -72,51 +72,46 @@ class IndexController extends HomeBaseController |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
cache('res_month', $month,86400);//有效期一天
|
|
|
cache('res_month', $month);
|
|
|
}
|
|
|
$this->assign('res_month',$month);
|
|
|
|
|
|
//星域秀场->星球影院
|
|
|
// $res_xqyy = cache('res_xqyy');
|
|
|
// if(!$res_xqyy){
|
|
|
// $position = CityCategoryModel::xqyy;
|
|
|
// $field = 'id,more,thumbnail';
|
|
|
// $res_xqyy = $this->getVideoIndex($position,$field,1);
|
|
|
// foreach($res_xqyy as &$value){
|
|
|
// $video = json_decode($value['more'],true);
|
|
|
// $value['video'] = $video['video'];
|
|
|
// }
|
|
|
// if($res_xqyy){
|
|
|
// $res_xqyy = $res_xqyy[0];
|
|
|
// }
|
|
|
// cache('res_xqyy', $res_xqyy,86400);//有效期一天
|
|
|
$position = CityCategoryModel::xqyy;
|
|
|
$field = 'id,more,index_thumbnail';
|
|
|
$res_xqyy = $this->getVideoIndex($position,$field,1);
|
|
|
foreach($res_xqyy as &$value){
|
|
|
$video = json_decode($value['more'],true);
|
|
|
$value['video'] = $video['video'];
|
|
|
}
|
|
|
if($res_xqyy){
|
|
|
$res_xqyy = $res_xqyy[0];
|
|
|
}
|
|
|
// cache('res_xqyy', $res_xqyy);
|
|
|
// }
|
|
|
$position = CityCategoryModel::xqyy;
|
|
|
$field = 'id,more,index_thumbnail';
|
|
|
$res_xqyy = $this->getVideoIndex($position,$field,1);
|
|
|
foreach($res_xqyy as &$value){
|
|
|
$video = json_decode($value['more'],true);
|
|
|
$value['video'] = $video['video'];
|
|
|
}
|
|
|
if($res_xqyy){
|
|
|
$res_xqyy = $res_xqyy[0];
|
|
|
}
|
|
|
$this->assign('res_xqyy',$res_xqyy);
|
|
|
|
|
|
//推广视频
|
|
|
$position = CityCategoryModel::xqyy;
|
|
|
$city_id = CityCategoryModel::djxq;
|
|
|
$field = 'id,more,thumbnail';
|
|
|
$res_djxq = $this->getVideo($position,$city_id,$field,1);
|
|
|
foreach($res_djxq as &$value){
|
|
|
$video = json_decode($value['more'],true);
|
|
|
$value['video'] = $video['video'];
|
|
|
}
|
|
|
if($res_djxq){
|
|
|
$res_djxq = $res_djxq[0];
|
|
|
$res_djxq = cache('res_djxq');
|
|
|
if(!$res_djxq){
|
|
|
$position = CityCategoryModel::xqyy;
|
|
|
$city_id = CityCategoryModel::djxq;
|
|
|
$field = 'id,more,thumbnail';
|
|
|
$res_djxq = $this->getVideo($position,$city_id,$field,1);
|
|
|
foreach($res_djxq as &$value){
|
|
|
$video = json_decode($value['more'],true);
|
|
|
$value['video'] = $video['video'];
|
|
|
}
|
|
|
if($res_djxq){
|
|
|
$res_djxq = $res_djxq[0];
|
|
|
}
|
|
|
cache('res_djxq', $res_djxq);
|
|
|
}
|
|
|
$this->assign('res_djxq',$res_djxq);
|
|
|
|
|
|
|
|
|
//星域秀场->明星访谈
|
|
|
$res_mxft = cache('res_mxft');
|
|
|
if(!$res_mxft){
|
...
|
...
|
@@ -126,7 +121,7 @@ class IndexController extends HomeBaseController |
|
|
if($res_mxft){
|
|
|
$res_mxft = $res_mxft[0];
|
|
|
}
|
|
|
cache('res_mxft',$res_mxft,86400);
|
|
|
cache('res_mxft',$res_mxft);
|
|
|
}
|
|
|
$this->assign('res_mxft',$res_mxft);
|
|
|
|
...
|
...
|
@@ -137,7 +132,7 @@ class IndexController extends HomeBaseController |
|
|
$position = CityCategoryModel::xyhl;
|
|
|
$field = 'id,thumbnail';
|
|
|
$res_xyhl = $this->getChildArticle($position,$field,16);
|
|
|
cache('res_xyhl',$res_xyhl,86400);
|
|
|
cache('res_xyhl',$res_xyhl);
|
|
|
}
|
|
|
$this->assign('res_xyhl',$res_xyhl);
|
|
|
|
...
|
...
|
@@ -148,7 +143,7 @@ class IndexController extends HomeBaseController |
|
|
$position = CityCategoryModel::xttj;
|
|
|
$field = 'id,post_title,price,index_thumbnail,place';
|
|
|
$res_xttj = $this->getParentArticle($position,$field,16);
|
|
|
cache('res_xttj',$res_xttj,86400);
|
|
|
cache('res_xttj',$res_xttj);
|
|
|
}
|
|
|
$this->assign('res_xttj',$res_xttj);
|
|
|
|
...
|
...
|
@@ -159,7 +154,7 @@ class IndexController extends HomeBaseController |
|
|
$position = CityCategoryModel::xjhd;
|
|
|
$field = 'id,post_title,thumbnail';
|
|
|
$res_xjhd = $this->getParentArticle($position,$field,2);
|
|
|
cache('res_xjhd',$res_xjhd,86400);
|
|
|
cache('res_xjhd',$res_xjhd);
|
|
|
}
|
|
|
$this->assign('res_xjhd',$res_xjhd);
|
|
|
return $this->fetch();
|
...
|
...
|
|