feat: 新增页面布局

This commit is contained in:
duanshuwen
2025-12-01 22:16:34 +08:00
parent edd8b939d3
commit ae19c6c551
13 changed files with 174 additions and 16 deletions

View File

@@ -12,6 +12,12 @@ const routes = [
component: () => import("@/views/browser/BrowserLayout.vue"),
meta: { requiresAuth: true },
},
{
path: "/home",
name: "Home",
component: () => import("@/views/home/index.vue"),
meta: { requiresAuth: true },
},
{
path: "/about",
name: "About",
@@ -30,10 +36,12 @@ router.beforeEach((to, _from, next) => {
next({ path: "/login" });
return;
}
if (token && to.path !== "/browser") {
next({ path: "/browser" });
if (token && to.path !== "/home") {
next({ path: "/home" });
return;
}
next();
});