瀏覽代碼

排除排行榜路由

林旭祥 8 月之前
父節點
當前提交
064d8d0f7d
共有 1 個文件被更改,包括 3 次插入1 次删除
  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)
 };