12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- // import {createRouter, createWebHistory} from '@ionic/vue-router';
- import {createRouter, createWebHistory} from 'vue-router';
- import layout from '@/layout/index.vue'
- const routes = [
- {
- path: '/login',
- name: 'login',
- component: () => import('@/views/Login/index.vue'),
- },
- {
- path: '/',
- redirect: '/home',
- component: layout,
- children: [
- {
- path: 'home',
- name: 'home',
- component: () => import('@/views/HomeView.vue'),
- },
- {
- path: 'map',
- name: 'map',
- component: () => import('@/views/Map/index.vue'),
- },
- {
- path: 'inspect',
- name: 'inspect',
- component: () => import('@/views/Inspect/index.vue'),
- },
- {
- path: 'problem',
- name: 'problem',
- component: () => import('@/views/Problem/index.vue'),
- meta: {title: '问题列表'}
- },
- {
- path: 'about',
- name: 'about',
- component: () => import('@/views/AboutView.vue'),
- meta: {title: '我的'}
- },
- {
- path: 'inspect/:id/objects',
- name: 'inspectObjects',
- component: () => import('@/views/Inspect/Object/index.vue'),
- meta: {title: '工程列表', showBack: true}
- },
- {
- path: 'inspect/:id/object/:objId/problems',
- name: 'inspectObjectQuestions',
- component: () => import('@/views/Inspect/Object/Problem/index.vue'),
- meta: {title: '问题列表', showBack: true}
- },
- {
- path: 'problem/:id',
- name: 'problemDetail',
- component: () => import('@/views/Problem/detail/index.vue'),
- meta: {title: '问题详情', showBack: true}
- },
- {
- path: 'problemAdd',
- name: 'problemAdd',
- component: () => import('@/views/Problem/detail/index.vue'),
- meta: {title: '问题详情', showBack: true}
- },
- ],
- },
- ];
- const router = createRouter({
- history: createWebHistory(process.env.BASE_URL),
- routes,
- });
- export default router;
|