diff --git a/src/router/modules/main.ts b/src/router/modules/main.ts index 85228c11..15840616 100644 --- a/src/router/modules/main.ts +++ b/src/router/modules/main.ts @@ -2,13 +2,12 @@ * @file router modules main.ts * @description 主路由模块 * @author BTMuli - * @since Alpha v0.1.2 + * @since Alpha v0.1.3 */ // 信息展示 import Announcements from "../../pages/Announcements.vue"; import Home from "../../pages/Home.vue"; -import GCG from "../../pages/WIKI/GCG.vue"; // 数据交互 import Achievements from "../../pages/Achievements.vue"; // 应用配置相关 @@ -35,11 +34,6 @@ const mainRoutes = [ name: "设置", component: Config, }, - { - path: "/GCG", - name: "卡牌", - component: GCG, - }, { path: "/home", redirect: "/", diff --git a/src/router/modules/wiki.ts b/src/router/modules/wiki.ts new file mode 100644 index 00000000..437465c9 --- /dev/null +++ b/src/router/modules/wiki.ts @@ -0,0 +1,50 @@ +/** + * @file router modules wiki.ts + * @description wiki 路由模块 + * @author BTMuli + * @since Alpha v0.1.3 + */ + +// Wiki main +import GCG from "../../pages/WIKI/GCG.vue"; +import Character from "../../pages/WIKI/Character.vue"; +import Weapon from "../../pages/WIKI/Weapon.vue"; +// Wiki sub +import TGCG from "../../views/WIKI/t-gcg.vue"; +import TCharacter from "../../views/WIKI/t-character.vue"; +import TWeapon from "../../views/WIKI/t-weapon.vue"; + +const wikiRoutes = [ + { + path: "/wiki/GCG", + name: "卡牌图鉴", + component: GCG, + }, + { + path: "/wiki/character", + name: "角色图鉴", + component: Character, + }, + { + path: "/wiki/weapon", + name: "武器图鉴", + component: Weapon, + }, + { + path: "/wiki/GCG_detail/:id", + name: "卡牌详情", + component: TGCG, + }, + { + path: "/wiki/character_detail/:id", + name: "角色详情", + component: TCharacter, + }, + { + path: "/wiki/weapon_detail/:id", + name: "武器详情", + component: TWeapon, + }, +]; + +export default wikiRoutes; diff --git a/src/router/routes.ts b/src/router/routes.ts index 434b5e6a..44b09b30 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -2,15 +2,17 @@ * @file router routes.ts * @description 路由配置 * @author BTMuli - * @since Alpha + * @since Alpha v0.1.3 */ // 主路由 import mainRoutes from "./modules/main"; // 子路由 import subRoutes from "./modules/sub"; +// Wiki 路由 +import wikiRoutes from "./modules/wiki"; // 合并路由 -const routes = [...mainRoutes, ...subRoutes]; +const routes = [...mainRoutes, ...subRoutes, ...wikiRoutes]; export default routes;