add user invite
This commit is contained in:
+14
-1
@@ -2,6 +2,7 @@ import { createRouter, createWebHistory, type RouteLocationNormalized } from "vu
|
||||
import RootLayout from "@/layout/RootLayout.vue";
|
||||
import MainLayout from "@/layout/MainLayout.vue";
|
||||
import Login from "@/pages/Login.vue";
|
||||
import InviteRegister from "@/pages/InviteRegister.vue";
|
||||
import chartRoutes from "@/router/routes/chartRoutes";
|
||||
import customerRoutes from "@/router/routes/customerRoutes";
|
||||
import { managementAccountRoutes, managementSettingRoutes, storeRoutes } from "@/router/routes/managementRoutes";
|
||||
@@ -60,6 +61,18 @@ const router = createRouter({
|
||||
darkBodyBackground: "#10161f"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "gao/invite/register",
|
||||
name: "InviteRegister",
|
||||
component: InviteRegister,
|
||||
meta: {
|
||||
depth: 1,
|
||||
navBarVisible: false,
|
||||
tabBarVisible: false,
|
||||
bodyBackground: "#F5F5F8",
|
||||
darkBodyBackground: "#10161f"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "",
|
||||
component: MainLayout,
|
||||
@@ -86,7 +99,7 @@ const router = createRouter({
|
||||
|
||||
router.beforeEach(async (to) => {
|
||||
const userStore = useUserStore();
|
||||
if (to.path === "/login") {
|
||||
if (to.path === "/login" || to.path === "/gao/invite/register") {
|
||||
return userStore.isLogged() ? "/management" : true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user