🎨 feat(wiki): 添加 wiki 路由

This commit is contained in:
BTMuli
2023-04-14 18:17:53 +08:00
parent 7047863448
commit 055159fac0
3 changed files with 55 additions and 9 deletions

View File

@@ -2,13 +2,12 @@
* @file router modules main.ts
* @description 主路由模块
* @author BTMuli<bt-muli@outlook.com>
* @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: "/",

View File

@@ -0,0 +1,50 @@
/**
* @file router modules wiki.ts
* @description wiki 路由模块
* @author BTMuli<bt-muli@outlook.com>
* @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;

View File

@@ -2,15 +2,17 @@
* @file router routes.ts
* @description 路由配置
* @author BTMuli<bt-muli@outlook.com>
* @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;