1. vue路径中可以放置一些参数
routes: [
{
path: '/course/detail/:id/', // 通过this.$route.params.id 进行获取
name: 'CourseDetail',
component: CourseDetail
},
]
2. 取值(取出路由中放置的id)
this.$route.params.id
3. html路由写法
<router-link to="/course/detail/2/">今年初撒</router-link>