123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- import { createRouter, createWebHistory } from 'vue-router'
- import { defineAsyncComponent } from 'vue'
- const Home = () => import('@/views/Home.vue')
- const HomeView = () => import('@/views/HomeView.vue')
- const PopularizationScience = () => import('@/views/PopularizationScience.vue')
- const Community = () => import('@/views/Community.vue')
- const routes = [
- {
- path: '/',
- name: 'home',
-
- component: Home,
- redirect: "/homeView",
- children: [{
- path: 'homeView',
- name: 'homeView',
- component: HomeView
-
- },
- {
- path: 'popularizationScience',
- name: 'popularizationScience',
- component: PopularizationScience
- },
- {
- path: 'community',
- name: 'community',
- component: () => import('@/views/Community.vue')
- }, {
- path: 'plan',
- name: 'plan',
- component: () => import('@/views/Plan.vue')
- }, {
- path: 'testRecord',
- name: 'testRecord',
- component: () => import('@/views/TestRecord.vue')
- }, {
- path: 'report/:id',
- name: 'report',
- component: () => import('@/views/Report.vue')
- },
- {
- path: 'login',
- name: 'login',
- component: () => import('@/views/Login.vue')
- },
- {
- path: 'register',
- name: 'register',
- component: () => import('@/views/Register.vue')
- },
- {
- path: 'scale/:planId/:planName/:flag/:flagName/:num',
- name: 'scale',
- component: () => import('@/views/Scale.vue')
- },
- {
- path: 'scaleMid',
- name: 'scaleMid',
- component: () => import('@/views/ScaleMid.vue')
- },
-
- {
- path: 'cognize/:planId/:planName/:flag/:flagName/:num',
- name: 'cognize',
- component: () => import('@/views/Cognize.vue')
- }
- ]
-
- },
- {
- path: '/cognizeGoNoGo/:currentType/:planId/:planName/:flag/:flagName/:num',
- name: 'cognizeGoNoGo',
- component: () => import('@/views/CognizeGoNoGo.vue')
- }, {
- path: '/cognizeFaceDot/:currentType/:planId/:planName/:flag/:flagName/:num',
- name: 'cognizeFaceDot',
- component: () => import('@/views/CognizeFaceDot.vue')
- }
- ]
- const router = createRouter({
- history: createWebHistory(import.meta.env.BASE_URL),
- routes
- })
- export default router
|