import { createRouter, createWebHistory } from 'vue-router'

const routes = [
    {
        path: '/index',//首页
        name: 'index',
        component: () => import('@/views/index.vue')
    },
    {
        path: '/fillVolunteer',//模拟填报
        name: 'fillVolunteer',
        component: () => import('@/views/fillVolunteer/index.vue')
    },
    {
        path: '/fillVolunteer/:rulesEnrollProbability',//模拟填报
        name: 'fillVolunteer2',
        component: () => import('@/views/fillVolunteer/index.vue')
    },
    // {
    //     path: '/myVolunteer',//我的志愿表
    //     name: 'myVolunteer',
    //     component: () => import('@/views/fillVolunteer/my.vue')
    // },
    {
        path: '/school/search',//找大学
        name: 'schoolSearch',
        component: () => import('@/views/school/search.vue')
    },
    {
        path: '/school/:schoolCode',//学校详情页
        name: 'school',
        component: () => import('@/views/school/detail.vue'),
        meta:{
            title:"学院介绍"
        }
    },
    {
        path: '/major/search',//查专业
        name: 'majorSearch',
        component: () => import('@/views/major/search.vue')
    },
    {
        path: '/major/:majorCode',//专业详情页
        name: 'major',
        component: () => import('@/views/major/majorInfo.vue'),
        meta:{
            title:"专业概括"
        }
    },
    {
        path: '/scoreControlLine',//省控线
        name: 'scoreControlLine',
        component: () => import('@/views/other/historyScoreControlLine.vue'),
        meta:{
            title:"省控线"
        }
    },
    {
        path: '/checkRanking',//查位次
        name: 'checkRanking',
        component: () => import('@/views/other/checkRanking.vue'),
        meta:{
            title:"查位次"
        }
    },
    {
        path: '/calculateInvestment',//算投档
        name: 'calculateInvestment',
        component: () => import('@/views/other/calculateInvestment.vue'),
        meta:{
            title:"算投档"
        }
    },
    {
        path: '/testCultural',//测文化
        name: 'testCultural',
        component: () => import('@/views/other/testCultural.vue'),
        meta:{
            title:"测文化"
        }
    },{
        path: '/article/search',//
        name: 'articleSearch',
        component: () => import('@/views/article/list.vue'),
        meta:{
            title:"资讯信息"
        }
    },{
        path: '/article/:articleId',//资讯详情
        name: 'article',
        component: () => import('@/views/article/detail.vue'),
        meta:{
            title:"资讯详情"
        }
    },
    {
        path: '/testTiyuScore',
        name: 'testTiyuScore',
        component: () => import('@/views/other/testTiyuScore.vue'),
        meta:{
            title:"体育算分数"
        }
    },
    /*{
        path: '/search',//搜索
        name: 'search',
        component: () => import('@/views/search.vue')
    },
    {
        path: '/membershipCardList',//会员卡列表
        name: 'membershipCardList',
        component: () => import('@/views/membershipCardList.vue')
    },
    {
        path: '/membershipCard',//会员卡明细
        name: 'membershipCard',
        component: () => import('@/views/membershipCard.vue')
    },
    {
        path: '/help',//帮助中心
        name: 'help',
        component: () => import('@/views/help.vue')
    },
    {
        path: '/helpDetail',//帮助内容
        name: 'helpDetail',
        component: () => import('@/views/helpDetail.vue')
    },
    {
        path: '/login',//登录
        name: 'login',
        component: () => import('@/views/login.vue')
    },*/
    {
        path: '/register',//注册
        name: 'register',
        component: () => import('@/views/register.vue')
    },
    {
        path: '/passwordChanger',//更改密码
        name: 'passwordChanger',
        component: () => import('@/views/passwordChanger.vue')
    },

//    {path : '/:pathMatch(.*)*', redirect:{name:'index'}}//其余路由重定向至首页。
    { path: '/:pathMatch(.*)*', redirect: () => {
            return { name: 'index' };//重定向的 字符串路径/路径对象
        }},
]

export default createRouter({
    history: createWebHistory(),
    routes
})
