uni——跳转传参(单个参数、多个参数)

简介

跳转传参以及接收参数

list.vue文件(传)

1.单个参数
toDetails(item,index) {
    
    
	this.$common.to(`pages/index/details?id=${
      
      item.id}`)
},
或者
toDetails(item,index) {
    
    
	this.$common.to('/pages/index/details?id=' + item.id);
},
2.多个参数
toDetails(item,index) {
    
    
	this.$common.to(`pages/index/details?id=${
      
      item.id}&type=${
      
      item.type}`)
},
或者
toDetails(item,index) {
    
    
	this.$common.to('/pages/index/details?id=' + item.id + '&type=' + item.type);
},

detalis.vue文件(接收)

onload(options){
    
    
  console.log(options)
}

猜你喜欢

转载自blog.csdn.net/xulihua_75/article/details/127321688
今日推荐