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

增加城市首页宣传视频

@@ -76,12 +76,20 @@ class IndexController extends HomeBaseController @@ -76,12 +76,20 @@ class IndexController extends HomeBaseController
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,index_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 +// }
82 $position = CityCategoryModel::xqyy; 89 $position = CityCategoryModel::xqyy;
  90 + $city_id = CityCategoryModel::syxc;
83 $field = 'id,more,index_thumbnail'; 91 $field = 'id,more,index_thumbnail';
84 - $res_xqyy = $this->getVideoIndex($position,$field,1); 92 + $res_xqyy = $this->getVideo($position,$city_id,$field,1,1);
85 foreach($res_xqyy as &$value){ 93 foreach($res_xqyy as &$value){
86 $video = json_decode($value['more'],true); 94 $video = json_decode($value['more'],true);
87 $value['video'] = $video['video']; 95 $value['video'] = $video['video'];
@@ -56,6 +56,7 @@ class CityCategoryModel extends Model @@ -56,6 +56,7 @@ class CityCategoryModel extends Model
56 //城市 56 //城市
57 const xqgh_cc = 65;//星球故事 57 const xqgh_cc = 65;//星球故事
58 const djxq = 68;//独角星球 58 const djxq = 68;//独角星球
  59 + const syxc = 70;//首页宣传
59 60
60 //五大洲 61 //五大洲
61 const asia = 1;//亚洲 62 const asia = 1;//亚洲