|
|
@ -7,18 +7,24 @@ |
|
|
|
<div class="card-item-yfjj"> |
|
|
|
<!-- <transition name="slide-transform"> --> |
|
|
|
<!-- <section v-if="currentIndex == 0"> --> |
|
|
|
<img src="@/assets/images/resource/kyll/garden.png" alt="" /> |
|
|
|
<!-- <img src="@/assets/images/resource/kyll/garden.png" alt="" /> |
|
|
|
<p> |
|
|
|
移风店镇位于即墨区西北部、青岛市版图的中心位置,地处威海、烟台、潍坊2小时经济圈内。距机场18公里、高铁站21公里,毗邻沈海、济青和青新高速,交通优势明显。 |
|
|
|
</p> |
|
|
|
<p> |
|
|
|
青岛(移风)国际蔬菜花卉种子产业园、即墨农业高新技术开发区均落于境内,将打造全国重要的蔬菜花卉种子研发和繁育中心,成为全国种业“南广州,北青岛”格局承载地。 |
|
|
|
</p> |
|
|
|
</p> --> |
|
|
|
<!-- </section> --> |
|
|
|
|
|
|
|
<!-- <video v-if="currentIndex == 1" :src="videoUrl" style="width: 100%; height: 100%;" |
|
|
|
:controls="true" width="100%" height="100%" @play="handelVideoPlay" |
|
|
|
@pause="handelVideoPause"></video> --> |
|
|
|
<video |
|
|
|
:src="videoUrl1" |
|
|
|
style="width: 100%; height: 100%; margin-top: -12px;" |
|
|
|
:controls="true" |
|
|
|
autoplay |
|
|
|
id="myVideo" |
|
|
|
@play="handelVideoPlay" |
|
|
|
@pause="handelVideoPause" |
|
|
|
></video> |
|
|
|
<!-- </transition> --> |
|
|
|
<!-- <transition name="slide-transform"> |
|
|
|
|
|
|
@ -81,6 +87,7 @@ export default { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
videoUrl: process.env.VUE_APP_VIDEO_URL + '1.mp4', |
|
|
|
videoUrl1: process.env.VUE_APP_VIDEO_URL + 'bak.mp4', |
|
|
|
videoStatus: '', |
|
|
|
intervalId: null, |
|
|
|
currentIndex: 0, |
|
|
@ -183,6 +190,10 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
created () { |
|
|
|
if (process.env.NODE_ENV === 'development') { |
|
|
|
this.videoUrl1 = |
|
|
|
'https://yifengdian-smps.elinkservice.cn/yifengdian-front/video/bak.mp4' |
|
|
|
} |
|
|
|
const arr5 = [] |
|
|
|
for (let i = 1; i < 10; i++) { |
|
|
|
arr5.push({ |
|
|
@ -233,21 +244,15 @@ export default { |
|
|
|
this.images2 = arr2 |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
this.intervalId = setInterval(() => { |
|
|
|
this.switchBox() |
|
|
|
}, 3000) // 切换间隔为2秒 |
|
|
|
var videoElement = document.getElementById('myVideo') |
|
|
|
videoElement.muted = true |
|
|
|
videoElement.autoplay = true |
|
|
|
videoElement.controls = true |
|
|
|
}, |
|
|
|
beforeDestroy () { |
|
|
|
clearInterval(this.intervalId) // 清除定时器,防止内存泄漏 |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
switchBox () { |
|
|
|
if (this.currentIndex === 0) { |
|
|
|
this.currentIndex = 1 |
|
|
|
} else if (this.currentIndex === 1 && this.videoStatus != 'play') { |
|
|
|
this.currentIndex = 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
handelVideoPlay () { |
|
|
|
this.videoStatus = 'play' |
|
|
|
}, |
|
|
|