在router目录下的index.js文件中,对path属性加上/:id。 

使用router对象的params.id 例如 :  this.$route.params.id