Commit b64851fb by 前端

Merge branch 'hotfix_v2.3.0' into 'master'

上线合并

See merge request !14
2 parents d8d2684a 17114574
<template>
<div class="video-container">
<video controls class="video-box" ref="video">
<source :src="videoSrc" type="video/mp4" />
</video>
<div class="video-pause" @click="hanldPlay('pause')" v-if="status == 'play'">
<img src="@/assets/images/play-icon.png" />
</div>
<div class="video-play" @click="hanldPlay('play')" v-if="status == 'pause'"><img src="@/assets/images/pause-icon.png" /></div>
</div>
</template>
<script>
export default {
name: 'AiVideo',
data() {
return {
videoSrc: 'https://img02.glsx.com.cn/weapp/resource/saas/video/video_20260311.mp4',
status: 'play',
timer: null
}
},
mounted() {
this.watchVideo()
},
watch: {
status(val) {
if (this.timer) {
clearTimeout(this.timer)
}
if (val == 'pause') {
this.timer = setTimeout(() => {
this.status = ''
}, 3000)
}
}
},
methods: {
watchVideo() {
this.$refs.video.addEventListener('ended', () => {
this.status = 'play'
})
this.$refs.video.addEventListener('play', () => {
this.status = 'pause'
})
this.$refs.video.addEventListener('pause', () => {
this.status = 'play'
})
document.addEventListener('keydown', this.handleDown)
document.addEventListener('fullscreenchange', function (e) {
let isFull
if (document.fullscreenElement) {
isFull = true
} else {
isFull = false
}
this.isFull = true
})
},
handleDown(e) {
if (e.keyCode === 32) {
// 执行相应的操作
if (this.status == 'play') {
this.$refs.video.play()
} else {
this.$refs.video.pause()
}
}
},
hanldPlay(status) {
if (status == 'pause') {
this.$refs.video.play()
} else {
this.$refs.video.pause()
}
}
},
beforeDestroy() {
document.removeEventListener('keydown', this.handleDown)
// this.$refs.video.pause()
}
}
</script>
<style lang="scss" scoped>
.video-container {
width: 1824px;
height: 876px;
background: url('../../assets/images/home-bg.png') no-repeat;
background-size: 100%;
// border: 4px solid rgba(18, 117, 248, 0.5);
box-sizing: border-box;
// margin: 20px calc((100vw - 1560px) / 2);
margin: 20px auto;
position: relative;
display: flex;
justify-content: center;
align-items: center;
.video-box {
width: 1440px;
height: 810px;
}
.video-pause,
.video-play {
position: absolute;
top: 50%;
left: 50%;
width: 120px;
height: 120px;
margin-left: -60px;
margin-top: -60px;
border-radius: 50%;
}
}
.video-full {
z-index: 999;
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background: #000000;
.video-box {
position: absolute;
left: 324px;
width: calc(100% - 648px);
}
}
</style>
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
<video-page v-if="current == 0" /> <video-page v-if="current == 0" />
<view-life-scene-data v-if="current == 3" /> <view-life-scene-data v-if="current == 3" />
<energy-car v-if="current == 2" /> <energy-car v-if="current == 2" />
<view-operational v-if="current == 4" /> <ai-video v-if="current == 4" />
<view-operational v-if="current == 5" />
<view-entire-lifecycleOf-car v-if="current == 1" /> <view-entire-lifecycleOf-car v-if="current == 1" />
<!-- <GlskDataViewSceneIndex v-if="current == 4"></GlskDataViewSceneIndex> --> <!-- <GlskDataViewSceneIndex v-if="current == 4"></GlskDataViewSceneIndex> -->
</transition> </transition>
...@@ -41,7 +42,8 @@ import FixedArrow from '@/components/Arrow.vue' ...@@ -41,7 +42,8 @@ import FixedArrow from '@/components/Arrow.vue'
import ViewEntireLifecycleOfCar from './pages/viewEntireLifecycleOfCar.vue' import ViewEntireLifecycleOfCar from './pages/viewEntireLifecycleOfCar.vue'
import GlskDataViewSceneIndex from '../newPage/index.vue' import GlskDataViewSceneIndex from '../newPage/index.vue'
import videoPage from '@/views/videoPage/index.vue' import videoPage from '@/views/videoPage/index.vue'
//energyCar ViewEntireLifecycleOfCar // energyCar ViewEntireLifecycleOfCar
import AiVideo from '@/views/aiVideo/index.vue'
import EnergyCar from '@/views/energyCar/index.vue' import EnergyCar from '@/views/energyCar/index.vue'
export default { export default {
name: '', name: '',
...@@ -52,7 +54,8 @@ export default { ...@@ -52,7 +54,8 @@ export default {
ViewEntireLifecycleOfCar, ViewEntireLifecycleOfCar,
EnergyCar, EnergyCar,
videoPage, videoPage,
GlskDataViewSceneIndex GlskDataViewSceneIndex,
AiVideo
}, },
data() { data() {
return { return {
...@@ -63,7 +66,7 @@ export default { ...@@ -63,7 +66,7 @@ export default {
1: '广联企业全景介绍', 1: '广联企业全景介绍',
2: '广联数据要素大屏', 2: '广联数据要素大屏',
3: '广联新能源车主服务行业大模型', 3: '广联新能源车主服务行业大模型',
4: '广联数科运营看板', 4: '广联新能源车主服务行业大模型',
5: '广联数科运营看板' 5: '广联数科运营看板'
}, },
startX: 0, startX: 0,
...@@ -72,7 +75,7 @@ export default { ...@@ -72,7 +75,7 @@ export default {
} }
}, },
created() { created() {
let _this = this const _this = this
this.$bus.$on('selectVal', data => { this.$bus.$on('selectVal', data => {
this.activeName = data this.activeName = data
}) })
...@@ -104,9 +107,9 @@ export default { ...@@ -104,9 +107,9 @@ export default {
// 前一页 // 前一页
prevClick() { prevClick() {
let index = this.current const index = this.current
if (index == 0) { if (index == 0) {
//this.current = 3 // this.current = 3
return false return false
} }
this.transitionName = 'slide-right' this.transitionName = 'slide-right'
...@@ -115,9 +118,9 @@ export default { ...@@ -115,9 +118,9 @@ export default {
// 下一页 // 下一页
nextClick() { nextClick() {
let index = this.current const index = this.current
if (index == 4) { if (index == 5) {
//this.current = 0 // this.current = 0
// window.open('https://bi-view.beta.glsx.com.cn/#/home', '_blank') // window.open('https://bi-view.beta.glsx.com.cn/#/home', '_blank')
// return false // return false
this.$router.push({ this.$router.push({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!