shaogen1995 2 anni fa
parent
commit
561dd29598
1 ha cambiato i file con 9 aggiunte e 9 eliminazioni
  1. 9 9
      yfyc/src/views/Construct/components/HomeList.vue

+ 9 - 9
yfyc/src/views/Construct/components/HomeList.vue

@@ -91,18 +91,18 @@ export default {
   watch: {
   watch: {
     videoShow(val) {
     videoShow(val) {
       if (val) {
       if (val) {
-        let dom = document.querySelector("#myVideo");
         setTimeout(() => {
         setTimeout(() => {
+          let dom = document.querySelector("#myVideo");
           dom.play();
           dom.play();
+          dom.addEventListener(
+            "ended",
+            () => {
+              //结束
+              this.$router.push(`/layout/construct/${myId}`);
+            },
+            false
+          );
         }, 500);
         }, 500);
-        dom.addEventListener(
-          "ended",
-          () => {
-            //结束
-            this.$router.push(`/layout/construct/${myId}`);
-          },
-          false
-        );
         setTimeout(() => {
         setTimeout(() => {
           this.videoBtnShow = true;
           this.videoBtnShow = true;
         }, 1000);
         }, 1000);