Browse Source

代码提交

master
juwei001 1 year ago
parent
commit
17cd835ac7
  1. 35
      src/views/next/screen-content-left/home-left/index.vue

35
src/views/next/screen-content-left/home-left/index.vue

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

Loading…
Cancel
Save