import type { RouteRecordRaw } from "vue-router"; import HomeView from "../views/HomeView.vue"; import AboutView from "../views/AboutView.vue"; import ACCESS_ENUM from "../access/accessEnum"; import UserLoginView from "../views/user/UserLoginView.vue"; import UserRegisterView from "../views/user/UserRegisterView.vue"; import UserProfileView from "../views/user/UserProfileView.vue"; import AiChatView from "../views/ai/AiChatView.vue"; /** * 路由配置 */ export const routes: Array = [ { path: "/", name: "root", redirect: "/home", meta: { hideInMenu: true }, }, { path: "/home", name: "HomeView", component: HomeView, meta: { hideInMenu: false, access: ACCESS_ENUM.NOT_LOGIN }, }, { path: "/about", name: "AboutView", component: AboutView, meta: { hideInMenu: false, access: ACCESS_ENUM.NOT_LOGIN }, }, { path: "/ai/chat", name: "AiChatView", component: AiChatView, meta: { hideInMenu: false, access: ACCESS_ENUM.USER }, }, { path: "/user/login", name: "UserLoginView", component: UserLoginView, meta: { hideInMenu: true, access: ACCESS_ENUM.NOT_LOGIN }, }, { path: "/user/register", name: "UserRegisterView", component: UserRegisterView, meta: { hideInMenu: true, access: ACCESS_ENUM.NOT_LOGIN }, }, { path: "/user/profile", name: "UserProfileView", component: UserProfileView, meta: { hideInMenu: true, access: ACCESS_ENUM.USER }, }, ];