11import { createRouter , createWebHistory } from "vue-router" ;
2+ import { isMiniProgram , isApp } from "@jx3box/jx3box-common/js/utils" ;
23
34const routes = [
45 {
@@ -13,6 +14,154 @@ const routes = [
1314 } ,
1415 } ,
1516 } ,
17+ // ===== 奇遇珍卷 =====
18+ {
19+ name : "adventure" ,
20+ path : "/codex/adventure" ,
21+ redirect : ( ) => {
22+ const isMobile = window . innerWidth <= 768 ;
23+ return isMobile ? "/codex/adventure/portrait" : "/codex/adventure/landscape" ;
24+ } ,
25+ meta : {
26+ i18n : {
27+ title : "pages.adventure.treasure.title" ,
28+ keywords : "pages.adventure.treasure.keywords" ,
29+ description : "pages.adventure.treasure.description" ,
30+ } ,
31+ } ,
32+
33+ } ,
34+ {
35+ name : "landscape" ,
36+ path : "/codex/adventure/landscape" ,
37+ component : ( ) => import ( "@/views/adventure/landscape.vue" ) ,
38+ meta : {
39+ name : "横屏" ,
40+ i18n : {
41+ title : "pages.adventure.treasure.landscape.title" ,
42+ keywords : "pages.adventure.treasure.landscape.keywords" ,
43+ description : "pages.adventure.treasure.landscape.description" ,
44+ } ,
45+
46+ } ,
47+ } ,
48+ {
49+ name : "portrait" ,
50+ path : "/codex/adventure/portrait" ,
51+ component : ( ) => import ( "@/views/adventure/portrait.vue" ) ,
52+ meta : {
53+ name : "竖屏" ,
54+ i18n : {
55+ title : "pages.adventure.treasure.portrait.title" ,
56+ keywords : "pages.adventure.treasure.portrait.keywords" ,
57+ description : "pages.adventure.treasure.portrait.description" ,
58+ } ,
59+ } ,
60+ } ,
61+
62+ // ===== 资历宝典 =====
63+ {
64+ name : "achievement" ,
65+ path : "/codex/achievement" ,
66+ component : ( ) => import ( "@/views/wiki/index.vue" ) ,
67+ redirect : "/codex/achievement/overview" ,
68+ children : [
69+ {
70+ name : "overview" ,
71+ path : "overview" ,
72+ component :
73+ isMiniProgram ( ) || isApp ( )
74+ ? ( ) => import ( "@/views/wiki/miniprogram/overview.vue" )
75+ : ( ) => import ( "@/views/wiki/overview.vue" ) ,
76+ meta : {
77+ i18n : {
78+ title : "pages.wiki.overview.title" ,
79+ keywords : "pages.wiki.overview.keywords" ,
80+ description : "pages.wiki.overview.description" ,
81+ } ,
82+ } ,
83+ } ,
84+ {
85+ name : "compare" ,
86+ path : "compare" ,
87+ component :
88+ isMiniProgram ( ) || isApp ( )
89+ ? ( ) => import ( "@/views/wiki/miniprogram/compare.vue" )
90+ : ( ) => import ( "@/views/wiki/compare.vue" ) ,
91+ meta : {
92+ i18n : {
93+ title : "pages.wiki.compare.title" ,
94+ keywords : "pages.wiki.compare.keywords" ,
95+ description : "pages.wiki.compare.description" ,
96+ } ,
97+ } ,
98+ } ,
99+ {
100+ name : "leap" ,
101+ path : "leap" ,
102+ component : ( ) => import ( "@/views/wiki/leap.vue" ) ,
103+ meta : {
104+ i18n : {
105+ title : "pages.wiki.leap.title" ,
106+ keywords : "pages.wiki.leap.keywords" ,
107+ description : "pages.wiki.leap.description" ,
108+ } ,
109+ } ,
110+ } ,
111+ {
112+ name : "catalogue" ,
113+ path : "catalogue" ,
114+ meta : {
115+ title : "目录列表" ,
116+ i18n : {
117+ title : "pages.wiki.catalogue.title" ,
118+ keywords : "pages.wiki.catalogue.keywords" ,
119+ description : "pages.wiki.catalogue.description" ,
120+ } ,
121+ } ,
122+ component : ( ) => import ( "@/views/wiki/miniprogram/catalogue.vue" ) ,
123+ } ,
124+ {
125+ name : "list" ,
126+ path : "list" ,
127+ meta : {
128+ title : "成就列表" ,
129+ i18n : {
130+ title : "pages.wiki.list.title" ,
131+ keywords : "pages.wiki.list.keywords" ,
132+ description : "pages.wiki.list.description" ,
133+ } ,
134+ } ,
135+ component : ( ) => import ( "@/views/wiki/miniprogram/achievement.vue" ) ,
136+ } ,
137+ {
138+ name : "compare/catalogue" ,
139+ path : "compare/catalogue" ,
140+ meta : {
141+ title : "对比目录列表" ,
142+ i18n : {
143+ title : "pages.wiki.compare.catalogue.title" ,
144+ keywords : "pages.wiki.compare.catalogue.keywords" ,
145+ description : "pages.wiki.compare.catalogue.description" ,
146+ } ,
147+ } ,
148+ component : ( ) => import ( "@/views/wiki/miniprogram/compare/compare_catalogue.vue" ) ,
149+ } ,
150+ {
151+ name : "compare/achievement" ,
152+ path : "compare/achievement" ,
153+ meta : {
154+ title : "对比成就列表" ,
155+ i18n : {
156+ title : "pages.wiki.compare.achievement.title" ,
157+ keywords : "pages.wiki.compare.achievement.keywords" ,
158+ description : "pages.wiki.compare.achievement.description" ,
159+ } ,
160+ } ,
161+ component : ( ) => import ( "@/views/wiki/miniprogram/compare/compare_achievement.vue" ) ,
162+ } ,
163+ ] ,
164+ } ,
16165] ;
17166
18167const router = createRouter ( {
@@ -21,4 +170,3 @@ const router = createRouter({
21170} ) ;
22171
23172export default router ;
24-
0 commit comments