Browse Source

fix:天气删除第三页

chenzhen2 1 năm trước cách đây
mục cha
commit
0e5d137732
2 tập tin đã thay đổi với 57 bổ sung41 xóa
  1. 29 20
      src/views/home/index.vue
  2. 28 21
      src/views/home/tiantan.vue

+ 29 - 20
src/views/home/index.vue

@@ -160,7 +160,7 @@ import {
 export default defineComponent({
   components: {},
   setup(props) {
-    const formatEnergyDate = function (type = 1) {
+    const formatEnergyDate = function(type = 1) {
       //三目运算符
       let dates = null;
       if (type == 2) {
@@ -191,7 +191,7 @@ export default defineComponent({
         hours + ":" + minutes,
       ];
     };
-    const getWeek = function () {
+    const getWeek = function() {
       let week = new Date().getDay();
       let str = "";
       if (week == 0) {
@@ -269,7 +269,7 @@ export default defineComponent({
         myVid.controls = false;
 
         // 视频播放完成
-        $(myVid).bind("ended", function () {
+        $(myVid).bind("ended", function() {
           $(myVid).fadeOut();
 
           // 第2部分
@@ -302,23 +302,32 @@ export default defineComponent({
           proxyData.updateStyle();
           // 第3部分轮播
 
-          let timer = setTimeout(function () {
-            $(skSlogan).fadeOut();
-            $(aniThree).show();
-            $(logoLeft).addClass("logoLeftAni");
-            $(logoRight).addClass("logoRightAni");
-            $(line).addClass("lineAni");
-            $(text).addClass("lineAni");
-            clearTimeout(timer);
-            let time2 = setTimeout(() => {
-              clearTimeout(time2);
-              router.push({
-                path: "/weather",
-                query: { type: proxyData.type },
-              });
-              // 30000
-            }, 30000);
+          let time2 = setTimeout(() => {
+            clearTimeout(time2);
+            router.push({
+              path: "/weather",
+              query: { type: proxyData.type },
+            });
+            // 30000
           }, 30000);
+
+          // let timer = setTimeout(function () {
+          //   $(skSlogan).fadeOut();
+          //   $(aniThree).show();
+          //   $(logoLeft).addClass("logoLeftAni");
+          //   $(logoRight).addClass("logoRightAni");
+          //   $(line).addClass("lineAni");
+          //   $(text).addClass("lineAni");
+          //   clearTimeout(timer);
+          //   let time2 = setTimeout(() => {
+          //     clearTimeout(time2);
+          //     router.push({
+          //       path: "/weather",
+          //       query: { type: proxyData.type },
+          //     });
+          //     // 30000
+          //   }, 30000);
+          // }, 30000);
         });
       },
       // 动态修改样式
@@ -337,7 +346,7 @@ export default defineComponent({
       winChange() {
         window.addEventListener(
           "resize",
-          function () {
+          function() {
             proxyData.updateStyle();
           },
           false

+ 28 - 21
src/views/home/tiantan.vue

@@ -169,7 +169,7 @@ import {
 export default defineComponent({
   components: {},
   setup(props) {
-    const formatEnergyDate = function (type = 1) {
+    const formatEnergyDate = function(type = 1) {
       //三目运算符
       let dates = null;
       if (type == 2) {
@@ -200,7 +200,7 @@ export default defineComponent({
         hours + ":" + minutes,
       ];
     };
-    const getWeek = function () {
+    const getWeek = function() {
       let week = new Date().getDay();
       let str = "";
       if (week == 0) {
@@ -269,7 +269,7 @@ export default defineComponent({
         myVid.controls = false;
 
         // 视频播放完成
-        $(myVid).bind("ended", function () {
+        $(myVid).bind("ended", function() {
           $(myVid).fadeOut();
 
           // 第2部分
@@ -305,23 +305,30 @@ export default defineComponent({
           let type = proxyData.type;
           // 第3部分
 
-          let timer = setTimeout(function () {
-            $(skSlogan).fadeOut();
-            $(aniThree).show();
-            $(logoLeft).addClass("logoLeftAni");
-            $(logoRight).addClass("logoRightAni");
-            $(line).addClass("lineAni");
-            $(text).addClass("lineAni");
-            clearTimeout(timer);
-            let time2 = setTimeout(() => {
-              clearTimeout(time2);
-              console.log("/weather" + "?type=" + type);
-              router.push({
-                path: "/weather",
-                query: { type: proxyData.type },
-              });
-            }, 30000);
-            // 30000
+          // let timer = setTimeout(function () {
+          //   $(skSlogan).fadeOut();
+          //   $(aniThree).show();
+          //   $(logoLeft).addClass("logoLeftAni");
+          //   $(logoRight).addClass("logoRightAni");
+          //   $(line).addClass("lineAni");
+          //   $(text).addClass("lineAni");
+          //   clearTimeout(timer);
+          //   let time2 = setTimeout(() => {
+          //     clearTimeout(time2);
+          //     console.log("/weather" + "?type=" + type);
+          //     router.push({
+          //       path: "/weather",
+          //       query: { type: proxyData.type },
+          //     });
+          //   }, 30000);
+          // }, 30000);
+          let time2 = setTimeout(() => {
+            clearTimeout(time2);
+            console.log("/weather" + "?type=" + type);
+            router.push({
+              path: "/weather",
+              query: { type: proxyData.type },
+            });
           }, 30000);
         });
       },
@@ -341,7 +348,7 @@ export default defineComponent({
       winChange() {
         window.addEventListener(
           "resize",
-          function () {
+          function() {
             proxyData.updateStyle();
           },
           false