yanzheng () {
if (this.username !== null && this.number !== null) {
this.$route.push({path: '/hospital/fuwuxq'});
}
}
yanzheng () {
if (this.username !== null && this.number !== null) {
this.$route.push({path: '/hospital/fuwuxq'});
}
}
你需要的是
this.$router
而不是this.$route
看文档:对组件注入