mirror of
https://github.com/wangdage12/Snap.Server.Web.git
synced 2026-02-17 10:02:08 +08:00
为登录页面添加粒子背景、添加主页
This commit is contained in:
@@ -6,7 +6,8 @@ router.beforeEach(async (to, _ , next) => {
|
||||
|
||||
// 未登录
|
||||
if (!userStore.token) {
|
||||
if (to.path === '/login') {
|
||||
// 主页(/)允许未登录访问
|
||||
if (to.path === '/' || to.path === '/login') {
|
||||
next()
|
||||
} else {
|
||||
next('/login')
|
||||
|
||||
Reference in New Issue
Block a user