From bddc1d3a7a160e41bb27636ca330fe40b361d156 Mon Sep 17 00:00:00 2001 From: chiayin Date: Fri, 26 Jan 2024 17:08:34 +0800 Subject: [PATCH] feat: Performance aside done. --- src/router/index.js | 23 +++--- src/views/Discover/Performance/index.vue | 90 +++++++++++++++++++++++- 2 files changed, 101 insertions(+), 12 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index e764c68..fefbfcf 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -93,6 +93,11 @@ const routes = [ name: "NotFound404", component: NotFound404, }, + // { + // path: "/discover/performance", + // name: "Performance", + // component: Performance, + // } ]; const base_url = import.meta.env.BASE_URL; @@ -103,15 +108,15 @@ const router = createRouter({ }); // 全域性路由守衛 -router.beforeEach((to, from) => { - // to: Route: 即將要進入的目標 路由物件 - // from: Route: 當前導航正要離開的路由 - let isRemoveCookie = document.cookie.split(';').some(c => c.trim().startsWith('expires=Thu, 01 Jan 1970 00:00:00 UTC;')); // 是否登入,有到期日表示已登出。 +// router.beforeEach((to, from) => { +// // to: Route: 即將要進入的目標 路由物件 +// // from: Route: 當前導航正要離開的路由 +// let isRemoveCookie = document.cookie.split(';').some(c => c.trim().startsWith('expires=Thu, 01 Jan 1970 00:00:00 UTC;')); // 是否登入,有到期日表示已登出。 - // 當路由到 login 時,有登入要跳轉至home - if (to.name === 'Login') { - if (isRemoveCookie) router.push({ name: 'Files' }); - } - }); +// // 當路由到 login 時,有登入要跳轉至home +// if (to.name === 'Login') { +// if (isRemoveCookie) router.push({ name: 'Files' }); +// } +// }); export default router; diff --git a/src/views/Discover/Performance/index.vue b/src/views/Discover/Performance/index.vue index 5d15d02..9b68a1d 100644 --- a/src/views/Discover/Performance/index.vue +++ b/src/views/Discover/Performance/index.vue @@ -1,10 +1,74 @@ +