方法三:
传参页面传递参数方式:
this.$router.push({ path: 'indexTwoDetails', query: { "id": id } })
接受参数页面获取参数:
console.log(this.$route.query.id)
使用path来匹配路由,然后通过query来传递参数,这种情况下 query传递的参数会显示在url后面?id=1