mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-08 17:26:41 +08:00
fix
This commit is contained in:
+6
-3
@@ -93,12 +93,15 @@ onMounted(() => {
|
|||||||
const remember = localStorage.getItem('remember')
|
const remember = localStorage.getItem('remember')
|
||||||
|
|
||||||
// 如果token存在,且保持登录状态为true,则跳转到首页
|
// 如果token存在,且保持登录状态为true,则跳转到首页
|
||||||
if (token && remember === 'true')
|
if (token && remember === 'true') {
|
||||||
router.push('/')
|
router.push('/')
|
||||||
|
}
|
||||||
|
else {
|
||||||
// 获取背景图片
|
// 获取背景图片
|
||||||
fetchBackgroundImage()
|
fetchBackgroundImage()
|
||||||
})
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ const router = createRouter({
|
|||||||
{
|
{
|
||||||
path: 'dashboard',
|
path: 'dashboard',
|
||||||
component: () => import('../pages/dashboard.vue'),
|
component: () => import('../pages/dashboard.vue'),
|
||||||
|
meta: {
|
||||||
|
requiresAuth: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'ranking',
|
path: 'ranking',
|
||||||
|
|||||||
Reference in New Issue
Block a user