소스 검색

fix:sk相关的大屏数据修改

chenzhen2 2 년 전
부모
커밋
a0bb8d8079
2개의 변경된 파일96개의 추가작업 그리고 22개의 파일을 삭제
  1. 87 18
      src/views/home/index.vue
  2. 9 4
      src/views/weather/index.vue

+ 87 - 18
src/views/home/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="main">
+  <div class="main" v-if="showFalg">
     <video id="video1" muted autoplay>
       <source src="/sk/skImage/媒体1.mp4" type="video/mp4" />
       您的浏览器不支持 HTML5 video 标签。
@@ -22,21 +22,86 @@
 
       <!-- 文字slogan -->
       <div id="slogan" class="slogan">
-        <img id="slogan11" class="slogan11" src="/sk/skImage/word/幸.png" alt="" />
-        <img id="slogan12" class="slogan12" src="/sk/skImage/word/福.png" alt="" />
-
-        <img id="slogan21" class="slogan21" src="/sk/skImage/word/S.png" alt="" />
-        <img id="slogan22" class="slogan22" src="/sk/skImage/word/U.png" alt="" />
-        <img id="slogan23" class="slogan23" src="/sk/skImage/word/P.png" alt="" />
-        <img id="slogan24" class="slogan24" src="/sk/skImage/word/E.png" alt="" />
-        <img id="slogan25" class="slogan25" src="/sk/skImage/word/X.png" alt="" />
-
-        <img id="slogan31" class="slogan31" src="/sk/skImage/word/P2.png" alt="" />
-        <img id="slogan32" class="slogan32" src="/sk/skImage/word/a.png" alt="" />
-        <img id="slogan33" class="slogan33" src="/sk/skImage/word/e2.png" alt="" />
-        <img id="slogan34" class="slogan34" src="/sk/skImage/word/-.png" alt="" />
-        <img id="slogan35" class="slogan35" src="/sk/skImage/word/g.png" alt="" />
-        <img id="slogan36" class="slogan36" src="/sk/skImage/word/i.png" alt="" />
+        <img
+          id="slogan11"
+          class="slogan11"
+          src="/sk/skImage/word/幸.png"
+          alt=""
+        />
+        <img
+          id="slogan12"
+          class="slogan12"
+          src="/sk/skImage/word/福.png"
+          alt=""
+        />
+
+        <img
+          id="slogan21"
+          class="slogan21"
+          src="/sk/skImage/word/S.png"
+          alt=""
+        />
+        <img
+          id="slogan22"
+          class="slogan22"
+          src="/sk/skImage/word/U.png"
+          alt=""
+        />
+        <img
+          id="slogan23"
+          class="slogan23"
+          src="/sk/skImage/word/P.png"
+          alt=""
+        />
+        <img
+          id="slogan24"
+          class="slogan24"
+          src="/sk/skImage/word/E.png"
+          alt=""
+        />
+        <img
+          id="slogan25"
+          class="slogan25"
+          src="/sk/skImage/word/X.png"
+          alt=""
+        />
+
+        <img
+          id="slogan31"
+          class="slogan31"
+          src="/sk/skImage/word/P2.png"
+          alt=""
+        />
+        <img
+          id="slogan32"
+          class="slogan32"
+          src="/sk/skImage/word/a.png"
+          alt=""
+        />
+        <img
+          id="slogan33"
+          class="slogan33"
+          src="/sk/skImage/word/e2.png"
+          alt=""
+        />
+        <img
+          id="slogan34"
+          class="slogan34"
+          src="/sk/skImage/word/-.png"
+          alt=""
+        />
+        <img
+          id="slogan35"
+          class="slogan35"
+          src="/sk/skImage/word/g.png"
+          alt=""
+        />
+        <img
+          id="slogan36"
+          class="slogan36"
+          src="/sk/skImage/word/i.png"
+          alt=""
+        />
       </div>
 
       <img id="ani4" class="ani4" src="/sk/skImage/ani4.jpg" alt="" />
@@ -74,7 +139,9 @@
         <img src="/sk/skImage/skLogo.jpg" alt="" />
       </div>
       <div class="line" id="line"></div>
-      <div class="text" id="text"><img src="/sk/skImage/text.jpg" alt="" /></div>
+      <div class="text" id="text">
+        <img src="/sk/skImage/text.jpg" alt="" />
+      </div>
     </div>
   </div>
 </template>
@@ -143,7 +210,7 @@ export default defineComponent({
       } else if (week == 6) {
         str = "星期六";
       }
-      return str
+      return str;
     };
     const router = useRouter();
     const proxyData = reactive({
@@ -151,6 +218,7 @@ export default defineComponent({
       sTime: formatEnergyDate(2)[2],
       nowDate: formatEnergyDate()[0],
       intevell: null,
+      showFalg: false,
       week: getWeek(),
       // 设置现在时间
       setNowDate() {
@@ -274,6 +342,7 @@ export default defineComponent({
     });
     onBeforeUnmount(() => {});
     onMounted(() => {
+      proxyData.showFalg = true;
       nextTick(() => {
         proxyData.init();
         setTimeout(() => {

+ 9 - 4
src/views/weather/index.vue

@@ -154,6 +154,7 @@ export default defineComponent({
         logonIcon: "晴.png",
       },
     ];
+    let times: any = null;
     let currentData: any = [];
     let envObj: any = {
       Tdb: "0", // 温度
@@ -261,16 +262,19 @@ export default defineComponent({
             proxyData.currentData = [];
           });
       },
+      times: times,
       changePage() {
-        let times: any = setTimeout(() => {
-          clearTimeout(times);
-          router.push({ path: "/home" });
+        proxyData.times = setTimeout(() => {
+          clearTimeout(proxyData.times);
+          // router.push({ path: "/home" });
+          window.location.href = "/sk/home";
         }, 300000);
       },
     });
     onBeforeUnmount(() => {
       clearInterval(proxyData.intevell);
       clearInterval(proxyData.timer);
+      clearTimeout(proxyData.times);
     });
     onMounted(() => {
       proxyData.setNowDate();
@@ -278,6 +282,7 @@ export default defineComponent({
       proxyData.getWeatherData();
       // 获取环境数据
       proxyData.queryEnvCurrent();
+      proxyData.changePage();
       // proxyData.setTimer();
     });
     return {
@@ -305,7 +310,7 @@ export default defineComponent({
     display: flex;
     justify-content: space-between;
     width: 100%;
-    margin-top: 7.8vh;
+    margin-top: 7.4vh;
     .env-item {
       box-sizing: border-box;
       padding: 9.2vh 4.4vw 14vh 4.4vw;