A: that.$router.push({
path:'/forgetpasswordmodifypassword',
query:{
mobileToken:res.data.data.mobileToken,
mobile: this.telNumber.modleInput
}
}
)
B: queryName(){
let that = this
this.mobile = that.$route.query.mobile;
this.mobileToken = that.$route.query.mobileToken;
},
A: that.$router.push({
name:'/forgetpasswordmodifypassword',
parames:{
mobileToken:res.data.data.mobileToken,
mobile: this.telNumber.modleInput
}
}
)
B: queryName(){
let that = this
this.mobile = that.$route.parames.mobile;
this.mobileToken = that.$route.parames.mobileToken;
},
这里有个注意点:path与query组合 query类似于get
这里有个注意点:name与parames组合 parames类似于post
query要用path来引入,params要用name来引入,接收参数都是类似的,分别是this.$route.query.name和this.$route.params.name。
注意接收参数的时候,已经是$route而不是$router了哦!!