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

修改首页弹出视频问题

@@ -138,13 +138,13 @@ class IndexController extends HomeBaseController @@ -138,13 +138,13 @@ class IndexController extends HomeBaseController
138 138
139 139
140 //星探推荐 140 //星探推荐
141 - $res_xttj = cache('res_xttj');  
142 - if(!$res_xttj){ 141 +// $res_xttj = cache('res_xttj');
  142 +// if(!$res_xttj){
143 $position = CityCategoryModel::xttj; 143 $position = CityCategoryModel::xttj;
144 $field = 'id,post_title,price,index_thumbnail,place'; 144 $field = 'id,post_title,price,index_thumbnail,place';
145 $res_xttj = $this->getParentArticle($position,$field,16); 145 $res_xttj = $this->getParentArticle($position,$field,16);
146 - cache('res_xttj',$res_xttj);  
147 - } 146 +// cache('res_xttj',$res_xttj);
  147 +// }
148 $this->assign('res_xttj',$res_xttj); 148 $this->assign('res_xttj',$res_xttj);
149 149
150 150
@@ -62,7 +62,7 @@ @@ -62,7 +62,7 @@
62 <notempty name="res_djxq.video"> 62 <notempty name="res_djxq.video">
63 <div class="mask" id="mask"> 63 <div class="mask" id="mask">
64 <div class="mask_video" > 64 <div class="mask_video" >
65 - <img id="nos" src="__TMPL__/public/assets/starImg/nos.png" alt=""> 65 + <img onclick="nos()" src="__TMPL__/public/assets/starImg/nos.png" alt="">
66 <video autoplay="autoplay" controls loop="loop" id="video2" src="{:cmf_get_file_download_url($res_djxq.video)}" controlslist="nodownload"></video> 66 <video autoplay="autoplay" controls loop="loop" id="video2" src="{:cmf_get_file_download_url($res_djxq.video)}" controlslist="nodownload"></video>
67 </div> 67 </div>
68 </div> 68 </div>
@@ -864,13 +864,11 @@ @@ -864,13 +864,11 @@
864 $('.mask').css('display','block'); 864 $('.mask').css('display','block');
865 865
866 var video2 = document.getElementById("video2"); //获取ID  866 var video2 = document.getElementById("video2"); //获取ID 
867 - var nos = document.getElementById("nos");  
868 var mask = document.getElementById("mask"); 867 var mask = document.getElementById("mask");
869 -  
870 - nos.onclick = function nos() { 868 + function nos() {
871 mask.style.display = "none"; 869 mask.style.display = "none";
872 video2.pause(); 870 video2.pause();
873 - }; 871 + }
874 // 禁止下载 872 // 禁止下载
875 $('video').bind('contextmenu', function() { 873 $('video').bind('contextmenu', function() {
876 return false; 874 return false;