传过去:
<router-link :to='{path:"/manage/goods/add",query:{ID:v.ID}}'> //html的跳转1
<router-link :to="'/manage/video/detail?ID='+v.video_id"> //html的跳转2
this.$router.push({path: '/show', query: {ID: v.ID}}); //在方法里的跳转(能返回)
this.$router.replace({ path: '/mine/gift?shopID=all' }); //在方法里的跳转(不能返回)
获取:
this.ID = this.$route.query.ID //获取,注意route没r
跳去不同的路径的时候:
<router-link :to="link(v)" class='main' v-for='v in list' :key="v.ID"></router-link>
link(v){
if(v.type==1){
return '/user/order/detail?id='+v.ID
}else if(v.type==2){
return '/tools/free/uorder?id='+v.order_id
}else{
return ''
}
}
<router-link :to='{path:"/manage/goods/add",query:{ID:v.ID}}'> //html的跳转1
<router-link :to="'/manage/video/detail?ID='+v.video_id"> //html的跳转2
this.$router.push({path: '/show', query: {ID: v.ID}}); //在方法里的跳转(能返回)
this.$router.replace({ path: '/mine/gift?shopID=all' }); //在方法里的跳转(不能返回)
获取:
this.ID = this.$route.query.ID //获取,注意route没r
跳去不同的路径的时候:
<router-link :to="link(v)" class='main' v-for='v in list' :key="v.ID"></router-link>
link(v){
if(v.type==1){
return '/user/order/detail?id='+v.ID
}else if(v.type==2){
return '/tools/free/uorder?id='+v.order_id
}else{
return ''
}
}