Files
Code-Create/src/routes.ts
X1627315083@163.com 4c515e1123 fix
2026-05-19 14:49:12 +08:00

70 lines
1.5 KiB
TypeScript

import type { RouteRecordRaw } from 'vue-router'
import AboutView from './pages/about-us/index.vue'
import ContactView from './pages/ContactView.vue'
import HomeView from './pages/home/index.vue'
import ProductsView from './pages/ProductsView.vue'
import { LANGS } from './lang'
export const routes: RouteRecordRaw[] = [
{
path: `/:lang(${LANGS.join('|')})?`,
children: [
{
path: '',
component: HomeView,
},
{
path: 'about-us',
name: 'about-us',
component: AboutView
},
{
path: 'products',
name: 'products',
component: ProductsView
},
{
path: 'contact-us',
name: 'contact',
component: ContactView
},
{
path: 'aida',
name: 'Aida',
component: () => import('./pages/aida/index.vue')
},
{ path: 'events',
name: 'events',
component: () => import('./pages/events/index.vue')
},
{ path: 'user-stories',
name: 'user-stories',
component: () => import('./pages/user-stories/index.vue')
},
{
path: 'my-account',
name: 'MyAccount',
component: () => import('./pages/my-account/index.vue'),
children: [
{
path: '',
component: () => import('./pages/my-account/welcome.vue'),
},
{
path: 'orders',
component: () => import('./pages/my-account/orders.vue'),
},
{
path: 'subscriptions',
component: () => import('./pages/my-account/subscriptions.vue'),
},
{
path: ':pathMatch(.*)*',
component: () => import('./pages/my-account/welcome.vue'),
},
]
},
]
}
]