index.ts 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. import { createRouter, createWebHashHistory } from 'vue-router'
  2. import HomeView from '../views/HomeView.vue'
  3. import NotFoundView from '../views/NotFoundView.vue'
  4. const router = createRouter({
  5. history: createWebHashHistory(import.meta.env.BASE_URL),
  6. routes: [
  7. {
  8. path: '/',
  9. name: 'home',
  10. component: HomeView,
  11. },
  12. {
  13. path: '/about',
  14. name: 'about',
  15. // route level code-splitting
  16. // this generates a separate chunk (About.[hash].js) for this route
  17. // which is lazy-loaded when the route is visited.
  18. component: () => import('../views/AboutView.vue'),
  19. },
  20. {
  21. path: '/news',
  22. name: 'news',
  23. component: () => import('../views/NewsView.vue'),
  24. },
  25. {
  26. path: '/news/detail',
  27. name: 'news-detail',
  28. component: () => import('../views/NewsDetailView.vue'),
  29. },
  30. {
  31. path: '/introduction',
  32. name: 'introduction',
  33. component: () => import('../views/IntrodView.vue'),
  34. },
  35. {
  36. path: '/introduction/about',
  37. name: 'IntroductionAbout',
  38. component: () => import('../views/introduction/about.vue'),
  39. },
  40. {
  41. path: '/introduction/history',
  42. name: 'IntroductionHistory',
  43. component: () => import('../views/introduction/history.vue'),
  44. },
  45. {
  46. path: '/introduction/character',
  47. name: 'IntroductionCharacter',
  48. component: () => import('../views/introduction/character.vue'),
  49. },
  50. {
  51. path: '/introduction/language',
  52. name: 'IntroductionLanguage',
  53. component: () => import('../views/introduction/language.vue'),
  54. },
  55. {
  56. path: '/introduction/custom',
  57. name: 'IntroductionCustom',
  58. component: () => import('../views/introduction/custom.vue'),
  59. },
  60. {
  61. path: '/introduction/feature',
  62. name: 'IntroductionFeature',
  63. component: () => import('../views/introduction/feature.vue'),
  64. },
  65. {
  66. path: '/introduction/building',
  67. name: 'IntroductionBuilding',
  68. component: () => import('../views/introduction/building.vue'),
  69. },
  70. {
  71. path: '/introduction/victuals',
  72. name: 'IntroductionVictuals',
  73. component: () => import('../views/introduction/victuals.vue'),
  74. },
  75. {
  76. path: '/introduction/sea',
  77. name: 'IntroductionSea',
  78. component: () => import('../views/introduction/sea.vue'),
  79. },
  80. {
  81. path: '/introduction/book',
  82. name: 'IntroductionBook',
  83. component: () => import('../views/introduction/book.vue'),
  84. },
  85. {
  86. path: '/introduction/policy',
  87. name: 'IntroductionPolicy',
  88. component: () => import('../views/introduction/policy.vue'),
  89. },
  90. {
  91. path: '/communicate',
  92. name: 'communicate',
  93. component: () => import('../views/CommunicateView.vue'),
  94. },
  95. {
  96. path: '/communicate/fujian-and-taiwan',
  97. name: 'CommunicateFujianAndTaiwan',
  98. component: () => import('../views/communicate/fujian-and-taiwan.vue'),
  99. },
  100. {
  101. path: '/communicate/hk-macao-and-taiwan',
  102. name: 'CommunicateHKMacaoAndTiwanAndTaiwan',
  103. component: () => import('../views/communicate/hk-macao-and-taiwan.vue'),
  104. },
  105. {
  106. path: '/communicate/activity',
  107. name: 'CommunicateActivity',
  108. component: () => import('../views/communicate/activity.vue'),
  109. },
  110. {
  111. path: '/communicate/outside',
  112. name: 'CommunicateOutside',
  113. component: () => import('../views/communicate/outside.vue'),
  114. },
  115. {
  116. path: '/research',
  117. name: 'research',
  118. component: () => import('../views/ResearchView.vue'),
  119. },
  120. {
  121. path: '/research/teams',
  122. name: 'ResearchTeams',
  123. component: () => import('../views/research/teams.vue'),
  124. },
  125. {
  126. path: '/research/discuss',
  127. name: 'ResearchDiscuss',
  128. component: () => import('../views/research/discuss.vue'),
  129. },
  130. {
  131. path: '/research/projects',
  132. name: 'ResearchProjects',
  133. component: () => import('../views/research/projects.vue'),
  134. },
  135. {
  136. path: '/research/result',
  137. name: 'ResearchResult',
  138. component: () => import('../views/research/result.vue'),
  139. },
  140. {
  141. path: '/research/expert',
  142. name: 'ResearchExpert',
  143. component: () => import('../views/research/expert.vue'),
  144. },
  145. {
  146. path: '/fusion',
  147. name: 'fusion',
  148. component: () => import('../views/FusionView.vue'),
  149. },
  150. {
  151. path: '/fusion/scenic-spot',
  152. name: 'FusionScenicSpot',
  153. component: () => import('../views/fusion/scenic-spot.vue'),
  154. },
  155. {
  156. path: '/fusion/route',
  157. name: 'FusionRoute',
  158. component: () => import('../views/fusion/route.vue'),
  159. },
  160. {
  161. path: '/fusion/products',
  162. name: 'FusionProducts',
  163. component: () => import('../views/fusion/products.vue'),
  164. },
  165. {
  166. path: '/fusion/demo-site',
  167. name: 'FusionDemoSite',
  168. component: () => import('../views/fusion/demo-site.vue'),
  169. },
  170. {
  171. path: '/fusion/fashion',
  172. name: 'FusionFashion',
  173. component: () => import('../views/fusion/fashion.vue'),
  174. },
  175. {
  176. path: '/fusion/point',
  177. name: 'FusionPoint',
  178. component: () => import('../views/fusion/point.vue'),
  179. },
  180. {
  181. path: '/inheritor',
  182. name: 'inheritor',
  183. component: () => import('../views/InheritorView.vue'),
  184. },
  185. {
  186. path: '/inheritor/submit',
  187. name: 'InheritorSubmit',
  188. component: () => import('../views/inheritor/submit.vue'),
  189. },
  190. {
  191. path: '/inheritor/inheritor',
  192. name: 'InheritorList',
  193. component: () => import('../views/inheritor/inheritor.vue'),
  194. },
  195. {
  196. path: '/inheritor/products',
  197. name: 'InheritorProducts',
  198. component: () => import('../views/inheritor/products.vue'),
  199. },
  200. {
  201. path: '/inheritor/projects',
  202. name: 'InheritorProjects',
  203. component: () => import('../views/inheritor/projects.vue'),
  204. },
  205. {
  206. path: '/inheritor/seminar',
  207. name: 'InheritorSeminar',
  208. component: () => import('../views/inheritor/seminar.vue'),
  209. },
  210. {
  211. path: '/inheritor/unmoveable',
  212. name: 'InheritorUnmoveable',
  213. component: () => import('../views/inheritor/unmoveable.vue'),
  214. },
  215. {
  216. path: '/inheritor/area',
  217. name: 'InheritorArea',
  218. component: () => import('../views/inheritor/area.vue'),
  219. },
  220. {
  221. path: '/inheritor/heritage',
  222. name: 'InheritorHeritage',
  223. component: () => import('../views/inheritor/heritage.vue'),
  224. },
  225. {
  226. path: '/inheritor/block',
  227. name: 'InheritorBlock',
  228. component: () => import('../views/inheritor/block.vue'),
  229. },
  230. {
  231. path: '/inheritor/language',
  232. name: 'InheritorLanguage',
  233. component: () => import('../views/inheritor/language.vue'),
  234. },
  235. {
  236. path: '/inheritor/artifact-detail',
  237. name: 'artifact-detail',
  238. component: () => import('../views/details/ArtifactDetailView.vue'),
  239. },
  240. {
  241. path: '/inheritor/intangible-detail',
  242. name: 'intangible-detail',
  243. component: () => import('../views/details/IntangibleDetailView.vue'),
  244. },
  245. {
  246. path: '/inheritor/moveable',
  247. name: 'InheritorMoveable',
  248. component: () => import('../views/inheritor/moveable.vue'),
  249. },
  250. {
  251. path: '/inheritor/activity',
  252. name: 'InheritorActivity',
  253. component: () => import('../views/inheritor/activity.vue'),
  254. },
  255. {
  256. path: '/village/index',
  257. name: 'VillageList',
  258. component: () => import('../views/village/index.vue'),
  259. children: [
  260. {
  261. path: 'content',
  262. name: 'VillageContent',
  263. component: () => import('../views/village/content.vue'),
  264. },
  265. {
  266. path: 'list',
  267. name: 'VillageList2',
  268. component: () => import('../views/village/list.vue'),
  269. },
  270. {
  271. path: 'detail',
  272. name: 'VillageDetail',
  273. component: () => import('../views/village/detail.vue'),
  274. },
  275. ]
  276. },
  277. {
  278. path: '/404',
  279. name: 'NotFound',
  280. component: NotFoundView
  281. },
  282. {
  283. path: '/:pathMatch(.*)*', // 匹配所有不存在的路径
  284. redirect: '/404'
  285. }
  286. ],
  287. })
  288. export default router