uniapp 返回上一步携带参数

1. 下一步

// 返回上一页
				setTimeout(() => {
					let pages = getCurrentPages();
					let prevPage = pages[pages.length - 2];
					prevPage.$vm.schoolName = this.formList;
					uni.navigateBack({
						delta: 1
					});
				}, 1000)

2. 返回上一步, 携带参数

		// 获取下一步返回的数据
		onShow() {
			 let pages = getCurrentPages();
			    if (pages[pages.length - 1].$vm.schoolName) {
			        this.schoolName = pages[pages.length - 1].$vm.schoolName
					console.log(this.schoolName)
			    }
		},

你可能感兴趣的:(uni-app,前端,javascript)