12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- import { createRouter, createWebHistory } from 'vue-router'
- // @ts-ignore
- import NProgress from 'nprogress'
- const router = createRouter({
- history: createWebHistory(import.meta.env.BASE_URL),
- scrollBehavior() {
- return { top: 0, left: 0 }
- },
- routes: [
- {
- path: '/login',
- component: () => import('./pages/login/index.vue'),
- },
- {
- path: '/register',
- component: () => import('./pages/register/index.vue'),
- },
- {
- path: '/password/:action',
- component: () => import('./pages/password/index.vue'),
- props: true,
- },
- {
- path: '/imei/:action',
- component: () => import('./pages/imei/index.vue'),
- props: true,
- },
- {
- path: '/fill-order',
- component: () => import('./pages/fill-order/index.vue'),
- },
- {
- path: '/pay-result/:status',
- component: () => import('./pages/pay-result/index.vue'),
- props: true,
- },
- {
- path: '/account',
- component: () => import('./pages/account/index.vue'),
- },
- {
- path: '/order',
- component: () => import('./pages/my-order/index.vue'),
- },
- {
- path: '/order/:id',
- component: () => import('./pages/benefits/index.vue'),
- },
- {
- path: '/gift-card',
- component: () => import('./pages/gift-card/index.vue'),
- },
- {
- path: '/mailing',
- component: () => import('./pages/mailing/index.vue'),
- },
- {
- path: '/renewal',
- component: () => import('./pages/renewal/index.vue'),
- props: true,
- },
- {
- path: '/repaire/appointment',
- component: () => import('./pages/repaire/appointment.vue'),
- props: true,
- },
- {
- path: '/repaire/history',
- component: () => import('./pages/repaire/history.vue'),
- },
- {
- path: '/invite',
- component: () => import('./pages/invite/index.vue'),
- },
- ],
- })
- router.beforeEach(() => {
- NProgress.start()
- })
- router.afterEach(() => NProgress.done())
- router.onError(() => NProgress.remove())
- export default router
|