|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="welcome">
|
|
|
+ <div class="welcome" :style="{visibility:isShow?'visible':'hidden'}">
|
|
|
<video ref="welcome" :src="require(`@/assets/videos/OPvss.mp4`)"></video>
|
|
|
<div
|
|
|
@click="handleJump"
|
|
@@ -19,12 +19,14 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
showJump: "",
|
|
|
+ isShow:false
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
startplay(newVal) {
|
|
|
if (newVal) {
|
|
|
this.$refs.welcome.play();
|
|
|
+ this.isShow = true
|
|
|
}
|
|
|
},
|
|
|
},
|
|
@@ -32,6 +34,8 @@ export default {
|
|
|
handleJump() {
|
|
|
this.$bus.$emit("closeWel", true);
|
|
|
this.$refs.welcome.pause();
|
|
|
+ this.$refs.welcome.currentTime = 0;
|
|
|
+ this.isShow = false
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
@@ -39,7 +43,7 @@ export default {
|
|
|
if (this.$refs.welcome) {
|
|
|
this.$refs.welcome &&
|
|
|
this.$refs.welcome.addEventListener("ended", () => {
|
|
|
- this.$bus.$emit("closeWel", true);
|
|
|
+ this.handleJump()
|
|
|
});
|
|
|
}
|
|
|
window.addEventListener("message", (res) => {
|