yunzer_go/frontend/src/router/index.ts

132 lines
3.6 KiB
TypeScript

import { createRouter, createWebHashHistory } from "vue-router";
const router = createRouter({
history: createWebHashHistory(),
routes: [
{
path: "/",
name: "index",
component: () => import("@/views/index/index.vue"),
},
{
path: "/index",
redirect: "/",
},
{
path: "/siteInformation",
name: "siteInformation",
component: () => import("@/views/siteInformation/index.vue"),
},
{
path: "/technicalArticles",
name: "technicalArticles",
component: () => import("@/views/technicalArticles/index.vue"),
},
{
path: "/officeResources",
name: "officeResources",
component: () => import("@/views/officeResources/index.vue"),
},
{
path: "/downloadPrograms",
name: "downloadPrograms",
component: () => import("@/views/downloadPrograms/index.vue"),
},
{
path: "/article",
name: "articleDetail",
component: () => import("@/views/components/detail_article.vue"),
},
{
path: "/resource",
name: "resourceDetail",
component: () => import("@/views/components/detail_resource.vue"),
},
{
path: "/downloadGames",
name: "downloadGames",
component: () => import("@/views/downloadGames/index.vue"),
},
{
path: "/search",
name: "search",
component: () => import("@/views/components/search.vue"),
},
{
path: "/login",
name: "login",
component: () => import("@/views/login/index.vue"),
},
{
path: "/test-editor",
name: "testEditor",
component: () => import("@/views/test-editor.vue"),
},
{
path: "/user/profile",
name: "userProfile",
component: () => import("@/views/user/profile/index.vue"),
redirect: "/user/profile/basic", // 默认跳转到基本资料
children: [
{
path: "basic",
name: "profileBasic",
component: () => import("@/views/user/profile/basicInfo.vue"),
},
{
path: "wallet",
name: "profileWallet",
component: () => import("@/views/user/profile/wallet.vue"),
},
{
path: "messages",
name: "profileMessages",
component: () => import("@/views/user/profile/messages.vue"),
},
{
path: "security",
name: "profileSecurity",
component: () => import("@/views/user/profile/security.vue"),
},
{
path: "notifications",
name: "profileNotifications",
component: () => import("@/views/user/profile/notifications.vue"),
},
{
path: "article/list",
name: "articleList",
component: () => import("@/views/user/profile/listArticle.vue"),
},
{
path: "article/publish",
name: "articlePublish",
component: () => import("@/views/user/profile/editArticle.vue"),
},
{
path: "article/edit",
name: "articleEdit",
component: () => import("@/views/user/profile/editArticle.vue"),
},
{
path: "resource/list",
name: "resourceList",
component: () => import("@/views/user/profile/listResource.vue"),
},
{
path: "resource/publish",
name: "resourcePublish",
component: () => import("@/views/user/profile/editResource.vue"),
},
{
path: "resource/edit",
name: "resourceEdit",
component: () => import("@/views/user/profile/editResource.vue"),
},
],
},
],
});
export default router;