切换导航条
此项目
正在载入...
登录
景龙
/
xingqiu
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
景龙
6 years ago
提交
5b774bd5191c52f02d395b7437348619642d4b1a
1 个父辈
f23b436d
1 个管道 的构建
通过
耗费 2 秒
关闭首页缓存
变更
1
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
24 行增加
和
24 行删除
app/portal/controller/IndexController.php
app/portal/controller/IndexController.php
查看文件 @
5b774bd
...
...
@@ -22,16 +22,16 @@ class IndexController extends HomeBaseController
//统计访问量
$serverModel
->
statistics
();
//banner轮播图
$coverImg
=
cache
(
'coverImg'
);
if
(
!
$coverImg
){
// $coverImg = cache('coverImg');
// if(!$coverImg){
$coverImg
=
$this
->
getCoverImg
(
CityCategoryModel
::
indexImg
,
3
);
cache
(
'coverImg'
,
$coverImg
);
}
// cache('coverImg',$coverImg);
// }
$this
->
assign
(
'coverImg'
,
$coverImg
);
//星球奇境,城市分类
$city
=
cache
(
'res_city'
);
if
(
!
$city
){
// $city = cache('res_city');
// if(!$city){
$city
[
1
][
'id'
]
=
CityCategoryModel
::
asia
;
$city
[
2
][
'id'
]
=
CityCategoryModel
::
europe
;
$city
[
3
][
'id'
]
=
CityCategoryModel
::
africa
;
...
...
@@ -52,13 +52,13 @@ class IndexController extends HomeBaseController
}
}
}
cache
(
'res_city'
,
$city
);
}
// cache('res_city', $city);
// }
$this
->
assign
(
'res_city'
,
$city
);
//星享体验
$month
=
cache
(
'res_month'
);
if
(
!
$month
){
// $month = cache('res_month');
// if(!$month){
$res_month
=
$this
->
getMonthArticle
();
$month
=
[];
foreach
(
$res_month
[
'data'
]
as
&
$value
){
...
...
@@ -72,8 +72,8 @@ class IndexController extends HomeBaseController
}
}
}
cache
(
'res_month'
,
$month
);
}
// cache('res_month', $month);
// }
$this
->
assign
(
'res_month'
,
$month
);
//星域秀场->星球影院
...
...
@@ -113,27 +113,27 @@ class IndexController extends HomeBaseController
//星域秀场->明星访谈
$res_mxft
=
cache
(
'res_mxft'
);
if
(
!
$res_mxft
){
// $res_mxft = cache('res_mxft');
// if(!$res_mxft){
$position
=
CityCategoryModel
::
mxft
;
$field
=
'id,full_name,position,trade,post_excerpt,thumbnail avatar'
;
$res_mxft
=
$this
->
getChildArticle
(
$position
,
$field
,
1
);
if
(
$res_mxft
){
$res_mxft
=
$res_mxft
[
0
];
}
cache
(
'res_mxft'
,
$res_mxft
);
}
// cache('res_mxft',$res_mxft);
// }
$this
->
assign
(
'res_mxft'
,
$res_mxft
);
//星域秀场->星域画廊
$res_xyhl
=
cache
(
'res_xyhl'
);
if
(
!
$res_xyhl
){
// $res_xyhl = cache('res_xyhl');
// if(!$res_xyhl){
$position
=
CityCategoryModel
::
xyhl
;
$field
=
'id,thumbnail'
;
$res_xyhl
=
$this
->
getChildArticle
(
$position
,
$field
,
16
);
cache
(
'res_xyhl'
,
$res_xyhl
);
}
// cache('res_xyhl',$res_xyhl);
// }
$this
->
assign
(
'res_xyhl'
,
$res_xyhl
);
...
...
@@ -149,13 +149,13 @@ class IndexController extends HomeBaseController
//星际活动
$res_xjhd
=
cache
(
'res_xjhd'
);
if
(
!
$res_xjhd
){
// $res_xjhd = cache('res_xjhd');
// if(!$res_xjhd){
$position
=
CityCategoryModel
::
xjhd
;
$field
=
'id,post_title,thumbnail'
;
$res_xjhd
=
$this
->
getParentArticle
(
$position
,
$field
,
2
);
cache
(
'res_xjhd'
,
$res_xjhd
);
}
// cache('res_xjhd',$res_xjhd);
// }
$this
->
assign
(
'res_xjhd'
,
$res_xjhd
);
return
$this
->
fetch
();
}
...
...
请
注册
或
登录
后发表评论