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

星域视频修改

@@ -22,7 +22,7 @@ class RegionController extends HomeBaseController @@ -22,7 +22,7 @@ class RegionController extends HomeBaseController
22 public function index(){ 22 public function index(){
23 //星球影院 23 //星球影院
24 $position['category_id'] = CityCategoryModel::xqyy; 24 $position['category_id'] = CityCategoryModel::xqyy;
25 - $field = 'id,more'; 25 + $field = 'id,more,thumbnail';
26 $res_xqyy = $this->getChildArticle($position,$field,1); 26 $res_xqyy = $this->getChildArticle($position,$field,1);
27 foreach($res_xqyy as &$value){ 27 foreach($res_xqyy as &$value){
28 $more = json_decode($value['more'],true); 28 $more = json_decode($value['more'],true);
@@ -53,6 +53,24 @@ @@ -53,6 +53,24 @@
53 .swiper-button-disabled2 { 53 .swiper-button-disabled2 {
54 background-color: white !important; 54 background-color: white !important;
55 } 55 }
  56 +
  57 + .show_in_banner2 {
  58 + z-index: 20;
  59 + }
  60 +
  61 + .show_bannerFen {
  62 + position: absolute;
  63 + top: 0;
  64 + left: 0;
  65 + width: 100%;
  66 + height: 100%;
  67 + z-index: 10;
  68 + }
  69 +
  70 + .show_bannerFen img {
  71 + width: 100%;
  72 + height: 100%;
  73 + }
56 </style> 74 </style>
57 </head> 75 </head>
58 76
@@ -63,12 +81,15 @@ @@ -63,12 +81,15 @@
63 <!-- banner视频 --> 81 <!-- banner视频 -->
64 <div class="show_index_banner"> 82 <div class="show_index_banner">
65 <notempty name="res_xqyy"> 83 <notempty name="res_xqyy">
66 - <video id="video" autoplay="autoplay" controls width="100%" height="660" src="{:cmf_get_file_download_url($res_xqyy.video)}" controlsList="nodownload"></video> 84 + <video id="video" controls width="100%" height="660" src="{:cmf_get_file_download_url($res_xqyy.video)}" controlsList="nodownload"></video>
67 <else/> 85 <else/>
68 <video id="video" autoplay="autoplay" controls width="100%" height="660" src="__TMPL__/public/assets/starImg/video.mp4" controlsList="nodownload"></video> 86 <video id="video" autoplay="autoplay" controls width="100%" height="660" src="__TMPL__/public/assets/starImg/video.mp4" controlsList="nodownload"></video>
69 </notempty> 87 </notempty>
70 <!-- poster="__TMPL__/public/assets/starImg/aicon_01.png" --> 88 <!-- poster="__TMPL__/public/assets/starImg/aicon_01.png" -->
71 - <!-- <img onclick="bofang()" class="show_in_banner2" src="__TMPL__/public/assets/starImg/aicon_30.png" alt=""> --> 89 + <img onclick="bofang()" class="show_in_banner2" src="__TMPL__/public/assets/starImg/aicon_30.png" alt="">
  90 + <div class="show_bannerFen">
  91 + <img src="{:cmf_get_image_url($res_xqyy.thumbnail)}" alt="">
  92 + </div>
72 </div> 93 </div>
73 94
74 <!-- main 背景 --> 95 <!-- main 背景 -->
@@ -399,12 +420,14 @@ @@ -399,12 +420,14 @@
399 // }); 420 // });
400 421
401 // banner视频 422 // banner视频
402 - // var video = document.getElementById("video");  
403 - // function bofang() {  
404 - // video.play();  
405 - // $('#video').attr('controls', 'controls')  
406 - // $('.show_in_banner2').hide();  
407 - // } 423 + var video = document.getElementById("video");
  424 +
  425 + function bofang() {
  426 + video.play();
  427 + $('#video').attr('controls', 'controls')
  428 + $('.show_in_banner2').hide();
  429 + $('.show_bannerFen').hide();
  430 + }
408 </script> 431 </script>
409 </body> 432 </body>
410 433