shaogen1995 3 vuotta sitten
vanhempi
commit
6f4b781b2d
1 muutettua tiedostoa jossa 14 lisäystä ja 11 poistoa
  1. 14 11
      web/src/components/welcome/index.vue

+ 14 - 11
web/src/components/welcome/index.vue

@@ -24,7 +24,11 @@
     </div>
     <div class="SeLanguage" :class="{ active: languagShow }">
       <div class="box">
-        <i class="el-icon-close" v-if="isMobile" @click="languagShow = false"></i>
+        <i
+          class="el-icon-close"
+          v-if="isMobile"
+          @click="languagShow = false"
+        ></i>
         <div class="top">
           <p>请选择语言</p>
           <p>Please select the language</p>
@@ -63,7 +67,15 @@ export default {
     },
   },
   mounted() {
-    if (window.location.hash === "#/") this.isShow = true;
+    if (window.location.hash === "#/") {
+      this.isShow = true;
+      // 移动端的play图片透明度变化
+      this.myTime = setInterval(() => {
+        console.log("定时器启动");
+        if (this.playImgOpa === 1) this.playImgOpa = 0.5;
+        else this.playImgOpa = 1;
+      }, 1500);
+    }
     // 监听视频播放完毕
     this.$nextTick(() => {
       setTimeout(() => {
@@ -79,15 +91,6 @@ export default {
         }
       }, 100);
     });
-    // 移动端的play图片透明度变化
-    this.myTime = setInterval(() => {
-      console.log(123);
-      if (this.playImgOpa === 1) this.playImgOpa = 0.5;
-      else this.playImgOpa = 1;
-    }, 1500);
-  },
-  destroyed() {
-    clearInterval(this.myTime);
   },
 };
 </script>