|
@@ -17,9 +17,18 @@
|
|
</div>
|
|
</div>
|
|
<div v-else class="mbimages" :style="{backgroundImage:`url(${require('@/assets/images/project/mb_hostpot.jpg')})`}">
|
|
<div v-else class="mbimages" :style="{backgroundImage:`url(${require('@/assets/images/project/mb_hostpot.jpg')})`}">
|
|
<div class="title">{{hotspot.title}}</div>
|
|
<div class="title">{{hotspot.title}}</div>
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ <swiper class="swiper-wrapper swiper-wrapper-n" :options="swiperOption">
|
|
|
|
+ <swiper-slide class="swiper-slide" v-for="(item,index) in hotspot.video" :key="index">
|
|
|
|
+ <div class="sl-item">
|
|
|
|
+ <video controls autoplay>
|
|
|
|
+ <source :src="item.url" type="video/mp4">
|
|
|
|
+ </video>
|
|
|
|
+ </div>
|
|
|
|
+ </swiper-slide>
|
|
|
|
+ </swiper>
|
|
|
|
+ <ul class="pagna">
|
|
|
|
+ <li v-for="(item,i) in hotspot.video" :class="{active: i == mbactive}" :key="i"></li>
|
|
|
|
+ </ul>
|
|
<div v-if="hotspot.content" class="desc">
|
|
<div v-if="hotspot.content" class="desc">
|
|
<p>简介:</p>
|
|
<p>简介:</p>
|
|
<div v-html="hotspot.content"></div>
|
|
<div v-html="hotspot.content"></div>
|
|
@@ -27,16 +36,39 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
+
|
|
<script>
|
|
<script>
|
|
|
|
+import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
|
|
|
+import 'swiper/swiper-bundle.css'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
|
|
+ components: {
|
|
|
|
+ Swiper,
|
|
|
|
+ SwiperSlide,
|
|
|
|
+ },
|
|
props:['hotspot'],
|
|
props:['hotspot'],
|
|
data(){
|
|
data(){
|
|
return {
|
|
return {
|
|
- active:0
|
|
|
|
|
|
+ active:0,
|
|
|
|
+ mbactive:0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- methods:{
|
|
|
|
-
|
|
|
|
|
|
+ computed:{
|
|
|
|
+ swiperOption() {
|
|
|
|
+ let that = this
|
|
|
|
+ return {
|
|
|
|
+ slidesPerView: 'auto',
|
|
|
|
+ autoplay: false,
|
|
|
|
+ centeredSlides: true,
|
|
|
|
+ watchSlidesProgress: true,
|
|
|
|
+ loop: false,
|
|
|
|
+ on:{
|
|
|
|
+ slideChangeTransitionEnd:function () {
|
|
|
|
+ that.mbactive = this.realIndex
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -139,21 +171,50 @@ export default {
|
|
border-radius: 60px;
|
|
border-radius: 60px;
|
|
margin: 20px auto;
|
|
margin: 20px auto;
|
|
}
|
|
}
|
|
-
|
|
|
|
- .videocon{
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-around;
|
|
|
|
- align-items: center;
|
|
|
|
- position: relative;
|
|
|
|
- padding-bottom: 40px;
|
|
|
|
- >video{
|
|
|
|
- max-width: 1000px;
|
|
|
|
- border: 10px solid #BC1515;
|
|
|
|
- box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
|
|
|
|
- max-height: 600px;
|
|
|
|
|
|
+ .swiper-wrapper {
|
|
|
|
+ height: 250px;
|
|
|
|
+ padding: 0;
|
|
|
|
+ .swiper-slide {
|
|
|
|
+ width: 85%;
|
|
|
|
+ transform-style: preserve-3d;
|
|
|
|
+ position: relative;
|
|
|
|
+ height: 100%;
|
|
|
|
+ margin: 0 10px;
|
|
|
|
+ .sl-item{
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 0;
|
|
|
|
+ left: 50%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ transform: translateX(-50%);
|
|
|
|
+ width: 100%;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ border: 4px solid #BC1515;
|
|
|
|
+ box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
|
|
|
|
+ background-color: #757477;
|
|
|
|
+ >video{
|
|
|
|
+ object-fit: fill;
|
|
|
|
+ height: 100%;
|
|
|
|
+ transform: translateX(-50%);
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 50%;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .pagna{
|
|
|
|
+ text-align: center;
|
|
|
|
+ z-index: 999;
|
|
|
|
+ >li{
|
|
|
|
+ width: 40px;
|
|
|
|
+ height: 4px;
|
|
|
|
+ background: #BC1515;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin: 0 4px;
|
|
|
|
+ &.active{
|
|
|
|
+ background: #DBA761;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
.desc{
|
|
.desc{
|
|
color: #DBA761;
|
|
color: #DBA761;
|
|
text-align: left;
|
|
text-align: left;
|