|
@@ -25,7 +25,7 @@ class IndexController extends HomeBaseController |
|
@@ -25,7 +25,7 @@ class IndexController extends HomeBaseController |
25
|
$coverImg = cache('coverImg');
|
25
|
$coverImg = cache('coverImg');
|
26
|
if(!$coverImg){
|
26
|
if(!$coverImg){
|
27
|
$coverImg = $this->getCoverImg(CityCategoryModel::indexImg,3);
|
27
|
$coverImg = $this->getCoverImg(CityCategoryModel::indexImg,3);
|
28
|
- cache('coverImg',$coverImg,86400);
|
28
|
+ cache('coverImg',$coverImg);
|
29
|
}
|
29
|
}
|
30
|
$this->assign('coverImg',$coverImg);
|
30
|
$this->assign('coverImg',$coverImg);
|
31
|
|
31
|
|
|
@@ -52,7 +52,7 @@ class IndexController extends HomeBaseController |
|
@@ -52,7 +52,7 @@ class IndexController extends HomeBaseController |
52
|
}
|
52
|
}
|
53
|
}
|
53
|
}
|
54
|
}
|
54
|
}
|
55
|
- cache('res_city', $city,86400);//有效期一天
|
55
|
+ cache('res_city', $city);
|
56
|
}
|
56
|
}
|
57
|
$this->assign('res_city',$city);
|
57
|
$this->assign('res_city',$city);
|
58
|
|
58
|
|
|
@@ -72,25 +72,13 @@ class IndexController extends HomeBaseController |
|
@@ -72,25 +72,13 @@ class IndexController extends HomeBaseController |
72
|
}
|
72
|
}
|
73
|
}
|
73
|
}
|
74
|
}
|
74
|
}
|
75
|
- cache('res_month', $month,86400);//有效期一天
|
75
|
+ cache('res_month', $month);
|
76
|
}
|
76
|
}
|
77
|
$this->assign('res_month',$month);
|
77
|
$this->assign('res_month',$month);
|
78
|
|
78
|
|
79
|
//星域秀场->星球影院
|
79
|
//星域秀场->星球影院
|
80
|
// $res_xqyy = cache('res_xqyy');
|
80
|
// $res_xqyy = cache('res_xqyy');
|
81
|
// if(!$res_xqyy){
|
81
|
// if(!$res_xqyy){
|
82
|
-// $position = CityCategoryModel::xqyy;
|
|
|
83
|
-// $field = 'id,more,thumbnail';
|
|
|
84
|
-// $res_xqyy = $this->getVideoIndex($position,$field,1);
|
|
|
85
|
-// foreach($res_xqyy as &$value){
|
|
|
86
|
-// $video = json_decode($value['more'],true);
|
|
|
87
|
-// $value['video'] = $video['video'];
|
|
|
88
|
-// }
|
|
|
89
|
-// if($res_xqyy){
|
|
|
90
|
-// $res_xqyy = $res_xqyy[0];
|
|
|
91
|
-// }
|
|
|
92
|
-// cache('res_xqyy', $res_xqyy,86400);//有效期一天
|
|
|
93
|
-// }
|
|
|
94
|
$position = CityCategoryModel::xqyy;
|
82
|
$position = CityCategoryModel::xqyy;
|
95
|
$field = 'id,more,index_thumbnail';
|
83
|
$field = 'id,more,index_thumbnail';
|
96
|
$res_xqyy = $this->getVideoIndex($position,$field,1);
|
84
|
$res_xqyy = $this->getVideoIndex($position,$field,1);
|
|
@@ -101,9 +89,13 @@ class IndexController extends HomeBaseController |
|
@@ -101,9 +89,13 @@ class IndexController extends HomeBaseController |
101
|
if($res_xqyy){
|
89
|
if($res_xqyy){
|
102
|
$res_xqyy = $res_xqyy[0];
|
90
|
$res_xqyy = $res_xqyy[0];
|
103
|
}
|
91
|
}
|
|
|
92
|
+// cache('res_xqyy', $res_xqyy);
|
|
|
93
|
+// }
|
104
|
$this->assign('res_xqyy',$res_xqyy);
|
94
|
$this->assign('res_xqyy',$res_xqyy);
|
105
|
|
95
|
|
106
|
//推广视频
|
96
|
//推广视频
|
|
|
97
|
+ $res_djxq = cache('res_djxq');
|
|
|
98
|
+ if(!$res_djxq){
|
107
|
$position = CityCategoryModel::xqyy;
|
99
|
$position = CityCategoryModel::xqyy;
|
108
|
$city_id = CityCategoryModel::djxq;
|
100
|
$city_id = CityCategoryModel::djxq;
|
109
|
$field = 'id,more,thumbnail';
|
101
|
$field = 'id,more,thumbnail';
|
|
@@ -115,8 +107,11 @@ class IndexController extends HomeBaseController |
|
@@ -115,8 +107,11 @@ class IndexController extends HomeBaseController |
115
|
if($res_djxq){
|
107
|
if($res_djxq){
|
116
|
$res_djxq = $res_djxq[0];
|
108
|
$res_djxq = $res_djxq[0];
|
117
|
}
|
109
|
}
|
|
|
110
|
+ cache('res_djxq', $res_djxq);
|
|
|
111
|
+ }
|
118
|
$this->assign('res_djxq',$res_djxq);
|
112
|
$this->assign('res_djxq',$res_djxq);
|
119
|
|
113
|
|
|
|
114
|
+
|
120
|
//星域秀场->明星访谈
|
115
|
//星域秀场->明星访谈
|
121
|
$res_mxft = cache('res_mxft');
|
116
|
$res_mxft = cache('res_mxft');
|
122
|
if(!$res_mxft){
|
117
|
if(!$res_mxft){
|
|
@@ -126,7 +121,7 @@ class IndexController extends HomeBaseController |
|
@@ -126,7 +121,7 @@ class IndexController extends HomeBaseController |
126
|
if($res_mxft){
|
121
|
if($res_mxft){
|
127
|
$res_mxft = $res_mxft[0];
|
122
|
$res_mxft = $res_mxft[0];
|
128
|
}
|
123
|
}
|
129
|
- cache('res_mxft',$res_mxft,86400);
|
124
|
+ cache('res_mxft',$res_mxft);
|
130
|
}
|
125
|
}
|
131
|
$this->assign('res_mxft',$res_mxft);
|
126
|
$this->assign('res_mxft',$res_mxft);
|
132
|
|
127
|
|
|
@@ -137,7 +132,7 @@ class IndexController extends HomeBaseController |
|
@@ -137,7 +132,7 @@ class IndexController extends HomeBaseController |
137
|
$position = CityCategoryModel::xyhl;
|
132
|
$position = CityCategoryModel::xyhl;
|
138
|
$field = 'id,thumbnail';
|
133
|
$field = 'id,thumbnail';
|
139
|
$res_xyhl = $this->getChildArticle($position,$field,16);
|
134
|
$res_xyhl = $this->getChildArticle($position,$field,16);
|
140
|
- cache('res_xyhl',$res_xyhl,86400);
|
135
|
+ cache('res_xyhl',$res_xyhl);
|
141
|
}
|
136
|
}
|
142
|
$this->assign('res_xyhl',$res_xyhl);
|
137
|
$this->assign('res_xyhl',$res_xyhl);
|
143
|
|
138
|
|
|
@@ -148,7 +143,7 @@ class IndexController extends HomeBaseController |
|
@@ -148,7 +143,7 @@ class IndexController extends HomeBaseController |
148
|
$position = CityCategoryModel::xttj;
|
143
|
$position = CityCategoryModel::xttj;
|
149
|
$field = 'id,post_title,price,index_thumbnail,place';
|
144
|
$field = 'id,post_title,price,index_thumbnail,place';
|
150
|
$res_xttj = $this->getParentArticle($position,$field,16);
|
145
|
$res_xttj = $this->getParentArticle($position,$field,16);
|
151
|
- cache('res_xttj',$res_xttj,86400);
|
146
|
+ cache('res_xttj',$res_xttj);
|
152
|
}
|
147
|
}
|
153
|
$this->assign('res_xttj',$res_xttj);
|
148
|
$this->assign('res_xttj',$res_xttj);
|
154
|
|
149
|
|
|
@@ -159,7 +154,7 @@ class IndexController extends HomeBaseController |
|
@@ -159,7 +154,7 @@ class IndexController extends HomeBaseController |
159
|
$position = CityCategoryModel::xjhd;
|
154
|
$position = CityCategoryModel::xjhd;
|
160
|
$field = 'id,post_title,thumbnail';
|
155
|
$field = 'id,post_title,thumbnail';
|
161
|
$res_xjhd = $this->getParentArticle($position,$field,2);
|
156
|
$res_xjhd = $this->getParentArticle($position,$field,2);
|
162
|
- cache('res_xjhd',$res_xjhd,86400);
|
157
|
+ cache('res_xjhd',$res_xjhd);
|
163
|
}
|
158
|
}
|
164
|
$this->assign('res_xjhd',$res_xjhd);
|
159
|
$this->assign('res_xjhd',$res_xjhd);
|
165
|
return $this->fetch();
|
160
|
return $this->fetch();
|