url参数 //在生命周期中获取,在方法中写法相同 create(){ this.$router.currentRoute.query.id //这个不用 this.$route.query.id //用这个获取url上的id } url: www.baidu.com/?id=1