作者 zhangwei
1 个管道 的构建 通过 耗费 2 秒

星域视频修改

... ... @@ -22,7 +22,7 @@ class RegionController extends HomeBaseController
public function index(){
//星球影院
$position['category_id'] = CityCategoryModel::xqyy;
$field = 'id,more';
$field = 'id,more,thumbnail';
$res_xqyy = $this->getChildArticle($position,$field,1);
foreach($res_xqyy as &$value){
$more = json_decode($value['more'],true);
... ...
... ... @@ -53,6 +53,24 @@
.swiper-button-disabled2 {
background-color: white !important;
}
.show_in_banner2 {
z-index: 20;
}
.show_bannerFen {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10;
}
.show_bannerFen img {
width: 100%;
height: 100%;
}
</style>
</head>
... ... @@ -63,12 +81,15 @@
<!-- banner视频 -->
<div class="show_index_banner">
<notempty name="res_xqyy">
<video id="video" autoplay="autoplay" controls width="100%" height="660" src="{:cmf_get_file_download_url($res_xqyy.video)}" controlsList="nodownload"></video>
<video id="video" controls width="100%" height="660" src="{:cmf_get_file_download_url($res_xqyy.video)}" controlsList="nodownload"></video>
<else/>
<video id="video" autoplay="autoplay" controls width="100%" height="660" src="__TMPL__/public/assets/starImg/video.mp4" controlsList="nodownload"></video>
</notempty>
<!-- poster="__TMPL__/public/assets/starImg/aicon_01.png" -->
<!-- <img onclick="bofang()" class="show_in_banner2" src="__TMPL__/public/assets/starImg/aicon_30.png" alt=""> -->
<img onclick="bofang()" class="show_in_banner2" src="__TMPL__/public/assets/starImg/aicon_30.png" alt="">
<div class="show_bannerFen">
<img src="{:cmf_get_image_url($res_xqyy.thumbnail)}" alt="">
</div>
</div>
<!-- main 背景 -->
... ... @@ -399,12 +420,14 @@
// });
// banner视频
// var video = document.getElementById("video");
// function bofang() {
// video.play();
// $('#video').attr('controls', 'controls')
// $('.show_in_banner2').hide();
// }
var video = document.getElementById("video");
function bofang() {
video.play();
$('#video').attr('controls', 'controls')
$('.show_in_banner2').hide();
$('.show_bannerFen').hide();
}
</script>
</body>
... ...