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

修改首页弹出视频问题

... ... @@ -138,13 +138,13 @@ class IndexController extends HomeBaseController
//星探推荐
$res_xttj = cache('res_xttj');
if(!$res_xttj){
// $res_xttj = cache('res_xttj');
// if(!$res_xttj){
$position = CityCategoryModel::xttj;
$field = 'id,post_title,price,index_thumbnail,place';
$res_xttj = $this->getParentArticle($position,$field,16);
cache('res_xttj',$res_xttj);
}
// cache('res_xttj',$res_xttj);
// }
$this->assign('res_xttj',$res_xttj);
... ...
... ... @@ -62,7 +62,7 @@
<notempty name="res_djxq.video">
<div class="mask" id="mask">
<div class="mask_video" >
<img id="nos" src="__TMPL__/public/assets/starImg/nos.png" alt="">
<img onclick="nos()" src="__TMPL__/public/assets/starImg/nos.png" alt="">
<video autoplay="autoplay" controls loop="loop" id="video2" src="{:cmf_get_file_download_url($res_djxq.video)}" controlslist="nodownload"></video>
</div>
</div>
... ... @@ -864,13 +864,11 @@
$('.mask').css('display','block');
var video2 = document.getElementById("video2"); //获取ID 
var nos = document.getElementById("nos");
var mask = document.getElementById("mask");
nos.onclick = function nos() {
function nos() {
mask.style.display = "none";
video2.pause();
};
}
// 禁止下载
$('video').bind('contextmenu', function() {
return false;
... ...