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