作者 景龙
1 个管道 的构建 通过 耗费 3 秒

调节个人主页整体的大小

... ... @@ -170,7 +170,7 @@ $configs = [
// 缓存前缀
'prefix' => '',
// 缓存有效期 0表示永久缓存
'expire' => 0,
'expire' => 3600,
],
// +----------------------------------------------------------------------
// | 会话设置
... ...
... ... @@ -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();
... ...
... ... @@ -196,6 +196,6 @@ body {
color: #FFFEFE;
margin-top:30px ;
font-size: 16px;
margin-bottom: 20px;
/*margin-bottom: 20px;*/
/*font-synthesis: 16px;*/
}
... ...
... ... @@ -9,45 +9,45 @@
-ms-transform:translate(-50%,-50%);
}
.personal_center {
width: 519px;
height: 386px;
width: 487px;
height: 330px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 32px 36px 2px rgba(0, 0, 0, 0.04);
border-radius: 20px;
margin: 0 auto;
padding: 0 160px;
padding-top: 94px;
padding: 0 159px;
padding-top:81px;
box-sizing: border-box;
}
.personal_center_avatar {
width: 140px;
height: 140px;
width: 125px;
height: 125px;
background: #fff;
border-radius: 50%;
top: -75px;
top: -58px;
position: absolute;
left: 191px;
left: 181px;
}
.personal_center_avatar img {
margin: 5px;
width:130px;
height:130px;
width:115px;
height:115px;
border-radius:50%;
}
.Editor_avatar,
.Modifying,
.Collection {
height: 64px;
height: 58px;
background: rgba(43, 213, 135, 1);
border-radius: 32px;
padding: 22px 41px;
padding: 20px 32px;
box-sizing: border-box;
color: #fff;
font-size: 20px;
margin-bottom: 24px;
font-size: 18px;
margin-bottom: 17px;
cursor: pointer;
}
... ... @@ -111,8 +111,8 @@
width: 150px;
height: 55px;
font-size: 12px;
right: 185px;
top: 120px;
right: 167px;
top: 82px;
opacity: 0;
cursor: pointer;
}
... ...