1.在app.vue中使用watch函数
watch: {//和methods同级
$route() {
console.log(window.location.href, "页面参数");
//如果要存入使用的和接收的话
sessionStorage.setItem("token",this.$route.query.token)//token假设参数中有token参数
},
},
1.在app.vue中使用watch函数
watch: {//和methods同级
$route() {
console.log(window.location.href, "页面参数");
//如果要存入使用的和接收的话
sessionStorage.setItem("token",this.$route.query.token)//token假设参数中有token参数
},
},