...
|
...
|
@@ -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,25 +72,13 @@ 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);
|
...
|
...
|
@@ -101,9 +89,13 @@ class IndexController extends HomeBaseController |
|
|
if($res_xqyy){
|
|
|
$res_xqyy = $res_xqyy[0];
|
|
|
}
|
|
|
// cache('res_xqyy', $res_xqyy);
|
|
|
// }
|
|
|
$this->assign('res_xqyy',$res_xqyy);
|
|
|
|
|
|
//推广视频
|
|
|
$res_djxq = cache('res_djxq');
|
|
|
if(!$res_djxq){
|
|
|
$position = CityCategoryModel::xqyy;
|
|
|
$city_id = CityCategoryModel::djxq;
|
|
|
$field = 'id,more,thumbnail';
|
...
|
...
|
@@ -115,8 +107,11 @@ class IndexController extends HomeBaseController |
|
|
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();
|
...
|
...
|
|