Ver código fonte

排除排行榜路由

林旭祥 8 meses atrás
pai
commit
064d8d0f7d
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      src/layout/index.vue

+ 3 - 1
src/layout/index.vue

@@ -26,7 +26,9 @@ const handClick = () => {
 
 const getCountDown = () => {
   timer.value = setTimeout(() => {
-    router.push({ path: '/ranking' });
+    if (router.currentRoute.value.fullPath != '/ranking') {
+      router.push({ path: '/ranking' });
+    }
   }, 1000 * 60 * 15)
 };