️ Revert "♻️ 路由按需引入"

This reverts commit 07bc93ab39.
This commit is contained in:
BTMuli
2023-07-26 11:50:15 +08:00
parent 07bc93ab39
commit eab72c1503
4 changed files with 66 additions and 29 deletions

View File

@@ -1,35 +1,45 @@
/** /**
* @file router modules main.ts * @file router modules main.ts
* @description 主路由模块 * @description 主路由模块
* @author BTMuli <bt-muli@outlook.com> * @author BTMuli<bt-muli@outlook.com>
* @since Alpha v0.2.2 * @since Alpha v0.1.6
*/ */
// 信息展示
import Announcements from "../../pages/Announcements.vue";
import Home from "../../pages/Home.vue";
// 数据交互
import Achievements from "../../pages/Achievements.vue";
// 应用配置相关
import Config from "../../pages/Config.vue";
// 测试页
import Test from "../../pages/Test.vue";
const mainRoutes = [ const mainRoutes = [
{ {
path: "/", path: "/",
name: "首页", name: "首页",
component: async () => await import("../../pages/Home.vue"), component: Home,
}, },
{ {
path: "/test", path: "/test",
name: "测试页", name: "测试页",
component: async () => await import("../../pages/Test.vue"), component: Test,
}, },
{ {
path: "/achievements", path: "/achievements",
name: "成就", name: "成就",
component: async () => await import("../../pages/Achievements.vue"), component: Achievements,
}, },
{ {
path: "/announcements", path: "/announcements",
name: "公告", name: "公告",
component: async () => await import("../../pages/Announcements.vue"), component: Announcements,
}, },
{ {
path: "/config", path: "/config",
name: "设置", name: "设置",
component: async () => await import("../../pages/Config.vue"), component: Config,
}, },
{ {
path: "/home", path: "/home",

View File

@@ -1,40 +1,50 @@
/** /**
* @file router modules sub.ts * @file router modules sub.ts
* @description 子路由模块,用于二级窗口 * @description 子路由模块,用于二级窗口
* @author BTMuli <bt-muli@outlook.com> * @author BTMuli<bt-muli@outlook.com>
* @since Alpha v0.2.2 * @since Alpha v0.1.2
*/ */
// 游戏内公告
import TAnno from "../../views/t-anno.vue";
import TAnnoJson from "../../views/t-anno-json.vue";
// 咨讯
import TNews from "../../views/t-news.vue";
// 帖子相关
import TPost from "../../views/t-post.vue";
import TPostJson from "../../views/t-post-json.vue";
// 抽奖
import TLottery from "../../views/t-lottery.vue";
const subRoutes = [ const subRoutes = [
{ {
path: "/anno_detail/:anno_id", path: "/anno_detail/:anno_id",
name: "游戏内公告", name: "游戏内公告",
component: async () => await import("../../views/t-anno.vue"), component: TAnno,
}, },
{ {
path: "/anno_detail_json/:anno_id", path: "/anno_detail_json/:anno_id",
name: "游戏内公告JSON", name: "游戏内公告JSON",
component: async () => await import("../../views/t-anno-json.vue"), component: TAnnoJson,
}, },
{ {
path: "/news/:gid", path: "/news/:gid",
name: "咨讯", name: "咨讯",
component: async () => await import("../../views/t-news.vue"), component: TNews,
}, },
{ {
path: "/post_detail/:post_id", path: "/post_detail/:post_id",
name: "帖子详情", name: "帖子详情",
component: async () => await import("../../views/t-post.vue"), component: TPost,
}, },
{ {
path: "/post_detail_json/:post_id", path: "/post_detail_json/:post_id",
name: "帖子详情JSON", name: "帖子详情JSON",
component: async () => await import("../../views/t-post-json.vue"), component: TPostJson,
}, },
{ {
path: "/lottery/:lottery_id", path: "/lottery/:lottery_id",
name: "抽奖详情", name: "抽奖详情",
component: async () => await import("../../views/t-lottery.vue"), component: TLottery,
}, },
]; ];

View File

@@ -1,30 +1,37 @@
/** /**
* @file router modules user.ts * @file router modules user.ts
* @description user 路由模块 * @description user 路由模块
* @author BTMuli <bt-muli@outlook.com> * @author BTMuli<bt-muli@outlook.com>
* @since Alpha v0.2.2 * @since Alpha v0.2.0
*/ */
// user main
import Abyss from "../../pages/User/Abyss.vue";
import Characters from "../../pages/User/Characters.vue";
import Gacha from "../../pages/User/Gacha.vue";
import Record from "../../pages/User/Record.vue";
// user sub
const userRoutes = [ const userRoutes = [
{ {
path: "/user/abyss", path: "/user/abyss",
name: "深渊记录", name: "深渊记录",
component: async () => await import("../../pages/User/Abyss.vue"), component: Abyss,
}, },
{ {
path: "/user/characters", path: "/user/characters",
name: "我的角色", name: "我的角色",
component: async () => await import("../../pages/User/Characters.vue"), component: Characters,
}, },
{ {
path: "/user/gacha", path: "/user/gacha",
name: "祈愿记录", name: "祈愿记录",
component: async () => await import("../../pages/User/Gacha.vue"), component: Gacha,
}, },
{ {
path: "/user/record", path: "/user/record",
name: "原神战绩", name: "原神战绩",
component: async () => await import("../../pages/User/Record.vue"), component: Record,
}, },
]; ];

View File

@@ -2,44 +2,54 @@
* @file router modules wiki.ts * @file router modules wiki.ts
* @description wiki 路由模块 * @description wiki 路由模块
* @author BTMuli <bt-muli@outlook.com> * @author BTMuli <bt-muli@outlook.com>
* @since Alpha v0.2.2 * @since Alpha v0.2.1
*/ */
// Wiki main
import Abyss from "../../pages/WIKI/Abyss.vue";
import Character from "../../pages/WIKI/Character.vue";
import GCG from "../../pages/WIKI/GCG.vue";
import Weapon from "../../pages/WIKI/Weapon.vue";
// Wiki sub
import TCharacter from "../../views/WIKI/t-character.vue";
import TGCG from "../../views/WIKI/t-gcg.vue";
import TWeapon from "../../views/WIKI/t-weapon.vue";
const wikiRoutes = [ const wikiRoutes = [
{ {
path: "/wiki/abyss", path: "/wiki/abyss",
name: "深渊数据库", name: "深渊数据库",
component: async () => await import("../../pages/WIKI/Abyss.vue"), component: Abyss,
}, },
{ {
path: "/wiki/character", path: "/wiki/character",
name: "角色图鉴", name: "角色图鉴",
component: async () => await import("../../pages/WIKI/Character.vue"), component: Character,
}, },
{ {
path: "/wiki/GCG", path: "/wiki/GCG",
name: "卡牌图鉴", name: "卡牌图鉴",
component: async () => await import("../../pages/WIKI/GCG.vue"), component: GCG,
}, },
{ {
path: "/wiki/weapon", path: "/wiki/weapon",
name: "武器图鉴", name: "武器图鉴",
component: async () => await import("../../pages/WIKI/Weapon.vue"), component: Weapon,
}, },
{ {
path: "/wiki/detail/character/:id", path: "/wiki/detail/character/:id",
name: "角色详情", name: "角色详情",
component: async () => await import("../../views/WIKI/t-character.vue"), component: TCharacter,
}, },
{ {
path: "/wiki/detail/GCG/:id", path: "/wiki/detail/GCG/:id",
name: "卡牌详情", name: "卡牌详情",
component: async () => await import("../../views/WIKI/t-gcg.vue"), component: TGCG,
}, },
{ {
path: "/wiki/detail/weapon/:id", path: "/wiki/detail/weapon/:id",
name: "武器详情", name: "武器详情",
component: async () => await import("../../views/WIKI/t-weapon.vue"), component: TWeapon,
}, },
]; ];