vue页面跳转时传递数组参数

vue页面跳转时传递数组参数
例如A页面要传递数组到B页面

A页面的写法:

	let items = encodeURIComponent(JSON.stringify(index));
		console.log(items)
		uni.navigateTo({
			url: '../AddAddress/index?itemlist=' + items,
		})

B页面接受数组:

  onLoad(e) {
	 console.log(e)
	 let obj = e.itemlist.replace("\"([^\"]*)\"", "$1");
	 this.list = JSON.parse(obj)
	 console.log(this.list)
  },

你可能感兴趣的:(传递数组,vue页面跳转传递数组,页面跳转传参(数组),vue,json)